[llvm-commits] [llvm] r140686 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Duncan Sands baldrick at free.fr
Wed Sep 28 02:13:03 PDT 2011


Author: baldrick
Date: Wed Sep 28 04:13:02 2011
New Revision: 140686

URL: http://llvm.org/viewvc/llvm-project?rev=140686&view=rev
Log:
A typeid of zero means a cleanup, not a catch.  This case occurs
when there is both a catch and a cleanup.  Correct the comment.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp?rev=140686&r1=140685&r2=140686&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfException.cpp Wed Sep 28 04:13:02 2011
@@ -649,12 +649,14 @@
     //   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);
 





More information about the llvm-commits mailing list