summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-02-27 18:18:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-02-27 18:18:39 +0000
commit629cdbae948a101e6e20784e6d0e86929030462e (patch)
tree895a7612aadcd8bed73c0c3dcee31c2eaa734b93 /llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
parentaf0ff1093ec4042c6abacf67ad30c6543887e674 (diff)
downloadbcm5719-llvm-629cdbae948a101e6e20784e6d0e86929030462e.tar.gz
bcm5719-llvm-629cdbae948a101e6e20784e6d0e86929030462e.zip
Centralize handling of the eh_begin and eh_end labels.
This removes a bit of duplicated code and more importantly, remembers the labels so that they don't need to be looked up by name. This in turn allows for any name to be used and avoids a crash if the name we wanted was already taken. llvm-svn: 230772
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
index 2b03877faec..356a35135d1 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
@@ -80,9 +80,6 @@ void Win64Exception::beginFunction(const MachineFunction *MF) {
const MCSymbol *PersHandlerSym =
TLOF.getCFIPersonalitySymbol(Per, *Asm->Mang, Asm->TM, MMI);
Asm->OutStreamer.EmitWinEHHandler(PersHandlerSym, true, true);
-
- Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_begin",
- Asm->getFunctionNumber()));
}
/// endFunction - Gather and emit post-function exception information.
@@ -91,9 +88,6 @@ void Win64Exception::endFunction(const MachineFunction *) {
if (!shouldEmitPersonality && !shouldEmitMoves)
return;
- Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("eh_func_end",
- Asm->getFunctionNumber()));
-
// Map all labels and get rid of any dead landing pads.
MMI->TidyLandingPads();
@@ -170,10 +164,8 @@ void Win64Exception::emitCSpecificHandlerTable() {
SmallVector<CallSiteEntry, 64> CallSites;
computeCallSiteTable(CallSites, LandingPads, FirstActions);
- MCSymbol *EHFuncBeginSym =
- Asm->GetTempSymbol("eh_func_begin", Asm->getFunctionNumber());
- MCSymbol *EHFuncEndSym =
- Asm->GetTempSymbol("eh_func_end", Asm->getFunctionNumber());
+ MCSymbol *EHFuncBeginSym = Asm->getFunctionBegin();
+ MCSymbol *EHFuncEndSym = Asm->getFunctionEnd();
// Emit the number of table entries.
unsigned NumEntries = 0;
OpenPOWER on IntegriCloud