From c3b73ce2de9f46b24849e9156c8f0343a1af7438 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 19 Mar 2015 23:27:42 +0000 Subject: [PATCH] Use the cached subtarget on the MachineFunction when the AsmPrinter will have a MachineFunction, i.e. in places other than the module level doInitialize/doFinalize. llvm-svn: 232783 --- lib/CodeGen/StackMaps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/StackMaps.cpp b/lib/CodeGen/StackMaps.cpp index 6422f1fe418..0393bf62bf2 100644 --- a/lib/CodeGen/StackMaps.cpp +++ b/lib/CodeGen/StackMaps.cpp @@ -160,7 +160,7 @@ StackMaps::createLiveOutReg(unsigned Reg, const TargetRegisterInfo *TRI) const { StackMaps::LiveOutVec StackMaps::parseRegisterLiveOutMask(const uint32_t *Mask) const { assert(Mask && "No register mask specified"); - const TargetRegisterInfo *TRI = AP.TM.getSubtargetImpl()->getRegisterInfo(); + const TargetRegisterInfo *TRI = AP.MF->getSubtarget().getRegisterInfo(); LiveOutVec LiveOuts; // Create a LiveOutReg for each bit that is set in the register mask.