This started as a small change, I swear. Unfortunately, lots of things call the...
[oota-llvm.git] / lib / CodeGen / StackProtector.cpp
index c179f1e3df97cea83db1dd22641ffcb36c5e6988..9043b89e354e8650265295defe23e23d055bddc0 100644 (file)
@@ -201,7 +201,7 @@ bool StackProtector::InsertStackProtectors() {
     // Generate the stack protector instructions in the old basic block.
     LoadInst *LI1 = new LoadInst(StackGuardVar, "", false, BB);
     LoadInst *LI2 = new LoadInst(AI, "", true, BB);
-    ICmpInst *Cmp = new ICmpInst(CmpInst::ICMP_EQ, LI1, LI2, "", BB);
+    ICmpInst *Cmp = new ICmpInst(*BB, CmpInst::ICMP_EQ, LI1, LI2, "");
     BranchInst::Create(NewBB, FailBB, Cmp, BB);
   }