aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Utils
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
commite39e1316f034e9932cb8da535541a3e35a0e490a (patch)
treebc8dfa9631823bcf2c306b3f9339f0c110854fc9 /lib/Transforms/Utils
parent1f85736c97980507833f1933796bf600f7efde67 (diff)
downloadexternal_llvm-e39e1316f034e9932cb8da535541a3e35a0e490a.zip
external_llvm-e39e1316f034e9932cb8da535541a3e35a0e490a.tar.gz
external_llvm-e39e1316f034e9932cb8da535541a3e35a0e490a.tar.bz2
Add SpecialCaseList::createOrDie() factory and use it in sanitizer passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188169 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils')
-rw-r--r--lib/Transforms/Utils/SpecialCaseList.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Transforms/Utils/SpecialCaseList.cpp b/lib/Transforms/Utils/SpecialCaseList.cpp
index 5a3b192..5ddaaba 100644
--- a/lib/Transforms/Utils/SpecialCaseList.cpp
+++ b/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;