[llvm] r196427 - Remove incorrect comment and pointless cast.

Eric Christopher echristo at gmail.com
Wed Dec 4 15:05:21 PST 2013


Author: echristo
Date: Wed Dec  4 17:05:21 2013
New Revision: 196427

URL: http://llvm.org/viewvc/llvm-project?rev=196427&view=rev
Log:
Remove incorrect comment and pointless cast.

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=196427&r1=196426&r2=196427&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Wed Dec  4 17:05:21 2013
@@ -582,8 +582,7 @@ static bool emitDebugValueComment(const
   raw_svector_ostream OS(Str);
   OS << '\t' << AP.MAI->getCommentString() << "DEBUG_VALUE: ";
 
-  // cast away const; DIetc do not take const operands for some reason.
-  DIVariable V(const_cast<MDNode*>(MI->getOperand(2).getMetadata()));
+  DIVariable V(MI->getOperand(2).getMetadata());
   if (V.getContext().isSubprogram()) {
     StringRef Name = DISubprogram(V.getContext()).getDisplayName();
     if (!Name.empty())





More information about the llvm-commits mailing list