From f6bac3e4bd9502266dab49eef26266a092e8c85b Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Mon, 12 Jan 2009 22:58:14 +0000 Subject: [PATCH] Avoid cast<>, use light weith wrapper directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62115 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 9f94a2b79ef..e7d8a0a305b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp @@ -2629,13 +2629,13 @@ private: if (!RootScope) return; // Get the subprogram debug information entry. - DISubprogram *SPD = cast(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. -- 2.34.1