[llvm-commits] new .file directive

Nick Lewycky nlewycky at google.com
Wed Oct 12 16:05:11 PDT 2011


This patch implements a new extension to the .file directive. The intent is
to let the user control what goes into the directory name vs. the file name
section in the dwarf debug info. Currently, clang maintains them separately
all the way through bitcode into MCStreamer, which then concatenates them to
go through the existing .file method, then we split them back apart to be
put in the Dwarf file. GCC does the equivalent on their end too.

The novel syntax is ".file filenumber directory filename". The existing
.file directive should continue to work the same as it always did and
produce the same .o files. The syntax was proposed by Cary Coutant who will
be taking on adding this to binutils gas in the future.

Please review! In particular, the map<pair<string, string>, unsigned> is
pretty bad. Suggestions welcomed.

Finally, I'm planning to wait until after the llvm 3.0 branches before
committing this. Because clang already hands LLVM separate directory and
file parts, clang will immediately start emitting the new syntax through MC
(as will llc on existing .bc files!).

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111012/12493d0b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug-checkpoint-3.patch
Type: text/x-patch
Size: 15824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111012/12493d0b/attachment.bin>


More information about the llvm-commits mailing list