[llvm-commits] [llvm] r120637 - in /llvm/trunk: include/llvm/MC/MCContext.h lib/MC/MCAsmStreamer.cpp
Devang Patel
dpatel at apple.com
Wed Dec 1 17:17:51 PST 2010
Author: dpatel
Date: Wed Dec 1 19:17:51 2010
New Revision: 120637
URL: http://llvm.org/viewvc/llvm-project?rev=120637&view=rev
Log:
If tehre are not any line entry then do not try to emit .debug_line section.
Modified:
llvm/trunk/include/llvm/MC/MCContext.h
llvm/trunk/lib/MC/MCAsmStreamer.cpp
Modified: llvm/trunk/include/llvm/MC/MCContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCContext.h?rev=120637&r1=120636&r2=120637&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCContext.h (original)
+++ llvm/trunk/include/llvm/MC/MCContext.h Wed Dec 1 19:17:51 2010
@@ -180,6 +180,9 @@
bool hasDwarfFiles(void) {
return MCDwarfFiles.size() != 0;
}
+ bool hasDwarfLines(void) {
+ return MCLineSectionOrder.size() != 0;
+ }
const std::vector<MCDwarfFile *> &getMCDwarfFiles() {
return MCDwarfFiles;
Modified: llvm/trunk/lib/MC/MCAsmStreamer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCAsmStreamer.cpp?rev=120637&r1=120636&r2=120637&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCAsmStreamer.cpp (original)
+++ llvm/trunk/lib/MC/MCAsmStreamer.cpp Wed Dec 1 19:17:51 2010
@@ -876,7 +876,7 @@
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);
}
More information about the llvm-commits
mailing list