aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/ARM/ARMConstantIslandPass.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Target/ARM/ARMConstantIslandPass.cpp b/lib/Target/ARM/ARMConstantIslandPass.cpp
index 35066faf55..89c32aa293 100644
--- a/lib/Target/ARM/ARMConstantIslandPass.cpp
+++ b/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;