[PATCH] D28095: [ELF] - Use information available from DW_AT_comp_dir attribute when doing error reporting.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 24 07:42:49 PST 2016


grimar created this revision.
grimar added reviewers: ruiu, rafael, evgeny777, davide.
grimar added subscribers: llvm-commits, grimar.

Imagine we call clang -g aaa/bbb.cpp. Current error reporting would
print something like:
error: aaa/bbb.cpp ❌ error text.

But we are able to print full path including current working directory of a compilation command,
like: /home/bar/some_path/aaa/bbb.cpp:1: text

We can get this information from DW_AT_comp_dir attribute which is:
"A DW_AT_comp_dir attribute whose value is a null-terminated string containing the current
working directory of the compilation command that produced this compilation unit in
whatever form makes sense for the host system."

Idea of doing that change belongs to Eugene Leviant, thanks again !


https://reviews.llvm.org/D28095

Files:
  ELF/InputFiles.cpp
  ELF/InputFiles.h
  test/ELF/conflict2.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28095.82444.patch
Type: text/x-patch
Size: 7597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161224/8dc76d38/attachment.bin>


More information about the llvm-commits mailing list