diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-06-22 22:00:56 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2014-06-22 22:00:56 +0000 |
commit | d77cefe633bd1a107232def8b9655978b8f6fe41 (patch) | |
tree | 094df9f6e776674d09e5deceae78b48f6de00371 /llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp | |
parent | ac4e8e5fcad38e749a1e151b124fd3e71c6747a6 (diff) | |
download | bcm5719-llvm-d77cefe633bd1a107232def8b9655978b8f6fe41.tar.gz bcm5719-llvm-d77cefe633bd1a107232def8b9655978b8f6fe41.zip |
Revert r211399, "Generate native unwind info on Win64"
It broke Legacy JIT Tests on x86_64-{mingw32|msvc}, aka Windows x64.
llvm-svn: 211480
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp index 89bf89fdd75..4768a43e9a6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp @@ -77,9 +77,9 @@ void Win64Exception::beginFunction(const MachineFunction *MF) { if (!shouldEmitPersonality) return; - const MCSymbol *PersHandlerSym = - TLOF.getCFIPersonalitySymbol(Per, *Asm->Mang, Asm->TM, MMI); - Asm->OutStreamer.EmitWin64EHHandler(PersHandlerSym, true, true); + MCSymbol *GCCHandlerSym = + Asm->GetExternalSymbolSymbol("_GCC_specific_handler"); + Asm->OutStreamer.EmitWin64EHHandler(GCCHandlerSym, true, true); Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_begin", Asm->getFunctionNumber())); @@ -98,8 +98,15 @@ void Win64Exception::endFunction(const MachineFunction *) { MMI->TidyLandingPads(); if (shouldEmitPersonality) { + const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering(); + const Function *Per = MMI->getPersonalities()[MMI->getPersonalityIndex()]; + const MCSymbol *Sym = + TLOF.getCFIPersonalitySymbol(Per, *Asm->Mang, Asm->TM, MMI); + Asm->OutStreamer.PushSection(); Asm->OutStreamer.EmitWin64EHHandlerData(); + Asm->OutStreamer.EmitValue(MCSymbolRefExpr::Create(Sym, Asm->OutContext), + 4); emitExceptionTable(); Asm->OutStreamer.PopSection(); } |