summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-14 07:02:50 +0000
committerChris Lattner <sabre@nondot.org>2010-03-14 07:02:50 +0000
commit5a6e262c72880e825b7e2b53f8919919f5a87eb7 (patch)
tree5741971f2224272a90d7fe5fc4a0fce613bbe63f
parent04857fab702832bfe60018ec106bdb599a1d031b (diff)
downloadbcm5719-llvm-5a6e262c72880e825b7e2b53f8919919f5a87eb7.tar.gz
bcm5719-llvm-5a6e262c72880e825b7e2b53f8919919f5a87eb7.zip
Fix some EH failures on NNT I introduced in r98461
llvm-svn: 98471
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
index 000d93ff1b0..f79b2ab6f91 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp
@@ -247,17 +247,19 @@ void DwarfPrinter::EmitFrameMoves(MCSymbol *BaseLabel,
for (unsigned i = 0, N = Moves.size(); i < N; ++i) {
const MachineMove &Move = Moves[i];
+ MCSymbol *Label = 0;
unsigned LabelID = Move.getLabelID();
// Throw out move if the label is invalid.
- if (LabelID == 0) continue;
- MCSymbol *Label = getDWLabel("label", LabelID);
- if (!Label->isDefined()) continue; // Not emitted, in dead code.
+ if (LabelID) {
+ Label = getDWLabel("label", LabelID);
+ if (!Label->isDefined()) continue; // Not emitted, in dead code.
+ }
const MachineLocation &Dst = Move.getDestination();
const MachineLocation &Src = Move.getSource();
// Advance row if new location.
- if (BaseLabel) {
+ if (BaseLabel && Label) {
MCSymbol *ThisSym = Label;
if (ThisSym != BaseLabel) {
EmitCFAByte(dwarf::DW_CFA_advance_loc4);
OpenPOWER on IntegriCloud