[PATCH] D11003: Tolerate DWARF compile unit without filename.

David Srbecký dsrbecky at gmail.com
Tue Jul 7 12:17:30 PDT 2015


dsrbecky marked an inline comment as done.

As a side note, what is the compilation unit filename needed for?  The filenames in the line table are obviously used for PC->line mapping, and they may be referenced from the debug_info.  However, it is not clear to me why compilation unit needs a filename.  I believe it is perfectly valid to aggregate all debug information info to single compilation unit, and then there is no obvious primary source file.

Instead of taking the filename from line table, would it be valid to leave it empty?  I did not do that since I was worried what might break.

I have noticed that the support files copy compilation units filename to index 0.  I agree that the line table should be mapped to index 1 and further, but isn't 0 reserved as unknown/invalid?


http://reviews.llvm.org/D11003







More information about the llvm-commits mailing list