[llvm-branch-commits] [llvm-branch] r136137 - in /llvm/branches/exception-handling-rewrite/lib: Bitcode/Reader/BitcodeReader.cpp VMCore/Instructions.cpp

Bill Wendling isanbard at gmail.com
Tue Jul 26 13:52:25 PDT 2011


Author: void
Date: Tue Jul 26 15:52:25 2011
New Revision: 136137

URL: http://llvm.org/viewvc/llvm-project?rev=136137&view=rev
Log:
A landingpad instruction doesn't need clauses if it's marked as a cleanup.

Modified:
    llvm/branches/exception-handling-rewrite/lib/Bitcode/Reader/BitcodeReader.cpp
    llvm/branches/exception-handling-rewrite/lib/VMCore/Instructions.cpp

Modified: llvm/branches/exception-handling-rewrite/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/exception-handling-rewrite/lib/Bitcode/Reader/BitcodeReader.cpp?rev=136137&r1=136136&r2=136137&view=diff
==============================================================================
--- llvm/branches/exception-handling-rewrite/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/branches/exception-handling-rewrite/lib/Bitcode/Reader/BitcodeReader.cpp Tue Jul 26 15:52:25 2011
@@ -2527,9 +2527,9 @@
     }
 
     case bitc::FUNC_CODE_INST_LANDINGPAD: {
-      // LANDINGPAD: [ty, val, val, num, id0,val0 ...]
+      // LANDINGPAD: [ty, val, val, num, (id0,val0 ...)?]
       unsigned Idx = 0;
-      if (Record.size() < 6)
+      if (Record.size() < 4)
         return Error("Invalid LANDINGPAD record");
       Type *Ty = getTypeByID(Record[Idx++]);
       if (!Ty) return Error("Invalid LANDINGPAD record");

Modified: llvm/branches/exception-handling-rewrite/lib/VMCore/Instructions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/exception-handling-rewrite/lib/VMCore/Instructions.cpp?rev=136137&r1=136136&r2=136137&view=diff
==============================================================================
--- llvm/branches/exception-handling-rewrite/lib/VMCore/Instructions.cpp (original)
+++ llvm/branches/exception-handling-rewrite/lib/VMCore/Instructions.cpp Tue Jul 26 15:52:25 2011
@@ -172,7 +172,6 @@
 
 void LandingPadInst::init(Value *PersFn, unsigned NumReservedValues,
                           const Twine &NameStr) {
-  assert(NumReservedValues > 1 && "Landingpad needs at least one clause!");
   ReservedSpace = NumReservedValues;
   NumOperands = 1;
   OperandList = allocHungoffUses(ReservedSpace);





More information about the llvm-branch-commits mailing list