]> granicus.if.org Git - llvm/commitdiff
Fix bug: Assembler/2003-05-15-SwitchBug.ll
authorChris Lattner <sabre@nondot.org>
Thu, 15 May 2003 21:30:00 +0000 (21:30 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 15 May 2003 21:30:00 +0000 (21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6239 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.y

index eded8c4f94f6dfb007105a90d7c0a5760096c786..75df31ccf872398ad8b0194fb07c2dca972e6797 100644 (file)
@@ -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;