aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/Instructions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp
index 968a565197..c980a7189a 100644
--- a/lib/VMCore/Instructions.cpp
+++ b/lib/VMCore/Instructions.cpp
@@ -215,9 +215,9 @@ void LandingPadInst::growOperands() {
}
void LandingPadInst::reserveClauses(unsigned Size) {
- unsigned e = getNumOperands() + Size;
- if (ReservedSpace >= e) return;
- ReservedSpace = e;
+ unsigned e = getNumOperands();
+ if (ReservedSpace >= e + Size) return;
+ ReservedSpace = e + Size;
Use *NewOps = allocHungoffUses(ReservedSpace);
Use *OldOps = OperandList;