[llvm-commits] [poolalloc] r75137 - in /poolalloc/trunk/lib/PoolAllocate: Heuristic.cpp PoolAllocate.cpp
John Criswell
criswell at uiuc.edu
Thu Jul 9 08:48:48 PDT 2009
Author: criswell
Date: Thu Jul 9 10:48:48 2009
New Revision: 75137
URL: http://llvm.org/viewvc/llvm-project?rev=75137&view=rev
Log:
Updated to latest LLVM API: pass the Module as the first parameter to the
GlobalVariable constructor instead of the LLVMContext.
Modified:
poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp
poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
Modified: poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp?rev=75137&r1=75136&r2=75137&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp Thu Jul 9 10:48:48 2009
@@ -440,11 +440,11 @@
static Value *NullGlobal = 0;
if (!NullGlobal) {
Module *M = I->getParent()->getParent()->getParent();
- NullGlobal = new GlobalVariable(M->getContext(),
+ NullGlobal = new GlobalVariable(*M,
PoolAllocate::PoolDescPtrTy, false,
GlobalValue::ExternalLinkage,
Constant::getNullValue(PoolAllocate::PoolDescPtrTy),
- "llvm-poolalloc-null-init", M);
+ "llvm-poolalloc-null-init");
}
while (isa<AllocaInst>(I)) ++I;
Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=75137&r1=75136&r2=75137&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Thu Jul 9 10:48:48 2009
@@ -600,10 +600,9 @@
GlobalVariable *PoolAllocate::CreateGlobalPool(unsigned RecSize, unsigned Align,
Instruction *IPHint) {
GlobalVariable *GV =
- new GlobalVariable(CurModule->getContext(),
+ new GlobalVariable(*CurModule,
PoolDescType, false, GlobalValue::InternalLinkage,
- Constant::getNullValue(PoolDescType), "GlobalPool",
- CurModule);
+ Constant::getNullValue(PoolDescType), "GlobalPool");
// Update the global DSGraph to include this.
DSNode *GNode = Graphs->getGlobalsGraph()->addObjectToGraph(GV);
More information about the llvm-commits
mailing list