boris added a comment.

Yes, the main "feature" of this approach compared to @file is the ability to 
reuse an already existing file to store this information. Most build systems 
that support C/C++ compilation have to store auxiliary dependency information 
at least for the extracted header dependencies (those .d files generated by the 
-M option family, for example) but some also store hashes of options, compiler 
version/signature, etc. So instead of creating a yet another file (per 
translation unit), the idea is to reuse the already existing one by storing the 
mapping with some "distinguishing" prefix. As a concrete example, a make-based 
build system could append it to the .d file (which is a makefile fragment)  as 
comments. How exactly this information is extracted is still an open question 
but I think this approach is generic enough to accommodate a wide range of 
possibilities (for example, -M could produce this information or the build 
system could append it itself after the -M is done).


https://reviews.llvm.org/D37299



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to