diff options
| author | Andrew Lenharth <andrewl@lenharth.org> | 2008-04-03 17:37:43 +0000 |
|---|---|---|
| committer | Andrew Lenharth <andrewl@lenharth.org> | 2008-04-03 17:37:43 +0000 |
| commit | bfb7246fb6a8aa8e973592fe8f36b935338b55eb (patch) | |
| tree | 3ca6896e2cec851376d6c1ec37bbd5d7e771faf1 /llvm/lib/CodeGen/DwarfWriter.cpp | |
| parent | 73ac2048f966be0e1be57c254e4941918e9d2272 (diff) | |
| download | bcm5719-llvm-bfb7246fb6a8aa8e973592fe8f36b935338b55eb.tar.gz bcm5719-llvm-bfb7246fb6a8aa8e973592fe8f36b935338b55eb.zip | |
if some functions don't have debug info, we were outputing the same label at the start of each of those functions. This makes assemblers unhappy
llvm-svn: 49176
Diffstat (limited to 'llvm/lib/CodeGen/DwarfWriter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/DwarfWriter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/DwarfWriter.cpp b/llvm/lib/CodeGen/DwarfWriter.cpp index 010dfa0a793..947b420cd51 100644 --- a/llvm/lib/CodeGen/DwarfWriter.cpp +++ b/llvm/lib/CodeGen/DwarfWriter.cpp @@ -2720,8 +2720,11 @@ public: // Emit label for the implicitly defined dbg.stoppoint at the start of // the function. - const SourceLineInfo &LineInfo = MMI->getSourceLines()[0]; - Asm->printLabel(LineInfo.getLabelID()); + const std::vector<SourceLineInfo> &LineInfos = MMI->getSourceLines(); + if (!LineInfos.empty()) { + const SourceLineInfo &LineInfo = LineInfos[0]; + Asm->printLabel(LineInfo.getLabelID()); + } } /// EndFunction - Gather and emit post-function debug information. |

