Skip to content

Commit 0dd18ed

Browse files
committed
[cxx-interop] NFC: Move a header from include into lib
CXXMethodBridging.h isn't supposed to be used outside of ClangImporter, so let's keep it inside of ClangImporter's implementation.
1 parent f8664ad commit 0dd18ed

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

include/swift/ClangImporter/CXXMethodBridging.h renamed to lib/ClangImporter/CXXMethodBridging.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
#include "swift/AST/Decl.h"
55
#include "clang/AST/DeclCXX.h"
66
#include "llvm/ADT/StringRef.h"
7-
87
#include <string>
8+
99
namespace swift {
10+
1011
struct CXXMethodBridging {
1112
enum class Kind { unknown, getter, setter, subscript };
1213

@@ -165,5 +166,7 @@ struct CXXMethodBridging {
165166
loweredName == "get" || loweredName == "set";
166167
}
167168
};
169+
168170
} // namespace swift
171+
169172
#endif // SWIFT_CXXMETHODBRIDGING_H

lib/ClangImporter/ImportDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
//===----------------------------------------------------------------------===//
1616

1717
#include "CFTypeInfo.h"
18+
#include "CXXMethodBridging.h"
1819
#include "ClangDerivedConformances.h"
1920
#include "ImporterImpl.h"
2021
#include "SwiftDeclSynthesizer.h"
@@ -50,7 +51,6 @@
5051
#include "swift/Basic/Statistic.h"
5152
#include "swift/Basic/StringExtras.h"
5253
#include "swift/Basic/Version.h"
53-
#include "swift/ClangImporter/CXXMethodBridging.h"
5454
#include "swift/ClangImporter/ClangImporter.h"
5555
#include "swift/ClangImporter/ClangImporterRequests.h"
5656
#include "swift/ClangImporter/ClangModule.h"

lib/ClangImporter/SwiftDeclSynthesizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#include "CXXMethodBridging.h"
1314
#include "SwiftDeclSynthesizer.h"
1415
#include "swift/AST/ASTMangler.h"
1516
#include "swift/AST/AttrKind.h"
@@ -20,7 +21,6 @@
2021
#include "swift/AST/Pattern.h"
2122
#include "swift/AST/Stmt.h"
2223
#include "swift/Basic/Assertions.h"
23-
#include "swift/ClangImporter/CXXMethodBridging.h"
2424
#include "clang/AST/Mangle.h"
2525
#include "clang/Sema/DelayedDiagnostic.h"
2626

0 commit comments

Comments
 (0)