summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineOperand.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-15 15:17:18 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-15 15:17:18 +0000
commit5de20e039ed65ae729cf0502b71cfafbd0f9617e (patch)
tree60cce37f38211b0685068cc4fe743667ffd4a11c /llvm/lib/CodeGen/MachineOperand.cpp
parent9b332d997f9f003b4a8539c2f846a2fc4885f128 (diff)
downloadbcm5719-llvm-5de20e039ed65ae729cf0502b71cfafbd0f9617e.tar.gz
bcm5719-llvm-5de20e039ed65ae729cf0502b71cfafbd0f9617e.zip
[MIR] Add support for missing CFI directives
The following CFI directives are suported by MC but not by MIR: * .cfi_rel_offset * .cfi_adjust_cfa_offset * .cfi_escape * .cfi_remember_state * .cfi_restore_state * .cfi_undefined * .cfi_register * .cfi_window_save Add support for printing, parsing and update tests. Differential Revision: https://reviews.llvm.org/D41230 llvm-svn: 320819
Diffstat (limited to 'llvm/lib/CodeGen/MachineOperand.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOperand.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index 1640d57eb48..c95fb127d7b 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -472,6 +472,10 @@ void MachineOperand::printTargetFlags(raw_ostream &OS,
OS << ") ";
}
+void MachineOperand::printSymbol(raw_ostream &OS, MCSymbol &Sym) {
+ OS << "<mcsymbol " << Sym << ">";
+}
+
void MachineOperand::print(raw_ostream &OS, const TargetRegisterInfo *TRI,
const TargetIntrinsicInfo *IntrinsicInfo) const {
tryToGetTargetInfo(*this, TRI, IntrinsicInfo);
@@ -660,7 +664,7 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
getMetadata()->printAsOperand(OS, MST);
break;
case MachineOperand::MO_MCSymbol:
- OS << "<mcsymbol " << *getMCSymbol() << ">";
+ printSymbol(OS, *getMCSymbol());
break;
case MachineOperand::MO_CFIIndex:
OS << "<call frame instruction>";
OpenPOWER on IntegriCloud