[Driver] Use VFS to check if sanitizer blacklists exist
Summary:
This is a follow-up to 590f279c456bbde632eca8ef89a85c478f15a249, which
moved some of the callers to use VFS.
It turned out more code in Driver calls into real filesystem APIs and
also needs an update.
Reviewers: gribozavr2, kadircet
Reviewed By: kadircet
Subscribers: ormris, mgorny, hiraditya, llvm-commits, jkorous, cfe-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D70440
diff --git a/clang/lib/Basic/SanitizerSpecialCaseList.cpp b/clang/lib/Basic/SanitizerSpecialCaseList.cpp
index 7a820d4..5bf8d39 100644
--- a/clang/lib/Basic/SanitizerSpecialCaseList.cpp
+++ b/clang/lib/Basic/SanitizerSpecialCaseList.cpp
@@ -20,7 +20,7 @@
std::string &Error) {
std::unique_ptr<clang::SanitizerSpecialCaseList> SSCL(
new SanitizerSpecialCaseList());
- if (SSCL->createInternal(Paths, Error, VFS)) {
+ if (SSCL->createInternal(Paths, VFS, Error)) {
SSCL->createSanitizerSections();
return SSCL;
}
diff --git a/clang/lib/Basic/XRayLists.cpp b/clang/lib/Basic/XRayLists.cpp
index eb54943..222a28f 100644
--- a/clang/lib/Basic/XRayLists.cpp
+++ b/clang/lib/Basic/XRayLists.cpp
@@ -17,10 +17,13 @@
ArrayRef<std::string> AlwaysInstrumentPaths,
ArrayRef<std::string> NeverInstrumentPaths,
ArrayRef<std::string> AttrListPaths, SourceManager &SM)
- : AlwaysInstrument(
- llvm::SpecialCaseList::createOrDie(AlwaysInstrumentPaths)),
- NeverInstrument(llvm::SpecialCaseList::createOrDie(NeverInstrumentPaths)),
- AttrList(llvm::SpecialCaseList::createOrDie(AttrListPaths)), SM(SM) {}
+ : AlwaysInstrument(llvm::SpecialCaseList::createOrDie(
+ AlwaysInstrumentPaths, SM.getFileManager().getVirtualFileSystem())),
+ NeverInstrument(llvm::SpecialCaseList::createOrDie(
+ NeverInstrumentPaths, SM.getFileManager().getVirtualFileSystem())),
+ AttrList(llvm::SpecialCaseList::createOrDie(
+ AttrListPaths, SM.getFileManager().getVirtualFileSystem())),
+ SM(SM) {}
XRayFunctionFilter::ImbueAttribute
XRayFunctionFilter::shouldImbueFunction(StringRef FunctionName) const {