Remove incorrect comment and pointless cast.
authorEric Christopher <echristo@gmail.com>
Wed, 4 Dec 2013 23:05:21 +0000 (23:05 +0000)
committerEric Christopher <echristo@gmail.com>
Wed, 4 Dec 2013 23:05:21 +0000 (23:05 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196427 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index ac8eb90378d48f020cca4a4a54469dfc1fa25b53..7422988e74a43c0ddd1e9f176b6b0a7b5c08da50 100644 (file)
@@ -582,8 +582,7 @@ static bool emitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
   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())