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 | e39e1316f034e9932cb8da535541a3e35a0e490a (patch) | |
tree | bc8dfa9631823bcf2c306b3f9339f0c110854fc9 /lib/Transforms/Utils | |
parent | 1f85736c97980507833f1933796bf600f7efde67 (diff) | |
download | external_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.cpp | 7 |
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; |