aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AsmParser/llvmAsmParser.y
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-15 21:30:00 +0000
committerChris Lattner <sabre@nondot.org>2003-05-15 21:30:00 +0000
commit196850c2c49b890f5e6b21967ff2b074bc9a1124 (patch)
tree7f2ecb7632aa90e43a34ead6112c7f9bf40534bb /lib/AsmParser/llvmAsmParser.y
parent694c5df02abbf0ffee24922e461566a2a6444931 (diff)
downloadexternal_llvm-196850c2c49b890f5e6b21967ff2b074bc9a1124.zip
external_llvm-196850c2c49b890f5e6b21967ff2b074bc9a1124.tar.gz
external_llvm-196850c2c49b890f5e6b21967ff2b074bc9a1124.tar.bz2
Fix bug: Assembler/2003-05-15-SwitchBug.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6239 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.y')
-rw-r--r--lib/AsmParser/llvmAsmParser.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y
index eded8c4..75df31c 100644
--- a/lib/AsmParser/llvmAsmParser.y
+++ b/lib/AsmParser/llvmAsmParser.y
@@ -1464,6 +1464,11 @@ BBTerminatorInst : RET ResolvedVal { // Return with a result...
for (; I != E; ++I)
S->dest_push_back(I->first, I->second);
}
+ | SWITCH IntType ValueRef ',' LABEL ValueRef '[' ']' {
+ SwitchInst *S = new SwitchInst(getVal($2, $3),
+ cast<BasicBlock>(getVal(Type::LabelTy, $6)));
+ $$ = S;
+ }
| INVOKE TypesV ValueRef '(' ValueRefListE ')' TO ResolvedVal
EXCEPT ResolvedVal {
const PointerType *PFTy;