[ASan] Fix previous commit. Patch by Max Ostapenko!
authorYury Gribov <y.gribov@samsung.com>
Thu, 28 May 2015 08:03:28 +0000 (08:03 +0000)
committerYury Gribov <y.gribov@samsung.com>
Thu, 28 May 2015 08:03:28 +0000 (08:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238403 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/AddressSanitizer.cpp

index 7df489d99b2f3f3ac8c1532e0d45af81c67704fd..39c1e41651f2d255569639ab58405f54312f87c4 100644 (file)
@@ -587,9 +587,9 @@ struct FunctionStackPoisoner : public InstVisitor<FunctionStackPoisoner> {
   void unpoisonDynamicAllocasBeforeInst(Instruction *InstBefore,
                                         Value *SavedStack) {
     IRBuilder<> IRB(InstBefore);
-    IRB.CreateCall2(AsanAllocasUnpoisonFunc,
-                    IRB.CreateLoad(DynamicAllocaLayout),
-                    IRB.CreatePtrToInt(SavedStack, IntptrTy));
+    IRB.CreateCall(AsanAllocasUnpoisonFunc,
+                    {IRB.CreateLoad(DynamicAllocaLayout),
+                    IRB.CreatePtrToInt(SavedStack, IntptrTy)});
   }
 
   // Unpoison dynamic allocas redzones.
@@ -1991,7 +1991,7 @@ void FunctionStackPoisoner::handleDynamicAllocaCall(AllocaInst *AI) {
                                     ConstantInt::get(IntptrTy, Align));
 
   // Insert __asan_alloca_poison call for new created alloca.
-  IRB.CreateCall2(AsanAllocaPoisonFunc, NewAddress, OldSize);
+  IRB.CreateCall(AsanAllocaPoisonFunc, {NewAddress, OldSize});
 
   // Store the last alloca's address to DynamicAllocaLayout. We'll need this
   // for unpoisoning stuff.