Skip to content

Commit 03e3800

Browse files
committed
Add missing isPCHFilenameExtension declaration
1 parent bceb82e commit 03e3800

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

lib/ClangImporter/ClangImporter.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,19 @@ getWasiLibcModuleMapPath(SearchPathOptions& Opts, llvm::Triple triple,
513513
return None;
514514
}
515515

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+
516529
void
517530
importer::getNormalInvocationArguments(
518531
std::vector<std::string> &invocationArgStrs,

0 commit comments

Comments
 (0)