aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commitf796d4b4698eef2e6fe72d4fea4668d0bc8a5775 (patch)
treef26754a23f4a7699c7f1ad0af5daa7b428662329 /llvm/lib/Target/ARM/ARMGlobalMerge.cpp
parentafd6db99322ca8a6556b1e93699b4b4c9ebf5080 (diff)
downloadllvm-f796d4b4698eef2e6fe72d4fea4668d0bc8a5775.zip
llvm-f796d4b4698eef2e6fe72d4fea4668d0bc8a5775.tar.gz
llvm-f796d4b4698eef2e6fe72d4fea4668d0bc8a5775.tar.bz2
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. llvm-svn: 119563
Diffstat (limited to 'llvm/lib/Target/ARM/ARMGlobalMerge.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMGlobalMerge.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARMGlobalMerge.cpp b/llvm/lib/Target/ARM/ARMGlobalMerge.cpp
index fdcb670..b25915a 100644
--- a/llvm/lib/Target/ARM/ARMGlobalMerge.cpp
+++ b/llvm/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