[all-commits] [llvm/llvm-project] 894c22: [clang][Driver] Don't ignore -gmodules .gch files ...

Michael Spencer via All-commits all-commits at lists.llvm.org
Tue Jan 16 15:32:55 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 894c22406f68af6574a62a40ec49e058344c324b
      https://github.com/llvm/llvm-project/commit/894c22406f68af6574a62a40ec49e058344c324b
  Author: Michael Spencer <bigcheesegs at gmail.com>
  Date:   2024-01-16 (Tue, 16 Jan 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/test/PCH/gch-probe.c
    M llvm/include/llvm/BinaryFormat/Magic.h
    M llvm/lib/BinaryFormat/Magic.cpp
    M llvm/lib/Object/Binary.cpp
    M llvm/lib/Object/ObjectFile.cpp

  Log Message:
  -----------
  [clang][Driver] Don't ignore -gmodules .gch files (#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 to detect any file format recognized by
`llvm::identify_magic()` as potentially containing a Clang AST.

Previous PR: https://github.com/llvm/llvm-project/pull/69204




More information about the All-commits mailing list