diff options
author | Ilya Biryukov <ibiryukov@google.com> | 2019-11-21 11:32:17 +0100 |
---|---|---|
committer | Ilya Biryukov <ibiryukov@google.com> | 2019-11-21 11:56:09 +0100 |
commit | aa981c1802d7353c777e399f2568e5a0e12dea21 (patch) | |
tree | 988917b64870affe5a5259fa9232419f1fac0ece /clang/lib/Basic/XRayLists.cpp | |
parent | f65cfff605f2fd802fc337c6152474e3f3d22a1c (diff) | |
download | bcm5719-llvm-aa981c1802d7353c777e399f2568e5a0e12dea21.tar.gz bcm5719-llvm-aa981c1802d7353c777e399f2568e5a0e12dea21.zip |
Reland 9f3fdb0d7fab: [Driver] Use VFS to check if sanitizer blacklists exist
With updates to various LLVM tools that use SpecialCastList.
It was tempting to use RealFileSystem as the default, but that makes it
too easy to accidentally forget passing VFS in clang code.
Diffstat (limited to 'clang/lib/Basic/XRayLists.cpp')
-rw-r--r-- | clang/lib/Basic/XRayLists.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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 { |