summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-03-17 12:54:04 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-03-17 12:54:04 +0000
commitba41539548edc7747f09c66d5c337c4b1eb3750e (patch)
tree23d9574063f6e2b190629c6fda3c1fbcb0b95895 /llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
parent914b947e9bef4b6565e27930e903d2ed60981559 (diff)
downloadbcm5719-llvm-ba41539548edc7747f09c66d5c337c4b1eb3750e.tar.gz
bcm5719-llvm-ba41539548edc7747f09c66d5c337c4b1eb3750e.zip
Replace a use of GetTempSymbol with createTempSymbol.
This is cleaner and avoids a crash in a corner case. llvm-svn: 232471
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index 0631592c080..5263a2afd0f 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
@@ -87,9 +87,9 @@ void DwarfCFIException::endModule() {
}
}
-/// beginFunction - Gather pre-function exception information. Assumes it's
-/// being emitted immediately after the function entry point.
void DwarfCFIException::beginFunction(const MachineFunction *MF) {
+ DwarfCFIExceptionBase::beginFunction(MF);
+
shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA = false;
// If any landing pads survive, we need an EH table.
@@ -133,9 +133,7 @@ void DwarfCFIException::beginFunction(const MachineFunction *MF) {
if (!shouldEmitLSDA)
return;
- Asm->OutStreamer.EmitCFILsda(Asm->GetTempSymbol("exception",
- Asm->getFunctionNumber()),
- LSDAEncoding);
+ Asm->OutStreamer.EmitCFILsda(getCurExceptionSym(), LSDAEncoding);
}
/// endFunction - Gather and emit post-function exception information.
OpenPOWER on IntegriCloud