File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
include/swift/ClangImporter Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -194,6 +194,8 @@ class ClangImporter final : public ClangModuleLoader {
194
194
IntermoduleDepTrackingMode Mode,
195
195
std::shared_ptr<llvm::FileCollectorBase> FileCollector);
196
196
197
+ static bool isKnownCFTypeName (llvm::StringRef name);
198
+
197
199
// / Append visible module names to \p names. Note that names are possibly
198
200
// / duplicated, and not guaranteed to be ordered in any way.
199
201
void collectVisibleTopLevelModuleNames (
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ static constexpr const llvm::StringLiteral KnownCFTypes[] = {
43
43
const size_t NumKnownCFTypes = sizeof (KnownCFTypes) / sizeof (*KnownCFTypes);
44
44
45
45
// / Maintain a set of known CF types.
46
- static bool isKnownCFTypeName (StringRef name) {
46
+ bool CFPointeeInfo:: isKnownCFTypeName (StringRef name) {
47
47
return std::binary_search (KnownCFTypes, KnownCFTypes + NumKnownCFTypes,
48
48
name, SortByLengthComparator ());
49
49
}
Original file line number Diff line number Diff line change @@ -77,6 +77,8 @@ class CFPointeeInfo {
77
77
public:
78
78
static CFPointeeInfo classifyTypedef (const clang::TypedefNameDecl *decl);
79
79
80
+ static bool isKnownCFTypeName (llvm::StringRef name);
81
+
80
82
bool isValid () const { return IsValid; }
81
83
explicit operator bool () const { return isValid (); }
82
84
Original file line number Diff line number Diff line change 14
14
//
15
15
// ===----------------------------------------------------------------------===//
16
16
#include " swift/ClangImporter/ClangImporter.h"
17
+ #include " CFTypeInfo.h"
17
18
#include " ClangDerivedConformances.h"
18
19
#include " ClangDiagnosticConsumer.h"
19
20
#include " ClangIncludePaths.h"
@@ -403,6 +404,10 @@ ClangImporter::createDependencyCollector(
403
404
FileCollector);
404
405
}
405
406
407
+ bool ClangImporter::isKnownCFTypeName (llvm::StringRef name) {
408
+ return CFPointeeInfo::isKnownCFTypeName (name);
409
+ }
410
+
406
411
void ClangImporter::Implementation::addBridgeHeaderTopLevelDecls (
407
412
clang::Decl *D) {
408
413
if (shouldIgnoreBridgeHeaderTopLevelDecl (D))
You can’t perform that action at this time.
0 commit comments