diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-08-12 11:46:09 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-08-12 11:46:09 +0000 |
commit | e4b5fb88515a111ce92270e7530a35739b065c12 (patch) | |
tree | ca29e1b537cd549cda49390f580c29e843f71911 /llvm/lib/Transforms/Utils/SpecialCaseList.cpp | |
parent | 8e20be2aea0c8637335ce0d1e1d19e739c3ebe68 (diff) | |
download | bcm5719-llvm-e4b5fb88515a111ce92270e7530a35739b065c12.tar.gz bcm5719-llvm-e4b5fb88515a111ce92270e7530a35739b065c12.zip |
Add SpecialCaseList::createOrDie() factory and use it in sanitizer passes
llvm-svn: 188169
Diffstat (limited to 'llvm/lib/Transforms/Utils/SpecialCaseList.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/SpecialCaseList.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/SpecialCaseList.cpp b/llvm/lib/Transforms/Utils/SpecialCaseList.cpp index 5a3b192bf6a..5ddaabafc23 100644 --- a/llvm/lib/Transforms/Utils/SpecialCaseList.cpp +++ b/llvm/lib/Transforms/Utils/SpecialCaseList.cpp @@ -91,6 +91,13 @@ SpecialCaseList *SpecialCaseList::create( return SCL.take(); } +SpecialCaseList *SpecialCaseList::createOrDie(const StringRef Path) { + std::string Error; + if (SpecialCaseList *SCL = create(Path, Error)) + return SCL; + report_fatal_error(Error); +} + bool SpecialCaseList::parse(const MemoryBuffer *MB, std::string &Error) { // Iterate through each line in the blacklist file. SmallVector<StringRef, 16> Lines; |