[llvm-commits] [llvm] r62115 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp

Devang Patel dpatel at apple.com
Mon Jan 12 14:58:15 PST 2009


Author: dpatel
Date: Mon Jan 12 16:58:14 2009
New Revision: 62115

URL: http://llvm.org/viewvc/llvm-project?rev=62115&view=rev
Log:
Avoid cast<>, use light weith wrapper directly.

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

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

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Mon Jan 12 16:58:14 2009
@@ -2629,13 +2629,13 @@
     if (!RootScope) return;
 
     // Get the subprogram debug information entry.
-    DISubprogram *SPD = cast<DISubprogram>(RootScope->getDesc());
+    DISubprogram SPD(RootScope->getDesc()->getGV());
 
     // Get the compile unit context.
-    CompileUnit *Unit = FindCompileUnit(SPD->getCompileUnit());
+    CompileUnit *Unit = FindCompileUnit(SPD.getCompileUnit());
 
     // Get the subprogram die.
-    DIE *SPDie = Unit->getDieMapSlotFor(SPD->getGV());
+    DIE *SPDie = Unit->getDieMapSlotFor(SPD.getGV());
     assert(SPDie && "Missing subprogram descriptor");
 
     // Add the function bounds.





More information about the llvm-commits mailing list