diff options
author | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-02-23 19:17:31 +0000 |
---|---|---|
committer | Ahmed Bougacha <ahmed.bougacha@gmail.com> | 2017-02-23 19:17:31 +0000 |
commit | 4319224628337a6681e87575e50007e86d4cd459 (patch) | |
tree | 9d79380a17a0a11f129ff04bcb8258994a762a7b /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 1b3339447dbbb13a885e6b11398d77ceb1d92ba2 (diff) | |
download | bcm5719-llvm-4319224628337a6681e87575e50007e86d4cd459.tar.gz bcm5719-llvm-4319224628337a6681e87575e50007e86d4cd459.zip |
[CodeGen] Add a way to SkipDebugLoc in MachineInstr::print(). NFC.
llvm-svn: 296007
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 011f6be7770..acd61dddd20 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1699,7 +1699,7 @@ LLVM_DUMP_METHOD void MachineInstr::dump() const { } #endif -void MachineInstr::print(raw_ostream &OS, bool SkipOpers, +void MachineInstr::print(raw_ostream &OS, bool SkipOpers, bool SkipDebugLoc, const TargetInstrInfo *TII) const { const Module *M = nullptr; if (const MachineBasicBlock *MBB = getParent()) @@ -1707,11 +1707,12 @@ void MachineInstr::print(raw_ostream &OS, bool SkipOpers, M = MF->getFunction()->getParent(); ModuleSlotTracker MST(M); - print(OS, MST, SkipOpers, TII); + print(OS, MST, SkipOpers, SkipDebugLoc, TII); } void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, - bool SkipOpers, const TargetInstrInfo *TII) const { + bool SkipOpers, bool SkipDebugLoc, + const TargetInstrInfo *TII) const { // We can be a bit tidier if we know the MachineFunction. const MachineFunction *MF = nullptr; const TargetRegisterInfo *TRI = nullptr; @@ -1987,7 +1988,7 @@ void MachineInstr::print(raw_ostream &OS, ModuleSlotTracker &MST, } if (isIndirectDebugValue()) OS << " indirect"; - } else if (debugLoc && MF) { + } else if (debugLoc && MF && !SkipDebugLoc) { if (!HaveSemi) OS << ";"; OS << " dbg:"; |