A typeid of zero means a cleanup, not a catch. This case occurs
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfException.cpp
index c3fa826c201ee9e3536f3eb3974ca44f1918f62c..18b726b173dcf2c46ef2cbac6e12f80a68278eb6 100644 (file)
@@ -649,12 +649,14 @@ void DwarfException::EmitExceptionTable() {
     //   Used by the runtime to match the type of the thrown exception to the
     //   type of the catch clauses or the types in the exception specification.
     if (VerboseAsm) {
-      if (Action.ValueForTypeID >= 0)
+      if (Action.ValueForTypeID > 0)
         Asm->OutStreamer.AddComment(Twine("  Catch TypeInfo ") +
                                     llvm::itostr(Action.ValueForTypeID));
-      else 
+      else if (Action.ValueForTypeID < 0)
         Asm->OutStreamer.AddComment(Twine("  Filter TypeInfo ") +
                                     llvm::itostr(Action.ValueForTypeID));
+      else
+        Asm->OutStreamer.AddComment("  Cleanup");
     }
     Asm->EmitSLEB128(Action.ValueForTypeID);