mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
Revert "[Driver] Use VFS to check if sanitizer blacklists exist"
This reverts commit ba6f906854263375cff3257d22d241a8a259cf77. Commit caused compilation errors on llvm tests. Will fix and re-land.
This commit is contained in:
parent
6cbd2973fc
commit
bea2bb8fa3
@ -69,8 +69,7 @@ public:
|
||||
/// Parses the special case list entries from files. On failure, returns
|
||||
/// 0 and writes an error message to string.
|
||||
static std::unique_ptr<SpecialCaseList>
|
||||
create(const std::vector<std::string> &Paths, llvm::vfs::FileSystem &FS,
|
||||
std::string &Error);
|
||||
create(const std::vector<std::string> &Paths, std::string &Error);
|
||||
/// Parses the special case list from a memory buffer. On failure, returns
|
||||
/// 0 and writes an error message to string.
|
||||
static std::unique_ptr<SpecialCaseList> create(const MemoryBuffer *MB,
|
||||
@ -78,7 +77,7 @@ public:
|
||||
/// Parses the special case list entries from files. On failure, reports a
|
||||
/// fatal error.
|
||||
static std::unique_ptr<SpecialCaseList>
|
||||
createOrDie(const std::vector<std::string> &Paths, llvm::vfs::FileSystem &FS);
|
||||
createOrDie(const std::vector<std::string> &Paths);
|
||||
|
||||
~SpecialCaseList();
|
||||
|
||||
@ -104,8 +103,8 @@ public:
|
||||
protected:
|
||||
// Implementations of the create*() functions that can also be used by derived
|
||||
// classes.
|
||||
bool createInternal(const std::vector<std::string> &Paths,
|
||||
vfs::FileSystem &VFS, std::string &Error);
|
||||
bool createInternal(const std::vector<std::string> &Paths, std::string &Error,
|
||||
vfs::FileSystem &VFS = *vfs::getRealFileSystem());
|
||||
bool createInternal(const MemoryBuffer *MB, std::string &Error);
|
||||
|
||||
SpecialCaseList() = default;
|
||||
|
@ -18,7 +18,6 @@
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/Support/MemoryBuffer.h"
|
||||
#include "llvm/Support/Regex.h"
|
||||
#include "llvm/Support/VirtualFileSystem.h"
|
||||
#include <string>
|
||||
#include <system_error>
|
||||
#include <utility>
|
||||
@ -72,9 +71,9 @@ unsigned SpecialCaseList::Matcher::match(StringRef Query) const {
|
||||
|
||||
std::unique_ptr<SpecialCaseList>
|
||||
SpecialCaseList::create(const std::vector<std::string> &Paths,
|
||||
llvm::vfs::FileSystem &FS, std::string &Error) {
|
||||
std::string &Error) {
|
||||
std::unique_ptr<SpecialCaseList> SCL(new SpecialCaseList());
|
||||
if (SCL->createInternal(Paths, FS, Error))
|
||||
if (SCL->createInternal(Paths, Error))
|
||||
return SCL;
|
||||
return nullptr;
|
||||
}
|
||||
@ -88,16 +87,15 @@ std::unique_ptr<SpecialCaseList> SpecialCaseList::create(const MemoryBuffer *MB,
|
||||
}
|
||||
|
||||
std::unique_ptr<SpecialCaseList>
|
||||
SpecialCaseList::createOrDie(const std::vector<std::string> &Paths,
|
||||
llvm::vfs::FileSystem &FS) {
|
||||
SpecialCaseList::createOrDie(const std::vector<std::string> &Paths) {
|
||||
std::string Error;
|
||||
if (auto SCL = create(Paths, FS, Error))
|
||||
if (auto SCL = create(Paths, Error))
|
||||
return SCL;
|
||||
report_fatal_error(Error);
|
||||
}
|
||||
|
||||
bool SpecialCaseList::createInternal(const std::vector<std::string> &Paths,
|
||||
vfs::FileSystem &VFS, std::string &Error) {
|
||||
std::string &Error, vfs::FileSystem &VFS) {
|
||||
StringMap<size_t> Sections;
|
||||
for (const auto &Path : Paths) {
|
||||
ErrorOr<std::unique_ptr<MemoryBuffer>> FileOrErr =
|
||||
|
@ -88,7 +88,6 @@
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Support/SpecialCaseList.h"
|
||||
#include "llvm/Support/VirtualFileSystem.h"
|
||||
#include "llvm/Transforms/Instrumentation.h"
|
||||
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
|
||||
#include "llvm/Transforms/Utils/Local.h"
|
||||
@ -481,9 +480,7 @@ DataFlowSanitizer::DataFlowSanitizer(
|
||||
std::vector<std::string> AllABIListFiles(std::move(ABIListFiles));
|
||||
AllABIListFiles.insert(AllABIListFiles.end(), ClABIListFiles.begin(),
|
||||
ClABIListFiles.end());
|
||||
// FIXME: should we propagate vfs::FileSystem to this constructor?
|
||||
ABIList.set(
|
||||
SpecialCaseList::createOrDie(AllABIListFiles, *vfs::getRealFileSystem()));
|
||||
ABIList.set(SpecialCaseList::createOrDie(AllABIListFiles));
|
||||
}
|
||||
|
||||
FunctionType *DataFlowSanitizer::getArgsFunctionType(FunctionType *T) {
|
||||
|
Loading…
Reference in New Issue
Block a user