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.<div>

<br></div><div>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.</div>

<div><br></div><div>Please review! In particular, the map<pair<string, string>, unsigned> is pretty bad. Suggestions welcomed.</div><div><br></div><div>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!).</div>

<div><br></div><div>Nick</div><div><br></div>