diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-14 07:02:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-14 07:02:50 +0000 |
commit | f14645cc6474dab76b266906575ce4e4d018e9ee (patch) | |
tree | 6a3d3fa62d0f8c70eed6bacbdf63321cbf88fc62 | |
parent | 21f9c8de53936ad5aa9e1f37cc68efa493c2ca94 (diff) |
Fix some EH failures on NNT I introduced in r98461
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98471 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index 000d93ff1b..f79b2ab6f9 100644 --- a/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/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); |