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 | 8563ee4ed429c8a2cd356f4b338e28f566a64756 (patch) | |
tree | 8d2ea516779b06fc8d7d8ab093ac9db43f5f7d06 /llvm/lib/CodeGen/SelectionDAG | |
parent | d9929f03cfd80f2d0d2fec9b7c41a4f6f15ac755 (diff) | |
download | bcm5719-llvm-8563ee4ed429c8a2cd356f4b338e28f566a64756.tar.gz bcm5719-llvm-8563ee4ed429c8a2cd356f4b338e28f566a64756.zip |
Skip checking preferred alignment of GVs defined in other translation units all together.
llvm-svn: 100133
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 4fcfeecb49a..0ba65ab7f96 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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); } |