[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-17 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Ah, looks like all the other gmodules tests have: ``` // Unsupported on AIX because we don't support the requisite "__clangast" // section in XCOFF yet. // UNSUPPORTED: target={{.*}}-aix{{.*}} ``` I'll just add that. https://github.com/llvm/llvm-project/pull/77711

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-17 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Yep, I'll take a look. 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

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-17 Thread Jake Egan via cfe-commits
jakeegan wrote: Hi, on AIX we are seeing ``` error: input is not a PCH file: '/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/PCH/Output/gch-probe.c.tmp.h.gch' fatal error: file

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. 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

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-11 Thread via cfe-commits
zmodem wrote: > > What does the code that reads these files look like, could we leverage that > > somehow? > > You can call `clang::ObjectFilePCHContainerReader::ExtractPCH()` and then > check the magic. This lives in the CodeGen library which I don't think the > driver currently (or should)

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-11 Thread Michael Spencer via cfe-commits
Bigcheese wrote: > What does the code that reads these files look like, could we leverage that > somehow? You can call `clang::ObjectFilePCHContainerReader::ExtractPCH()` and then check the magic. This lives in the CodeGen library which I don't think the driver currently (or should) links

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-11 Thread via cfe-commits
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

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-binary-utilities Author: Michael Spencer (Bigcheese) Changes A previous commit (82f75ed) made clang ignore .gch files that were not Clang AST files. This broke `-gmodules`, which embeds the Clang AST into an object file

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-10 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/77711 A previous commit (82f75ed) made clang ignore .gch files that were not Clang AST files. This broke `-gmodules`, which embeds the Clang AST into an object file containing debug info. This changes the probing