[llvm-commits] [poolalloc] r75008 - in /poolalloc/trunk/lib/PoolAllocate: Heuristic.cpp PAMultipleGlobalPool.cpp PASimple.cpp PoolAllocate.cpp
John Criswell
criswell at uiuc.edu
Wed Jul 8 08:25:15 PDT 2009
Author: criswell
Date: Wed Jul 8 10:24:19 2009
New Revision: 75008
URL: http://llvm.org/viewvc/llvm-project?rev=75008&view=rev
Log:
Switch to the new LLVM API which requires that the GlobalVariable constructor
take a pointer to an LLVMContext.
Modified:
poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp
poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp
poolalloc/trunk/lib/PoolAllocate/PASimple.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=75008&r1=75007&r2=75008&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/Heuristic.cpp Wed Jul 8 10:24:19 2009
@@ -440,7 +440,8 @@
static Value *NullGlobal = 0;
if (!NullGlobal) {
Module *M = I->getParent()->getParent()->getParent();
- NullGlobal = new GlobalVariable(PoolAllocate::PoolDescPtrTy, false,
+ NullGlobal = new GlobalVariable(M->getContext(),
+ PoolAllocate::PoolDescPtrTy, false,
GlobalValue::ExternalLinkage,
Constant::getNullValue(PoolAllocate::PoolDescPtrTy),
"llvm-poolalloc-null-init", M);
Modified: poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp?rev=75008&r1=75007&r2=75008&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PAMultipleGlobalPool.cpp Wed Jul 8 10:24:19 2009
@@ -321,7 +321,8 @@
E = G->node_end(); I != E; ++I) {
GlobalVariable *GV =
- new GlobalVariable(getPoolType(), false, GlobalValue::ExternalLinkage,
+ new GlobalVariable(M.getContext(),
+ getPoolType(), false, GlobalValue::ExternalLinkage,
Constant::getNullValue(getPoolType()),
"__poolalloc_GlobalPool",
&M);
Modified: poolalloc/trunk/lib/PoolAllocate/PASimple.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PASimple.cpp?rev=75008&r1=75007&r2=75008&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PASimple.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PASimple.cpp Wed Jul 8 10:24:19 2009
@@ -353,8 +353,10 @@
unsigned Align,
Module& M) {
GlobalVariable *GV =
- new GlobalVariable(getPoolType(), false, GlobalValue::ExternalLinkage,
- Constant::getNullValue(getPoolType()), "__poolalloc_GlobalPool",
+ new GlobalVariable(M.getContext(),
+ getPoolType(), false, GlobalValue::ExternalLinkage,
+ Constant::getNullValue(getPoolType()),
+ "__poolalloc_GlobalPool",
&M);
Function *InitFunc = Function::Create
Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=75008&r1=75007&r2=75008&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Wed Jul 8 10:24:19 2009
@@ -600,7 +600,8 @@
GlobalVariable *PoolAllocate::CreateGlobalPool(unsigned RecSize, unsigned Align,
Instruction *IPHint) {
GlobalVariable *GV =
- new GlobalVariable(PoolDescType, false, GlobalValue::InternalLinkage,
+ new GlobalVariable(CurModule->getContext(),
+ PoolDescType, false, GlobalValue::InternalLinkage,
Constant::getNullValue(PoolDescType), "GlobalPool",
CurModule);
More information about the llvm-commits
mailing list