diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-04-01 20:13:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-04-01 20:13:28 +0000 |
commit | 6cdb7e22aaa229d2b2845d7e8a5a11a30eeaac99 (patch) | |
tree | abb84841628d8bddfb32a5b1afcc1e4b827272d2 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | 42642d06c915a26af1400de6ce6a53c333e5c247 (diff) |
Skip checking preferred alignment of GVs defined in other translation units all together.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100133 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 4fcfeecb49..0ba65ab7f9 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -6152,7 +6152,7 @@ unsigned SelectionDAG::InferPtrAlignment(SDValue Ptr) const { unsigned Align = GV->getAlignment(); if (!Align) { if (GlobalVariable *GVar = dyn_cast<GlobalVariable>(GV)) { - if (GV->getType()->getElementType()->isSized()) { + if (GVar->hasInitializer()) { const TargetData *TD = TLI.getTargetData(); Align = TD->getPreferredAlignment(GVar); } |