forked from OSchip/llvm-project
[Driver] Use VFS to check if sanitizer blacklists exist
Summary:
This is a follow-up to 590f279c45
, 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
This commit is contained in:
parent
6821a3ccd6
commit
ba6f906854
|
@ -20,7 +20,7 @@ SanitizerSpecialCaseList::create(const std::vector<std::string> &Paths,
|
||||||
std::string &Error) {
|
std::string &Error) {
|
||||||
std::unique_ptr<clang::SanitizerSpecialCaseList> SSCL(
|
std::unique_ptr<clang::SanitizerSpecialCaseList> SSCL(
|
||||||
new SanitizerSpecialCaseList());
|
new SanitizerSpecialCaseList());
|
||||||
if (SSCL->createInternal(Paths, Error, VFS)) {
|
if (SSCL->createInternal(Paths, VFS, Error)) {
|
||||||
SSCL->createSanitizerSections();
|
SSCL->createSanitizerSections();
|
||||||
return SSCL;
|
return SSCL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,10 +17,13 @@ XRayFunctionFilter::XRayFunctionFilter(
|
||||||
ArrayRef<std::string> AlwaysInstrumentPaths,
|
ArrayRef<std::string> AlwaysInstrumentPaths,
|
||||||
ArrayRef<std::string> NeverInstrumentPaths,
|
ArrayRef<std::string> NeverInstrumentPaths,
|
||||||
ArrayRef<std::string> AttrListPaths, SourceManager &SM)
|
ArrayRef<std::string> AttrListPaths, SourceManager &SM)
|
||||||
: AlwaysInstrument(
|
: AlwaysInstrument(llvm::SpecialCaseList::createOrDie(
|
||||||
llvm::SpecialCaseList::createOrDie(AlwaysInstrumentPaths)),
|
AlwaysInstrumentPaths, SM.getFileManager().getVirtualFileSystem())),
|
||||||
NeverInstrument(llvm::SpecialCaseList::createOrDie(NeverInstrumentPaths)),
|
NeverInstrument(llvm::SpecialCaseList::createOrDie(
|
||||||
AttrList(llvm::SpecialCaseList::createOrDie(AttrListPaths)), SM(SM) {}
|
NeverInstrumentPaths, SM.getFileManager().getVirtualFileSystem())),
|
||||||
|
AttrList(llvm::SpecialCaseList::createOrDie(
|
||||||
|
AttrListPaths, SM.getFileManager().getVirtualFileSystem())),
|
||||||
|
SM(SM) {}
|
||||||
|
|
||||||
XRayFunctionFilter::ImbueAttribute
|
XRayFunctionFilter::ImbueAttribute
|
||||||
XRayFunctionFilter::shouldImbueFunction(StringRef FunctionName) const {
|
XRayFunctionFilter::shouldImbueFunction(StringRef FunctionName) const {
|
||||||
|
|
|
@ -141,7 +141,7 @@ static void addDefaultBlacklists(const Driver &D, SanitizerMask Kinds,
|
||||||
|
|
||||||
clang::SmallString<64> Path(D.ResourceDir);
|
clang::SmallString<64> Path(D.ResourceDir);
|
||||||
llvm::sys::path::append(Path, "share", BL.File);
|
llvm::sys::path::append(Path, "share", BL.File);
|
||||||
if (llvm::sys::fs::exists(Path))
|
if (D.getVFS().exists(Path))
|
||||||
BlacklistFiles.push_back(Path.str());
|
BlacklistFiles.push_back(Path.str());
|
||||||
else if (BL.Mask == SanitizerKind::CFI)
|
else if (BL.Mask == SanitizerKind::CFI)
|
||||||
// If cfi_blacklist.txt cannot be found in the resource dir, driver
|
// If cfi_blacklist.txt cannot be found in the resource dir, driver
|
||||||
|
@ -563,7 +563,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
|
||||||
if (Arg->getOption().matches(options::OPT_fsanitize_blacklist)) {
|
if (Arg->getOption().matches(options::OPT_fsanitize_blacklist)) {
|
||||||
Arg->claim();
|
Arg->claim();
|
||||||
std::string BLPath = Arg->getValue();
|
std::string BLPath = Arg->getValue();
|
||||||
if (llvm::sys::fs::exists(BLPath)) {
|
if (D.getVFS().exists(BLPath)) {
|
||||||
UserBlacklistFiles.push_back(BLPath);
|
UserBlacklistFiles.push_back(BLPath);
|
||||||
} else {
|
} else {
|
||||||
D.Diag(clang::diag::err_drv_no_such_file) << BLPath;
|
D.Diag(clang::diag::err_drv_no_such_file) << BLPath;
|
||||||
|
@ -578,14 +578,14 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
|
||||||
{
|
{
|
||||||
std::string BLError;
|
std::string BLError;
|
||||||
std::unique_ptr<llvm::SpecialCaseList> SCL(
|
std::unique_ptr<llvm::SpecialCaseList> SCL(
|
||||||
llvm::SpecialCaseList::create(UserBlacklistFiles, BLError));
|
llvm::SpecialCaseList::create(UserBlacklistFiles, D.getVFS(), BLError));
|
||||||
if (!SCL.get())
|
if (!SCL.get())
|
||||||
D.Diag(clang::diag::err_drv_malformed_sanitizer_blacklist) << BLError;
|
D.Diag(clang::diag::err_drv_malformed_sanitizer_blacklist) << BLError;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
std::string BLError;
|
std::string BLError;
|
||||||
std::unique_ptr<llvm::SpecialCaseList> SCL(
|
std::unique_ptr<llvm::SpecialCaseList> SCL(llvm::SpecialCaseList::create(
|
||||||
llvm::SpecialCaseList::create(SystemBlacklistFiles, BLError));
|
SystemBlacklistFiles, D.getVFS(), BLError));
|
||||||
if (!SCL.get())
|
if (!SCL.get())
|
||||||
D.Diag(clang::diag::err_drv_malformed_sanitizer_blacklist) << BLError;
|
D.Diag(clang::diag::err_drv_malformed_sanitizer_blacklist) << BLError;
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,7 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {
|
||||||
// are treated as actual dependencies.
|
// are treated as actual dependencies.
|
||||||
for (const auto &Filename :
|
for (const auto &Filename :
|
||||||
Args.getAllArgValues(options::OPT_fxray_always_instrument)) {
|
Args.getAllArgValues(options::OPT_fxray_always_instrument)) {
|
||||||
if (llvm::sys::fs::exists(Filename)) {
|
if (D.getVFS().exists(Filename)) {
|
||||||
AlwaysInstrumentFiles.push_back(Filename);
|
AlwaysInstrumentFiles.push_back(Filename);
|
||||||
ExtraDeps.push_back(Filename);
|
ExtraDeps.push_back(Filename);
|
||||||
} else
|
} else
|
||||||
|
@ -138,7 +138,7 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {
|
||||||
|
|
||||||
for (const auto &Filename :
|
for (const auto &Filename :
|
||||||
Args.getAllArgValues(options::OPT_fxray_never_instrument)) {
|
Args.getAllArgValues(options::OPT_fxray_never_instrument)) {
|
||||||
if (llvm::sys::fs::exists(Filename)) {
|
if (D.getVFS().exists(Filename)) {
|
||||||
NeverInstrumentFiles.push_back(Filename);
|
NeverInstrumentFiles.push_back(Filename);
|
||||||
ExtraDeps.push_back(Filename);
|
ExtraDeps.push_back(Filename);
|
||||||
} else
|
} else
|
||||||
|
@ -147,7 +147,7 @@ XRayArgs::XRayArgs(const ToolChain &TC, const ArgList &Args) {
|
||||||
|
|
||||||
for (const auto &Filename :
|
for (const auto &Filename :
|
||||||
Args.getAllArgValues(options::OPT_fxray_attr_list)) {
|
Args.getAllArgValues(options::OPT_fxray_attr_list)) {
|
||||||
if (llvm::sys::fs::exists(Filename)) {
|
if (D.getVFS().exists(Filename)) {
|
||||||
AttrListFiles.push_back(Filename);
|
AttrListFiles.push_back(Filename);
|
||||||
ExtraDeps.push_back(Filename);
|
ExtraDeps.push_back(Filename);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -9,10 +9,12 @@ add_clang_unittest(ClangDriverTests
|
||||||
ToolChainTest.cpp
|
ToolChainTest.cpp
|
||||||
ModuleCacheTest.cpp
|
ModuleCacheTest.cpp
|
||||||
MultilibTest.cpp
|
MultilibTest.cpp
|
||||||
|
SanitizerArgsTest.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
clang_target_link_libraries(ClangDriverTests
|
clang_target_link_libraries(ClangDriverTests
|
||||||
PRIVATE
|
PRIVATE
|
||||||
clangDriver
|
clangDriver
|
||||||
clangBasic
|
clangBasic
|
||||||
|
clangFrontend # For TextDiagnosticPrinter.
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,141 @@
|
||||||
|
//===- unittests/Driver/SanitizerArgsTest.cpp -----------------------------===//
|
||||||
|
//
|
||||||
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||||
|
// See https://llvm.org/LICENSE.txt for license information.
|
||||||
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||||
|
//
|
||||||
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#include "clang/Basic/Diagnostic.h"
|
||||||
|
#include "clang/Basic/DiagnosticIDs.h"
|
||||||
|
#include "clang/Basic/DiagnosticOptions.h"
|
||||||
|
#include "clang/Driver/Compilation.h"
|
||||||
|
#include "clang/Driver/Driver.h"
|
||||||
|
#include "clang/Driver/Job.h"
|
||||||
|
#include "clang/Frontend/TextDiagnosticPrinter.h"
|
||||||
|
#include "llvm/ADT/ArrayRef.h"
|
||||||
|
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
||||||
|
#include "llvm/ADT/Optional.h"
|
||||||
|
#include "llvm/ADT/SmallString.h"
|
||||||
|
#include "llvm/ADT/StringRef.h"
|
||||||
|
#include "llvm/Support/Host.h"
|
||||||
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
|
#include "llvm/Support/Path.h"
|
||||||
|
#include "llvm/Support/VirtualFileSystem.h"
|
||||||
|
#include "llvm/Support/raw_ostream.h"
|
||||||
|
#include "gmock/gmock.h"
|
||||||
|
#include "gtest/gtest.h"
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
using namespace clang;
|
||||||
|
using namespace clang::driver;
|
||||||
|
|
||||||
|
using ::testing::Contains;
|
||||||
|
using ::testing::StrEq;
|
||||||
|
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
static constexpr const char *ClangBinary = "clang";
|
||||||
|
static constexpr const char *InputFile = "/sources/foo.c";
|
||||||
|
|
||||||
|
std::string concatPaths(llvm::ArrayRef<StringRef> Components) {
|
||||||
|
llvm::SmallString<128> P;
|
||||||
|
for (StringRef C : Components)
|
||||||
|
llvm::sys::path::append(P, C);
|
||||||
|
return P.str().str();
|
||||||
|
}
|
||||||
|
|
||||||
|
class SanitizerArgsTest : public ::testing::Test {
|
||||||
|
protected:
|
||||||
|
const Command &emulateSingleCompilation(std::vector<std::string> ExtraArgs,
|
||||||
|
std::vector<std::string> ExtraFiles) {
|
||||||
|
assert(!Driver && "Running twice is not allowed");
|
||||||
|
|
||||||
|
llvm::IntrusiveRefCntPtr<DiagnosticOptions> Opts = new DiagnosticOptions;
|
||||||
|
DiagnosticsEngine Diags(
|
||||||
|
new DiagnosticIDs, Opts,
|
||||||
|
new TextDiagnosticPrinter(llvm::errs(), Opts.get()));
|
||||||
|
Driver.emplace(ClangBinary, "x86_64-unknown-linux-gnu", Diags,
|
||||||
|
prepareFS(ExtraFiles));
|
||||||
|
|
||||||
|
std::vector<const char *> Args = {ClangBinary};
|
||||||
|
for (const auto &A : ExtraArgs)
|
||||||
|
Args.push_back(A.c_str());
|
||||||
|
Args.push_back("-c");
|
||||||
|
Args.push_back(InputFile);
|
||||||
|
|
||||||
|
Compilation.reset(Driver->BuildCompilation(Args));
|
||||||
|
|
||||||
|
if (Diags.hasErrorOccurred())
|
||||||
|
ADD_FAILURE() << "Error occurred while parsing compilation arguments. "
|
||||||
|
"See stderr for details.";
|
||||||
|
|
||||||
|
const auto &Commands = Compilation->getJobs().getJobs();
|
||||||
|
assert(Commands.size() == 1);
|
||||||
|
return *Commands.front();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem>
|
||||||
|
prepareFS(llvm::ArrayRef<std::string> ExtraFiles) {
|
||||||
|
llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> FS =
|
||||||
|
new llvm::vfs::InMemoryFileSystem;
|
||||||
|
FS->addFile(ClangBinary, time_t(), llvm::MemoryBuffer::getMemBuffer(""));
|
||||||
|
FS->addFile(InputFile, time_t(), llvm::MemoryBuffer::getMemBuffer(""));
|
||||||
|
for (llvm::StringRef F : ExtraFiles)
|
||||||
|
FS->addFile(F, time_t(), llvm::MemoryBuffer::getMemBuffer(""));
|
||||||
|
return FS;
|
||||||
|
}
|
||||||
|
|
||||||
|
llvm::Optional<Driver> Driver;
|
||||||
|
std::unique_ptr<driver::Compilation> Compilation;
|
||||||
|
};
|
||||||
|
|
||||||
|
TEST_F(SanitizerArgsTest, Blacklists) {
|
||||||
|
const std::string ResourceDir = "/opt/llvm/lib/resources";
|
||||||
|
const std::string UserBlacklist = "/source/my_blacklist.txt";
|
||||||
|
const std::string ASanBlacklist =
|
||||||
|
concatPaths({ResourceDir, "share", "asan_blacklist.txt"});
|
||||||
|
|
||||||
|
auto &Command = emulateSingleCompilation(
|
||||||
|
/*ExtraArgs=*/{"-fsanitize=address", "-resource-dir", ResourceDir,
|
||||||
|
std::string("-fsanitize-blacklist=") + UserBlacklist},
|
||||||
|
/*ExtraFiles=*/{ASanBlacklist, UserBlacklist});
|
||||||
|
|
||||||
|
// System blacklists are added based on resource-dir.
|
||||||
|
EXPECT_THAT(Command.getArguments(),
|
||||||
|
Contains(StrEq(std::string("-fsanitize-system-blacklist=") +
|
||||||
|
ASanBlacklist)));
|
||||||
|
// User blacklists should also be added.
|
||||||
|
EXPECT_THAT(
|
||||||
|
Command.getArguments(),
|
||||||
|
Contains(StrEq(std::string("-fsanitize-blacklist=") + UserBlacklist)));
|
||||||
|
}
|
||||||
|
|
||||||
|
TEST_F(SanitizerArgsTest, XRayLists) {
|
||||||
|
const std::string XRayWhitelist = "/source/xray_whitelist.txt";
|
||||||
|
const std::string XRayBlacklist = "/source/xray_blacklist.txt";
|
||||||
|
const std::string XRayAttrList = "/source/xray_attr_list.txt";
|
||||||
|
|
||||||
|
auto &Command = emulateSingleCompilation(
|
||||||
|
/*ExtraArgs=*/
|
||||||
|
{
|
||||||
|
"-fxray-instrument",
|
||||||
|
"-fxray-always-instrument=" + XRayWhitelist,
|
||||||
|
"-fxray-never-instrument=" + XRayBlacklist,
|
||||||
|
"-fxray-attr-list=" + XRayAttrList,
|
||||||
|
},
|
||||||
|
/*ExtraFiles=*/{XRayWhitelist, XRayBlacklist, XRayAttrList});
|
||||||
|
|
||||||
|
// Blacklists exist in the filesystem, so they should be added to the
|
||||||
|
// compilation command, produced by the driver.
|
||||||
|
EXPECT_THAT(Command.getArguments(),
|
||||||
|
Contains(StrEq("-fxray-always-instrument=" + XRayWhitelist)));
|
||||||
|
EXPECT_THAT(Command.getArguments(),
|
||||||
|
Contains(StrEq("-fxray-never-instrument=" + XRayBlacklist)));
|
||||||
|
EXPECT_THAT(Command.getArguments(),
|
||||||
|
Contains(StrEq("-fxray-attr-list=" + XRayAttrList)));
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace
|
|
@ -69,7 +69,8 @@ public:
|
||||||
/// Parses the special case list entries from files. On failure, returns
|
/// Parses the special case list entries from files. On failure, returns
|
||||||
/// 0 and writes an error message to string.
|
/// 0 and writes an error message to string.
|
||||||
static std::unique_ptr<SpecialCaseList>
|
static std::unique_ptr<SpecialCaseList>
|
||||||
create(const std::vector<std::string> &Paths, std::string &Error);
|
create(const std::vector<std::string> &Paths, llvm::vfs::FileSystem &FS,
|
||||||
|
std::string &Error);
|
||||||
/// Parses the special case list from a memory buffer. On failure, returns
|
/// Parses the special case list from a memory buffer. On failure, returns
|
||||||
/// 0 and writes an error message to string.
|
/// 0 and writes an error message to string.
|
||||||
static std::unique_ptr<SpecialCaseList> create(const MemoryBuffer *MB,
|
static std::unique_ptr<SpecialCaseList> create(const MemoryBuffer *MB,
|
||||||
|
@ -77,7 +78,7 @@ public:
|
||||||
/// Parses the special case list entries from files. On failure, reports a
|
/// Parses the special case list entries from files. On failure, reports a
|
||||||
/// fatal error.
|
/// fatal error.
|
||||||
static std::unique_ptr<SpecialCaseList>
|
static std::unique_ptr<SpecialCaseList>
|
||||||
createOrDie(const std::vector<std::string> &Paths);
|
createOrDie(const std::vector<std::string> &Paths, llvm::vfs::FileSystem &FS);
|
||||||
|
|
||||||
~SpecialCaseList();
|
~SpecialCaseList();
|
||||||
|
|
||||||
|
@ -103,8 +104,8 @@ public:
|
||||||
protected:
|
protected:
|
||||||
// Implementations of the create*() functions that can also be used by derived
|
// Implementations of the create*() functions that can also be used by derived
|
||||||
// classes.
|
// classes.
|
||||||
bool createInternal(const std::vector<std::string> &Paths, std::string &Error,
|
bool createInternal(const std::vector<std::string> &Paths,
|
||||||
vfs::FileSystem &VFS = *vfs::getRealFileSystem());
|
vfs::FileSystem &VFS, std::string &Error);
|
||||||
bool createInternal(const MemoryBuffer *MB, std::string &Error);
|
bool createInternal(const MemoryBuffer *MB, std::string &Error);
|
||||||
|
|
||||||
SpecialCaseList() = default;
|
SpecialCaseList() = default;
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "llvm/ADT/StringExtras.h"
|
#include "llvm/ADT/StringExtras.h"
|
||||||
#include "llvm/Support/MemoryBuffer.h"
|
#include "llvm/Support/MemoryBuffer.h"
|
||||||
#include "llvm/Support/Regex.h"
|
#include "llvm/Support/Regex.h"
|
||||||
|
#include "llvm/Support/VirtualFileSystem.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <system_error>
|
#include <system_error>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
@ -71,9 +72,9 @@ unsigned SpecialCaseList::Matcher::match(StringRef Query) const {
|
||||||
|
|
||||||
std::unique_ptr<SpecialCaseList>
|
std::unique_ptr<SpecialCaseList>
|
||||||
SpecialCaseList::create(const std::vector<std::string> &Paths,
|
SpecialCaseList::create(const std::vector<std::string> &Paths,
|
||||||
std::string &Error) {
|
llvm::vfs::FileSystem &FS, std::string &Error) {
|
||||||
std::unique_ptr<SpecialCaseList> SCL(new SpecialCaseList());
|
std::unique_ptr<SpecialCaseList> SCL(new SpecialCaseList());
|
||||||
if (SCL->createInternal(Paths, Error))
|
if (SCL->createInternal(Paths, FS, Error))
|
||||||
return SCL;
|
return SCL;
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
@ -87,15 +88,16 @@ std::unique_ptr<SpecialCaseList> SpecialCaseList::create(const MemoryBuffer *MB,
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<SpecialCaseList>
|
std::unique_ptr<SpecialCaseList>
|
||||||
SpecialCaseList::createOrDie(const std::vector<std::string> &Paths) {
|
SpecialCaseList::createOrDie(const std::vector<std::string> &Paths,
|
||||||
|
llvm::vfs::FileSystem &FS) {
|
||||||
std::string Error;
|
std::string Error;
|
||||||
if (auto SCL = create(Paths, Error))
|
if (auto SCL = create(Paths, FS, Error))
|
||||||
return SCL;
|
return SCL;
|
||||||
report_fatal_error(Error);
|
report_fatal_error(Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SpecialCaseList::createInternal(const std::vector<std::string> &Paths,
|
bool SpecialCaseList::createInternal(const std::vector<std::string> &Paths,
|
||||||
std::string &Error, vfs::FileSystem &VFS) {
|
vfs::FileSystem &VFS, std::string &Error) {
|
||||||
StringMap<size_t> Sections;
|
StringMap<size_t> Sections;
|
||||||
for (const auto &Path : Paths) {
|
for (const auto &Path : Paths) {
|
||||||
ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
|
ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
|
||||||
|
|
|
@ -88,6 +88,7 @@
|
||||||
#include "llvm/Support/CommandLine.h"
|
#include "llvm/Support/CommandLine.h"
|
||||||
#include "llvm/Support/ErrorHandling.h"
|
#include "llvm/Support/ErrorHandling.h"
|
||||||
#include "llvm/Support/SpecialCaseList.h"
|
#include "llvm/Support/SpecialCaseList.h"
|
||||||
|
#include "llvm/Support/VirtualFileSystem.h"
|
||||||
#include "llvm/Transforms/Instrumentation.h"
|
#include "llvm/Transforms/Instrumentation.h"
|
||||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||||
#include "llvm/Transforms/Utils/Local.h"
|
#include "llvm/Transforms/Utils/Local.h"
|
||||||
|
@ -480,7 +481,9 @@ DataFlowSanitizer::DataFlowSanitizer(
|
||||||
std::vector<std::string> AllABIListFiles(std::move(ABIListFiles));
|
std::vector<std::string> AllABIListFiles(std::move(ABIListFiles));
|
||||||
AllABIListFiles.insert(AllABIListFiles.end(), ClABIListFiles.begin(),
|
AllABIListFiles.insert(AllABIListFiles.end(), ClABIListFiles.begin(),
|
||||||
ClABIListFiles.end());
|
ClABIListFiles.end());
|
||||||
ABIList.set(SpecialCaseList::createOrDie(AllABIListFiles));
|
// FIXME: should we propagate vfs::FileSystem to this constructor?
|
||||||
|
ABIList.set(
|
||||||
|
SpecialCaseList::createOrDie(AllABIListFiles, *vfs::getRealFileSystem()));
|
||||||
}
|
}
|
||||||
|
|
||||||
FunctionType *DataFlowSanitizer::getArgsFunctionType(FunctionType *T) {
|
FunctionType *DataFlowSanitizer::getArgsFunctionType(FunctionType *T) {
|
||||||
|
|
Loading…
Reference in New Issue