[llvm-commits] [llvm] r60965 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Devang Patel
dpatel at apple.com
Fri Dec 12 13:58:03 PST 2008
Author: dpatel
Date: Fri Dec 12 15:57:54 2008
New Revision: 60965
URL: http://llvm.org/viewvc/llvm-project?rev=60965&view=rev
Log:
Do not print empty DW_AT_comp_dir.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp?rev=60965&r1=60964&r2=60965&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfWriter.cpp Fri Dec 12 15:57:54 2008
@@ -1805,7 +1805,8 @@
AddString(Die, DW_AT_producer, DW_FORM_string, UnitDesc->getProducer());
AddUInt (Die, DW_AT_language, DW_FORM_data1, UnitDesc->getLanguage());
AddString(Die, DW_AT_name, DW_FORM_string, UnitDesc->getFileName());
- AddString(Die, DW_AT_comp_dir, DW_FORM_string, UnitDesc->getDirectory());
+ if (!UnitDesc->getDirectory().empty())
+ AddString(Die, DW_AT_comp_dir, DW_FORM_string, UnitDesc->getDirectory());
// Construct compile unit.
CompileUnit *Unit = new CompileUnit(UnitDesc, ID, Die);
More information about the llvm-commits
mailing list