diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2017-04-06 20:23:57 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2017-04-06 20:23:57 +0000 |
commit | db11fdfda50017e0175602fec9949aa34141656a (patch) | |
tree | 97064cff0f2304c6d9c6f15e2a7c4f90fbbf9f8b /llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp | |
parent | 98240e964366419bdbdb34706811f44e705d6786 (diff) | |
download | bcm5719-llvm-db11fdfda50017e0175602fec9949aa34141656a.tar.gz bcm5719-llvm-db11fdfda50017e0175602fec9949aa34141656a.zip |
Revert "Turn some C-style vararg into variadic templates"
This reverts commit r299699, the examples needs to be updated.
llvm-svn: 299702
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp b/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp index 150b7b1a4a8..194f17f6568 100644 --- a/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp +++ b/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp @@ -267,34 +267,35 @@ void EfficiencySanitizer::initializeCallbacks(Module &M) { SmallString<32> AlignedLoadName("__esan_aligned_load" + ByteSizeStr); EsanAlignedLoad[Idx] = checkSanitizerInterfaceFunction(M.getOrInsertFunction( - AlignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy())); + AlignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); SmallString<32> AlignedStoreName("__esan_aligned_store" + ByteSizeStr); EsanAlignedStore[Idx] = checkSanitizerInterfaceFunction(M.getOrInsertFunction( - AlignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy())); + AlignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); SmallString<32> UnalignedLoadName("__esan_unaligned_load" + ByteSizeStr); EsanUnalignedLoad[Idx] = checkSanitizerInterfaceFunction(M.getOrInsertFunction( - UnalignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy())); + UnalignedLoadName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); SmallString<32> UnalignedStoreName("__esan_unaligned_store" + ByteSizeStr); EsanUnalignedStore[Idx] = checkSanitizerInterfaceFunction(M.getOrInsertFunction( - UnalignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy())); + UnalignedStoreName, IRB.getVoidTy(), IRB.getInt8PtrTy(), nullptr)); } - EsanUnalignedLoadN = checkSanitizerInterfaceFunction(M.getOrInsertFunction( - "__esan_unaligned_loadN", IRB.getVoidTy(), IRB.getInt8PtrTy(), IntptrTy)); + EsanUnalignedLoadN = checkSanitizerInterfaceFunction( + M.getOrInsertFunction("__esan_unaligned_loadN", IRB.getVoidTy(), + IRB.getInt8PtrTy(), IntptrTy, nullptr)); EsanUnalignedStoreN = checkSanitizerInterfaceFunction( M.getOrInsertFunction("__esan_unaligned_storeN", IRB.getVoidTy(), - IRB.getInt8PtrTy(), IntptrTy)); + IRB.getInt8PtrTy(), IntptrTy, nullptr)); MemmoveFn = checkSanitizerInterfaceFunction( M.getOrInsertFunction("memmove", IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), - IRB.getInt8PtrTy(), IntptrTy)); + IRB.getInt8PtrTy(), IntptrTy, nullptr)); MemcpyFn = checkSanitizerInterfaceFunction( M.getOrInsertFunction("memcpy", IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), - IRB.getInt8PtrTy(), IntptrTy)); + IRB.getInt8PtrTy(), IntptrTy, nullptr)); MemsetFn = checkSanitizerInterfaceFunction( M.getOrInsertFunction("memset", IRB.getInt8PtrTy(), IRB.getInt8PtrTy(), - IRB.getInt32Ty(), IntptrTy)); + IRB.getInt32Ty(), IntptrTy, nullptr)); } bool EfficiencySanitizer::shouldIgnoreStructType(StructType *StructTy) { @@ -531,7 +532,8 @@ void EfficiencySanitizer::createDestructor(Module &M, Constant *ToolInfoArg) { ReturnInst::Create(*Ctx, BasicBlock::Create(*Ctx, "", EsanDtorFunction)); IRBuilder<> IRB_Dtor(EsanDtorFunction->getEntryBlock().getTerminator()); Function *EsanExit = checkSanitizerInterfaceFunction( - M.getOrInsertFunction(EsanExitName, IRB_Dtor.getVoidTy(), Int8PtrTy)); + M.getOrInsertFunction(EsanExitName, IRB_Dtor.getVoidTy(), + Int8PtrTy, nullptr)); EsanExit->setLinkage(Function::ExternalLinkage); IRB_Dtor.CreateCall(EsanExit, {ToolInfoArg}); appendToGlobalDtors(M, EsanDtorFunction, EsanCtorAndDtorPriority); |