summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SpecialCaseList.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2013-08-12 11:46:09 +0000
committerAlexey Samsonov <samsonov@google.com>2013-08-12 11:46:09 +0000
commite4b5fb88515a111ce92270e7530a35739b065c12 (patch)
treeca29e1b537cd549cda49390f580c29e843f71911 /llvm/lib/Transforms/Utils/SpecialCaseList.cpp
parent8e20be2aea0c8637335ce0d1e1d19e739c3ebe68 (diff)
downloadbcm5719-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.cpp7
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;
OpenPOWER on IntegriCloud