Use the cached subtarget on the MachineFunction when the AsmPrinter
authorEric Christopher <echristo@gmail.com>
Thu, 19 Mar 2015 23:27:42 +0000 (23:27 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 19 Mar 2015 23:27:42 +0000 (23:27 +0000)
will have a MachineFunction, i.e. in places other than the module
level doInitialize/doFinalize.

llvm-svn: 232783

llvm/lib/CodeGen/StackMaps.cpp

index 6422f1f..0393bf6 100644 (file)
@@ -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.