summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-10-02 22:15:31 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-10-02 22:15:31 +0000
commit786cd049fc467bfaf85021b4fcfb19bbf134329b (patch)
tree55f7a8b314704fe5d4b3a947b22b6009c1a23ded /llvm/lib/CodeGen/MachineInstr.cpp
parent834c265e85e4ee433cd9089e907bf6bccdb25313 (diff)
downloadbcm5719-llvm-786cd049fc467bfaf85021b4fcfb19bbf134329b.tar.gz
bcm5719-llvm-786cd049fc467bfaf85021b4fcfb19bbf134329b.zip
Revert "DI: Fold constant arguments into a single MDString"
This reverts commit r218914 while I investigate some bots. llvm-svn: 218918
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 2e59f371826..d33d4a9d26a 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -1643,11 +1643,11 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM,
if (isDebugValue() && MO.isMetadata()) {
// Pretty print DBG_VALUE instructions.
const MDNode *MD = MO.getMetadata();
- DIDescriptor DI(MD);
- DIVariable DIV(MD);
-
- if (DI.isVariable() && !DIV.getName().empty())
- OS << "!\"" << DIV.getName() << '\"';
+ if (MD->getNumOperands() >= 2)
+ if (const MDString *MDS = dyn_cast<MDString>(MD->getOperand(2)))
+ OS << "!\"" << MDS->getString() << '\"';
+ else
+ MO.print(OS, TM);
else
MO.print(OS, TM);
} else if (TM && (isInsertSubreg() || isRegSequence()) && MO.isImm()) {
OpenPOWER on IntegriCloud