summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-02-02 18:49:02 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-02-02 18:49:02 +0000
commit3ad22567b3c8a23b2ebc80c71f31fd5c9a2c2136 (patch)
treece514335de5db46f9e7a55fcfb82ac86bac9a3a4 /llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
parent583c90d4c24cf57e16240f11a693a63d863d0e75 (diff)
downloadbcm5719-llvm-3ad22567b3c8a23b2ebc80c71f31fd5c9a2c2136.tar.gz
bcm5719-llvm-3ad22567b3c8a23b2ebc80c71f31fd5c9a2c2136.zip
Watch out for empty BB.
llvm-svn: 33788
Diffstat (limited to 'llvm/lib/Target/ARM/ARMConstantIslandPass.cpp')
-rw-r--r--llvm/lib/Target/ARM/ARMConstantIslandPass.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
index 35066faf554..89c32aa2931 100644
--- a/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp
@@ -352,6 +352,7 @@ void ARMConstantIslands::InitialFunctionScan(MachineFunction &Fn,
// In thumb mode, if this block is a constpool island, pessmisticly assume
// it needs to be padded by two byte so it's aligned on 4 byte boundary.
if (AFI->isThumbFunction() &&
+ MBB.size() &&
MBB.begin()->getOpcode() == ARM::CONSTPOOL_ENTRY)
MBBSize += 2;
OpenPOWER on IntegriCloud