1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

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
This commit is contained in:
Chris Lattner 2010-02-26 23:42:13 +00:00
parent 995bac5839
commit 8e0bfd5ce0

View File

@ -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());