summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2017-10-10 23:50:49 +0000
committerJustin Bogner <mail@justinbogner.com>2017-10-10 23:50:49 +0000
commitfdf9bf4f16739daa62fa8d9177b1c3a8346728ae (patch)
tree8184e1ecc06220f23157214474c5ae63e04a1050 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
parent0bf7717a02cd483e0272c30195da1740efcae9ed (diff)
downloadbcm5719-llvm-fdf9bf4f16739daa62fa8d9177b1c3a8346728ae.tar.gz
bcm5719-llvm-fdf9bf4f16739daa62fa8d9177b1c3a8346728ae.zip
CodeGen: Minor cleanups to use MachineInstr::getMF. NFC
Since r315388 we have a shorter way to say this, so we'll replace MI->getParent()->getParent() with MI->getMF() in a few places. llvm-svn: 315390
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 75de005bea1..b183dde4baf 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -744,7 +744,7 @@ void AsmPrinter::EmitFunctionEntryLabel() {
/// emitComments - Pretty-print comments for instructions.
static void emitComments(const MachineInstr &MI, raw_ostream &CommentOS,
AsmPrinter *AP) {
- const MachineFunction *MF = MI.getParent()->getParent();
+ const MachineFunction *MF = MI.getMF();
const TargetInstrInfo *TII = MF->getSubtarget().getInstrInfo();
// Check for spills and reloads
@@ -2846,7 +2846,7 @@ void AsmPrinter::emitXRayTable() {
void AsmPrinter::recordSled(MCSymbol *Sled, const MachineInstr &MI,
SledKind Kind, uint8_t Version) {
- auto Fn = MI.getParent()->getParent()->getFunction();
+ auto Fn = MI.getMF()->getFunction();
auto Attr = Fn->getFnAttribute("function-instrument");
bool LogArgs = Fn->hasFnAttribute("xray-log-args");
bool AlwaysInstrument =
OpenPOWER on IntegriCloud