diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-02-26 23:42:13 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-02-26 23:42:13 +0000 |
| commit | 65d3a0a5f864d2a054ccc62d4200affc3483b3f2 (patch) | |
| tree | 9601e3076206bfab25d8c436d3557a18179f9410 /llvm/lib | |
| parent | 62abc944d6738ffb93f273fb755d4a2d9825d823 (diff) | |
| download | bcm5719-llvm-65d3a0a5f864d2a054ccc62d4200affc3483b3f2.tar.gz bcm5719-llvm-65d3a0a5f864d2a054ccc62d4200affc3483b3f2.zip | |
Fix rdar://7694996 a miscompile of 183.equake from my patch yesterday,
confusing the old MAT variable with the new GlobalType one. This caused
us to promote the @disp global pointer into:
@disp.body = internal global double*** undef
instead of:
@disp.body = internal global [3 x double**] undef
llvm-svn: 97285
Diffstat (limited to 'llvm/lib')
| -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()); |

