git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196427
91177308-0d34-0410-b5e6-
96231b3b80d8
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())