diff options
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 010dfa0a79..947b420cd5 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. |