[StackMaps] Use CurrentFnSymForSize
authorHal Finkel <hfinkel@anl.gov>
Tue, 13 Jan 2015 17:48:07 +0000 (17:48 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 13 Jan 2015 17:48:07 +0000 (17:48 +0000)
When computing the call-site offset, use AP.CurrentFnSymForSize instead of
AP.CurrentFnSym. There should be no change for other targets, but this is
necessary for generating valid expressions for PPC64/ELF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225807 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/StackMaps.cpp

index aab8d5221444360e548ffc5093f5473a6888b4b8..f1d1160c9528921eb47310f1900827c5ee79694a 100644 (file)
@@ -241,7 +241,7 @@ void StackMaps::recordStackMapOpers(const MachineInstr &MI, uint64_t ID,
   // entry.
   const MCExpr *CSOffsetExpr = MCBinaryExpr::CreateSub(
     MCSymbolRefExpr::Create(MILabel, OutContext),
-    MCSymbolRefExpr::Create(AP.CurrentFnSym, OutContext),
+    MCSymbolRefExpr::Create(AP.CurrentFnSymForSize, OutContext),
     OutContext);
 
   CSInfos.emplace_back(CSOffsetExpr, ID, std::move(Locations),