[llvm] r217533 - Cleanup: Use the appropriate API for accessing the DIVariable of a

Adrian Prantl aprantl at apple.com
Wed Sep 10 11:52:29 PDT 2014


Author: adrian
Date: Wed Sep 10 13:52:29 2014
New Revision: 217533

URL: http://llvm.org/viewvc/llvm-project?rev=217533&view=rev
Log:
Cleanup: Use the appropriate API for accessing the DIVariable of a
DBG_VALUE intrinsic.

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

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=217533&r1=217532&r2=217533&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Sep 10 13:52:29 2014
@@ -622,7 +622,7 @@ static bool emitDebugValueComment(const
   raw_svector_ostream OS(Str);
   OS << "DEBUG_VALUE: ";
 
-  DIVariable V(MI->getOperand(2).getMetadata());
+  DIVariable V = MI->getDebugVariable();
   if (V.getContext().isSubprogram()) {
     StringRef Name = DISubprogram(V.getContext()).getDisplayName();
     if (!Name.empty())





More information about the llvm-commits mailing list