diff options
author | Chris Lattner <sabre@nondot.org> | 2005-01-29 00:35:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-01-29 00:35:55 +0000 |
commit | ce1df9e9e8eafd732dc5c23b9cf273491f91fba1 (patch) | |
tree | 7efa513da720eeb68cd0b7ac5164e8fa49cc5f61 /lib/AsmParser | |
parent | 96d83f63cdbb33c075901b1b84eb07622d86386f (diff) | |
download | external_llvm-ce1df9e9e8eafd732dc5c23b9cf273491f91fba1.zip external_llvm-ce1df9e9e8eafd732dc5c23b9cf273491f91fba1.tar.gz external_llvm-ce1df9e9e8eafd732dc5c23b9cf273491f91fba1.tar.bz2 |
Adjust to slight changes in instruction interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 75b7ff5..13df7fe 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/lib/AsmParser/llvmAsmParser.y @@ -1808,7 +1808,7 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result... $$ = new BranchInst(getBBVal($6), getBBVal($9), getVal(Type::BoolTy, $3)); } | SWITCH IntType ValueRef ',' LABEL ValueRef '[' JumpTable ']' { - SwitchInst *S = new SwitchInst(getVal($2, $3), getBBVal($6)); + SwitchInst *S = new SwitchInst(getVal($2, $3), getBBVal($6), $8->size()); $$ = S; std::vector<std::pair<Constant*,BasicBlock*> >::iterator I = $8->begin(), @@ -1818,7 +1818,7 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result... delete $8; } | SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' { - SwitchInst *S = new SwitchInst(getVal($2, $3), getBBVal($6)); + SwitchInst *S = new SwitchInst(getVal($2, $3), getBBVal($6), 0); $$ = S; } | INVOKE TypesV ValueRef '(' ValueRefListE ')' TO LABEL ValueRef @@ -2031,7 +2031,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef { if (!Ty->isFirstClassType()) ThrowException("PHI node operands must be of first class type!"); $$ = new PHINode(Ty); - $$->op_reserve($2->size()*2); + ((PHINode*)$$)->reserveOperandSpace($2->size()); while ($2->begin() != $2->end()) { if ($2->front().first->getType() != Ty) ThrowException("All elements of a PHI node must be of the same type!"); |