diff options
author | Heejin Ahn <aheejin@gmail.com> | 2023-04-25 01:44:25 -0700 |
---|---|---|
committer | Heejin Ahn <aheejin@gmail.com> | 2023-05-18 16:01:42 -0700 |
commit | 2dd349428bf0906867eab9604c65945ed1a8c42d (patch) | |
tree | 4c4a9d676edb7ffcd4dc7f792f506364d6a05203 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | fb730e2b5883ad3c5d498910bf645e3e4affefed (diff) | |
download | llvm-2dd349428bf0906867eab9604c65945ed1a8c42d.zip llvm-2dd349428bf0906867eab9604c65945ed1a8c42d.tar.gz llvm-2dd349428bf0906867eab9604c65945ed1a8c42d.tar.bz2 |
[DebugInfo][InstrRef] Prettyprint metadata
Some metadata prettyprinting, including variable prettyprinting and
debug line info comments, is currently only supported for `DBG_VALUE`.
This allows `DBG_INSTR_REF` can be printed in the same way.
Reviewed By: jmorse
Differential Revision: https://reviews.llvm.org/D150620
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 0b5e3e8..f296533 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1723,7 +1723,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, if (FirstOp) FirstOp = false; else OS << ","; OS << " "; - if (isDebugValue() && MO.isMetadata()) { + if (isDebugValueLike() && MO.isMetadata()) { // Pretty print DBG_VALUE* instructions. auto *DIV = dyn_cast<DILocalVariable>(MO.getMetadata()); if (DIV && !DIV->getName().empty()) @@ -1879,7 +1879,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, } // Print extra comments for DEBUG_VALUE. - if (isDebugValue() && getDebugVariableOp().isMetadata()) { + if (isDebugValueLike() && getDebugVariableOp().isMetadata()) { if (!HaveSemi) { OS << ";"; HaveSemi = true; |