zmodem wrote:

Thanks for looking into this. I wasn't aware of `-gmodules` relying on "gch 
probing" when I wrote the previous patch.

It seems unfortunate to make `maybeHasClangPchSignature` so broad as to return 
true for any file format that we recognize. Would it be possible to at least 
tighten it to only consider the kind of object files which could have a 
clangast section? Or is that list too long? What does the code that reads these 
files look like, could we leverage that somehow?

An alternative would be turn the logic around, and only ignore GCC PCH files (I 
believe they all start with the file magic `gpch`). However I do think that the 
current approach of "whitelisting" the kind of file we're looking for is better.

https://github.com/llvm/llvm-project/pull/77711
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to