From e39e1316f034e9932cb8da535541a3e35a0e490a Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Mon, 12 Aug 2013 11:46:09 +0000 Subject: 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 --- lib/Transforms/Utils/SpecialCaseList.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Transforms/Utils') 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 Lines; -- cgit v1.1