summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
index 7a82daa3337..676ce65dedb 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
@@ -450,9 +450,16 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
const MCSymbolRefExpr *ParentFrameOffsetRef = MCSymbolRefExpr::Create(
ParentFrameOffset, MCSymbolRefExpr::VK_None, Asm->OutContext);
+ MCSymbol *FrameAllocOffset =
+ Asm->OutContext.getOrCreateFrameAllocSymbol(
+ GlobalValue::getRealLinkageName(F->getName()),
+ HT.CatchObjRecoverIdx);
+ const MCSymbolRefExpr *FrameAllocOffsetRef = MCSymbolRefExpr::Create(
+ FrameAllocOffset, MCSymbolRefExpr::VK_None, Asm->OutContext);
+
OS.EmitIntValue(HT.Adjectives, 4); // Adjectives
OS.EmitValue(createImageRel32(HT.TypeDescriptor), 4); // Type
- OS.EmitIntValue(HT.CatchObjOffset, 4); // CatchObjOffset
+ OS.EmitValue(FrameAllocOffsetRef, 4); // CatchObjOffset
OS.EmitValue(createImageRel32(HT.Handler), 4); // Handler
OS.EmitValue(ParentFrameOffsetRef, 4); // ParentFrameOffset
}
OpenPOWER on IntegriCloud