Do not print empty DW_AT_comp_dir.

llvm-svn: 60965
This commit is contained in:
Devang Patel 2008-12-12 21:57:54 +00:00
parent 8f352fe100
commit 42828e8168
1 changed files with 2 additions and 1 deletions

View File

@ -1805,7 +1805,8 @@ private:
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);