diff options
author | Cameron Zwarich <zwarich@apple.com> | 2011-07-11 01:29:42 +0000 |
---|---|---|
committer | Cameron Zwarich <zwarich@apple.com> | 2011-07-11 01:29:42 +0000 |
commit | f75ae4c977b8877bb8988109dc081d512874fb37 (patch) | |
tree | fe4bfe52f3aa5d5df10c4a6a301041dccf4d393e | |
parent | dc770fcb2c84068a64b471fe6c4c56966cf3021f (diff) | |
download | external_llvm-f75ae4c977b8877bb8988109dc081d512874fb37.tar.gz external_llvm-f75ae4c977b8877bb8988109dc081d512874fb37.tar.bz2 external_llvm-f75ae4c977b8877bb8988109dc081d512874fb37.zip |
Fix <rdar://problem/9751331>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134882 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/ARM/ARMGlobalMerge.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMGlobalMerge.cpp b/lib/Target/ARM/ARMGlobalMerge.cpp index 4bdd4f12d7..f8993792bc 100644 --- a/lib/Target/ARM/ARMGlobalMerge.cpp +++ b/lib/Target/ARM/ARMGlobalMerge.cpp @@ -176,8 +176,8 @@ bool ARMGlobalMerge::doInitialization(Module &M) { // Ignore fancy-aligned globals for now. unsigned Alignment = I->getAlignment(); - unsigned AllocSize = TD->getTypeAllocSize(I->getType()->getElementType()); - if (Alignment > AllocSize) + const Type *Ty = I->getType()->getElementType(); + if (Alignment > TD->getABITypeAlignment(Ty)) continue; // Ignore all 'special' globals. @@ -185,7 +185,7 @@ bool ARMGlobalMerge::doInitialization(Module &M) { I->getName().startswith(".llvm.")) continue; - if (AllocSize < MaxOffset) { + if (TD->getTypeAllocSize(Ty) < MaxOffset) { const TargetLoweringObjectFile &TLOF = TLI->getObjFileLowering(); if (TLOF.getKindForGlobal(I, TLI->getTargetMachine()).isBSSLocal()) BSSGlobals.push_back(I); |