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
diff --git a/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
index 0bbbfef..f5531e0 100644
--- a/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -129,7 +129,7 @@
Constant *DFSanUnionFn;
Constant *DFSanUnionLoadFn;
MDNode *ColdCallWeights;
- SpecialCaseList Greylist;
+ OwningPtr<SpecialCaseList> Greylist;
DenseMap<Value *, Function *> UnwrappedFnMap;
Value *getShadowAddress(Value *Addr, Instruction *Pos);
@@ -211,7 +211,7 @@
DataFlowSanitizer::DataFlowSanitizer(void *(*getArgTLS)(),
void *(*getRetValTLS)())
: ModulePass(ID), GetArgTLSPtr(getArgTLS), GetRetvalTLSPtr(getRetValTLS),
- Greylist(ClGreylistFile) {}
+ Greylist(SpecialCaseList::createOrDie(ClGreylistFile)) {}
FunctionType *DataFlowSanitizer::getInstrumentedFunctionType(FunctionType *T) {
llvm::SmallVector<Type *, 4> ArgTypes;
@@ -269,7 +269,7 @@
DataFlowSanitizer::InstrumentedABI
DataFlowSanitizer::getInstrumentedABI(Function *F) {
- if (Greylist.isIn(*F))
+ if (Greylist->isIn(*F))
return IA_MemOnly;
else
return getDefaultInstrumentedABI();