Skip to content

Commit b8172b0

Browse files
committed
Fix clangSupportsPragmaAttributeWithSwiftAttr
1 parent 03e3800 commit b8172b0

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,11 @@ static bool clangSupportsPragmaAttributeWithSwiftAttr() {
477477
return swiftAttrParsedInfo.IsSupportedByPragmaAttribute;
478478
}
479479

480+
static inline bool isPCHFilenameExtension(StringRef path) {
481+
return llvm::sys::path::extension(path)
482+
.endswith(file_types::getExtension(file_types::TY_PCH));
483+
}
484+
480485
static Optional<StringRef>
481486
getWasiLibcModuleMapPath(SearchPathOptions& Opts, llvm::Triple triple,
482487
SmallVectorImpl<char> &buffer) {
@@ -513,19 +518,6 @@ getWasiLibcModuleMapPath(SearchPathOptions& Opts, llvm::Triple triple,
513518
return None;
514519
}
515520

516-
static bool clangSupportsPragmaAttributeWithSwiftAttr() {
517-
clang::AttributeCommonInfo swiftAttrInfo(clang::SourceRange(),
518-
clang::AttributeCommonInfo::AT_SwiftAttr,
519-
clang::AttributeCommonInfo::AS_GNU);
520-
auto swiftAttrParsedInfo = clang::ParsedAttrInfo::get(swiftAttrInfo);
521-
return swiftAttrParsedInfo.IsSupportedByPragmaAttribute;
522-
}
523-
524-
static inline bool isPCHFilenameExtension(StringRef path) {
525-
return llvm::sys::path::extension(path)
526-
.endswith(file_types::getExtension(file_types::TY_PCH));
527-
}
528-
529521
void
530522
importer::getNormalInvocationArguments(
531523
std::vector<std::string> &invocationArgStrs,

0 commit comments

Comments
 (0)