diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2019-11-21 10:54:10 +0100 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2019-11-21 11:00:30 +0100 |
commit | ba6f906854263375cff3257d22d241a8a259cf77 (patch) | |
tree | 08e0cca9203362e69caa63553377e9f1d341da71 /clang/lib/Basic | |
parent | 6821a3ccd69f2b3a92fe0c4f4276b72389cd4c76 (diff) | |
download | bcm5719-llvm-ba6f906854263375cff3257d22d241a8a259cf77.tar.gz bcm5719-llvm-ba6f906854263375cff3257d22d241a8a259cf77.zip |
[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
Diffstat (limited to 'clang/lib/Basic')
-rw-r--r-- | clang/lib/Basic/SanitizerSpecialCaseList.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Basic/XRayLists.cpp | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/clang/lib/Basic/SanitizerSpecialCaseList.cpp b/clang/lib/Basic/SanitizerSpecialCaseList.cpp index 7a820d4bef8..5bf8d39ffd9 100644 --- a/clang/lib/Basic/SanitizerSpecialCaseList.cpp +++ b/clang/lib/Basic/SanitizerSpecialCaseList.cpp @@ -20,7 +20,7 @@ SanitizerSpecialCaseList::create(const std::vector<std::string> &Paths, 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 eb549436710..222a28f79cc 100644 --- a/clang/lib/Basic/XRayLists.cpp +++ b/clang/lib/Basic/XRayLists.cpp @@ -17,10 +17,13 @@ XRayFunctionFilter::XRayFunctionFilter( 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 { |