summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/ARMGlobalMerge.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-11-17 21:25:27 +0000
committerBob Wilson <bob.wilson@apple.com>2010-11-17 21:25:27 +0000
commitedf046716ce7d0da9479c37a5bbb6dd33ce6d390 (patch)
tree4a10914e829db118408b7b2c172f72f79fd45bc5 /lib/Target/ARM/ARMGlobalMerge.cpp
parent17ead4ff4baceb2c5503f233d0288d363ae44165 (diff)
downloadllvm-edf046716ce7d0da9479c37a5bbb6dd33ce6d390.tar.gz
llvm-edf046716ce7d0da9479c37a5bbb6dd33ce6d390.tar.bz2
llvm-edf046716ce7d0da9479c37a5bbb6dd33ce6d390.tar.xz
Fix the ARMGlobalMerge pass to look at variable sizes instead of pointer sizes.
It was mistakenly looking at the pointer type when checking for the size of global variables. This is a partial fix for Radar 8673120. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119563 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMGlobalMerge.cpp')
-rw-r--r--lib/Target/ARM/ARMGlobalMerge.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/ARM/ARMGlobalMerge.cpp b/lib/Target/ARM/ARMGlobalMerge.cpp
index fdcb67062f..b25915a0bd 100644
--- a/lib/Target/ARM/ARMGlobalMerge.cpp
+++ b/lib/Target/ARM/ARMGlobalMerge.cpp
@@ -179,7 +179,7 @@ bool ARMGlobalMerge::doInitialization(Module &M) {
I->getName().startswith(".llvm."))
continue;
- if (TD->getTypeAllocSize(I->getType()) < MaxOffset) {
+ if (TD->getTypeAllocSize(I->getType()->getElementType()) < MaxOffset) {
if (I->isConstant())
ConstGlobals.push_back(I);
else