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 | 51dd8c9224e58c12a846327bd8cfab7b639a9905 (patch) | |
tree | eba11c3e71935dd284ea7a731c117623bf0a92ad /lib/CodeGen/DwarfWriter.cpp | |
parent | a150ffeada69d6d5ff18f5caf3473e2cfb95d91f (diff) | |
download | external_llvm-51dd8c9224e58c12a846327bd8cfab7b639a9905.zip external_llvm-51dd8c9224e58c12a846327bd8cfab7b639a9905.tar.gz external_llvm-51dd8c9224e58c12a846327bd8cfab7b639a9905.tar.bz2 |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49176 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/DwarfWriter.cpp')
-rw-r--r-- | lib/CodeGen/DwarfWriter.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/CodeGen/DwarfWriter.cpp b/lib/CodeGen/DwarfWriter.cpp index 010dfa0..947b420 100644 --- a/lib/CodeGen/DwarfWriter.cpp +++ b/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. |