diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-02-27 18:18:39 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-02-27 18:18:39 +0000 |
commit | 629cdbae948a101e6e20784e6d0e86929030462e (patch) | |
tree | 895a7612aadcd8bed73c0c3dcee31c2eaa734b93 /llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp | |
parent | af0ff1093ec4042c6abacf67ad30c6543887e674 (diff) | |
download | bcm5719-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/EHStreamer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp index 4841814afff..e4084db0535 100644 --- a/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp @@ -552,16 +552,14 @@ void EHStreamer::emitExceptionTable() { I = CallSites.begin(), E = CallSites.end(); I != E; ++I) { const CallSiteEntry &S = *I; - MCSymbol *EHFuncBeginSym = - Asm->GetTempSymbol("eh_func_begin", Asm->getFunctionNumber()); + MCSymbol *EHFuncBeginSym = Asm->getFunctionBegin(); MCSymbol *BeginLabel = S.BeginLabel; if (!BeginLabel) BeginLabel = EHFuncBeginSym; MCSymbol *EndLabel = S.EndLabel; if (!EndLabel) - EndLabel = Asm->GetTempSymbol("eh_func_end", Asm->getFunctionNumber()); - + EndLabel = Asm->getFunctionEnd(); // Offset of the call site relative to the previous call site, counted in // number of 16-byte bundles. The first call site is counted relative to |