[WinEH] Use the parent function when computing frameescape labels
[oota-llvm.git] / lib / CodeGen / AsmPrinter / Win64Exception.cpp
index 8cbf3407cf70800d485c43eb1cdb2ce1a1994ef1..0d422d83e2d372b439b1dcf676ca8a0954c8766e 100644 (file)
@@ -468,7 +468,7 @@ void Win64Exception::emitCXXFrameHandler3Table(const MachineFunction *MF) {
         if (HT.CatchObjRecoverIdx >= 0) {
           MCSymbol *FrameAllocOffset =
               Asm->OutContext.getOrCreateFrameAllocSymbol(
-                  GlobalValue::getRealLinkageName(F->getName()),
+                  GlobalValue::getRealLinkageName(ParentF->getName()),
                   HT.CatchObjRecoverIdx);
           FrameAllocOffsetRef = MCSymbolRefExpr::Create(
               FrameAllocOffset, MCSymbolRefExpr::VK_None, Asm->OutContext);