Remove incorrect comment and pointless cast.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196427 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2013-12-04 23:05:21 +00:00
parent dda6f1fb00
commit 881c0bb5a3

View File

@ -582,8 +582,7 @@ static bool emitDebugValueComment(const MachineInstr *MI, AsmPrinter &AP) {
raw_svector_ostream OS(Str); raw_svector_ostream OS(Str);
OS << '\t' << AP.MAI->getCommentString() << "DEBUG_VALUE: "; OS << '\t' << AP.MAI->getCommentString() << "DEBUG_VALUE: ";
// cast away const; DIetc do not take const operands for some reason. DIVariable V(MI->getOperand(2).getMetadata());
DIVariable V(const_cast<MDNode*>(MI->getOperand(2).getMetadata()));
if (V.getContext().isSubprogram()) { if (V.getContext().isSubprogram()) {
StringRef Name = DISubprogram(V.getContext()).getDisplayName(); StringRef Name = DISubprogram(V.getContext()).getDisplayName();
if (!Name.empty()) if (!Name.empty())