If tehre are not any line entry then do not try to emit .debug_line section.
llvm-svn: 120637
This commit is contained in:
parent
4be0bd79a4
commit
87b9114f49
|
@ -180,6 +180,9 @@ namespace llvm {
|
|||
bool hasDwarfFiles(void) {
|
||||
return MCDwarfFiles.size() != 0;
|
||||
}
|
||||
bool hasDwarfLines(void) {
|
||||
return MCLineSectionOrder.size() != 0;
|
||||
}
|
||||
|
||||
const std::vector<MCDwarfFile *> &getMCDwarfFiles() {
|
||||
return MCDwarfFiles;
|
||||
|
|
|
@ -876,7 +876,7 @@ void MCAsmStreamer::EmitRawText(StringRef String) {
|
|||
|
||||
void MCAsmStreamer::Finish() {
|
||||
// Dump out the dwarf file & directory tables and line tables.
|
||||
if (getContext().hasDwarfFiles() && TLOF) {
|
||||
if (getContext().hasDwarfFiles() && getContext().hasDwarfLines() && TLOF) {
|
||||
MCDwarfFileTable::Emit(this, TLOF->getDwarfLineSection(), NULL,
|
||||
PointerSize);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue