[llvm-commits] [llvm] r75540 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Devang Patel dpatel at apple.com
Mon Jul 13 15:46:19 PDT 2009


Author: dpatel
Date: Mon Jul 13 17:46:19 2009
New Revision: 75540

URL: http://llvm.org/viewvc/llvm-project?rev=75540&view=rev
Log:
Use assertion.

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

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=75540&r1=75539&r2=75540&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Jul 13 17:46:19 2009
@@ -788,8 +788,9 @@
   GV.getLinkageName(LinkageName);
   if (!LinkageName.empty()) {
     Mangler *Mg = Asm->getMangler();
+    assert (Mg && "Unable to find Mangler!");
     AddString(GVDie, dwarf::DW_AT_MIPS_linkage_name, dwarf::DW_FORM_string,
-              Mg ? Mg->makeNameProper(LinkageName) : LinkageName);
+              Mg->makeNameProper(LinkageName));
   }
   AddType(DW_Unit, GVDie, GV.getType());
   if (!GV.isLocalToUnit())
@@ -861,8 +862,9 @@
 
   if (!LinkageName.empty()) {
     Mangler *Mg = Asm->getMangler();
+    assert (Mg && "Unable to find Mangler!");
     AddString(SPDie, dwarf::DW_AT_MIPS_linkage_name, dwarf::DW_FORM_string,
-              Mg ? Mg->makeNameProper(LinkageName) : LinkageName);
+              Mg->makeNameProper(LinkageName));
   }
 
   AddSourceLine(SPDie, &SP);





More information about the llvm-commits mailing list