diff options
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/GlobalOpt.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalOpt.cpp b/llvm/lib/Transforms/IPO/GlobalOpt.cpp index 2ba7ed9fe99..7b1e9c0efdd 100644 --- a/llvm/lib/Transforms/IPO/GlobalOpt.cpp +++ b/llvm/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()); |

