[PATCH] D44054: [DWARFv5] Emit file 0 to the line table.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 28 10:52:31 PDT 2018


probinson added a comment.

In https://reviews.llvm.org/D44054#1050311, @dstenb wrote:

> With this change, we will emit the .file 0 directive even for -gdwarf-[234]. The directive results in an error when assembling with GAS. Should this be seen as a problem, or is it something that we accept?
>
> In general, when using -gdwarf-[234], to what degree should clang/LLVM be compatible with assemblers and other tools that only partially support DWARFv5?


You are correct, we should emit the '.file 0' directive and 'md5' clause only if we are producing DWARF v5.  If we are producing DWARF v5 we require that the assembler be able to handle the extra information correctly.

I have somewhat arbitrarily picked syntax for supporting these v5 features.  I don't know how to go about negotiating syntax with other assembler providers, or whether anyone else has started trying to produce standard DWARF v5 line tables.  If anyone has advice I'd be pleased to hear it.
Probably llvm-dev would be a better forum than this code review.


Repository:
  rL LLVM

https://reviews.llvm.org/D44054





More information about the llvm-commits mailing list