summaryrefslogtreecommitdiffstats
path: root/lib/MC/MCAsmStreamer.cpp
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-12-02 01:17:51 +0000
committerDevang Patel <dpatel@apple.com>2010-12-02 01:17:51 +0000
commit6a13ddbd9b2159303996db44db6045730d0fe479 (patch)
tree349c2be3cf78d25af2b0b55f6f0511dc8e0ede70 /lib/MC/MCAsmStreamer.cpp
parent0613516b16466a92c68d60734801221506c85e86 (diff)
downloadexternal_llvm-6a13ddbd9b2159303996db44db6045730d0fe479.zip
external_llvm-6a13ddbd9b2159303996db44db6045730d0fe479.tar.gz
external_llvm-6a13ddbd9b2159303996db44db6045730d0fe479.tar.bz2
If tehre are not any line entry then do not try to emit .debug_line section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120637 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r--lib/MC/MCAsmStreamer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index c03f969..02b6662 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/lib/MC/MCAsmStreamer.cpp
@@ -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);
}