Move EVER MORE stuff over to LLVMContext.
[oota-llvm.git] / lib / Transforms / Instrumentation / RSProfiling.cpp
index 36b446431133f72bfc7a51d51b92f4a860772c54..ad76ba448077bebae0451c43b56a66ee16508f97 100644 (file)
@@ -248,7 +248,7 @@ void GlobalRandomCounterOpt::PrepFunction(Function* F) {
   //make a local temporary to cache the global
   BasicBlock& bb = F->getEntryBlock();
   BasicBlock::iterator InsertPt = bb.begin();
-  AI = new AllocaInst(T, 0, "localcounter", InsertPt);
+  AI = new AllocaInst(*F->getContext(), T, 0, "localcounter", InsertPt);
   LoadInst* l = new LoadInst(Counter, "counterload", InsertPt);
   new StoreInst(l, AI, InsertPt);