aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-07-28 07:26:41 +0000
committerBill Wendling <isanbard@gmail.com>2011-07-28 07:26:41 +0000
commit71961846109c65f77a972a8c586cade62c35f081 (patch)
tree4850a787ba242ba7efdc598e79c725f00c060c82
parent297738fa95d4bb7849c197926f4d4abdcd812e40 (diff)
Don't add in the asked for size so that we don't copy too much from the old to new vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136338 91177308-0d34-0410-b5e6-96231b3b80d8
-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;