From 9f3648bf02caf1fc427341911830289ba730c256 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 15 May 2003 21:30:00 +0000 Subject: [PATCH] Fix bug: Assembler/2003-05-15-SwitchBug.ll llvm-svn: 6239 --- llvm/lib/AsmParser/llvmAsmParser.y | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y index eded8c4f94f6..75df31ccf872 100644 --- a/llvm/lib/AsmParser/llvmAsmParser.y +++ b/llvm/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(getVal(Type::LabelTy, $6))); + $$ = S; + } | INVOKE TypesV ValueRef '(' ValueRefListE ')' TO ResolvedVal EXCEPT ResolvedVal { const PointerType *PFTy;