diff options
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 2ba7ed9fe9..7b1e9c0efd 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -826,11 +826,10 @@ static GlobalVariable *OptimizeGlobalAddressOfMalloc(GlobalVariable *GV, // Create the new global variable. The contents of the malloc'd memory is // undefined, so initialize with an undef value. - const Type *MAT = getMallocAllocatedType(CI); GlobalVariable *NewGV = new GlobalVariable(*GV->getParent(), - MAT, false, + GlobalType, false, GlobalValue::InternalLinkage, - UndefValue::get(MAT), + UndefValue::get(GlobalType), GV->getName()+".body", GV, GV->isThreadLocal()); |