aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/ObjectFile.cpp
diff options
context:
space:
mode:
authorMichael Spencer <bigcheesegs@gmail.com>2024-01-16 15:32:43 -0800
committerGitHub <noreply@github.com>2024-01-16 15:32:43 -0800
commit894c22406f68af6574a62a40ec49e058344c324b (patch)
tree03c8f4059a9bd5b7a9c00c41eede487a3adf8dcd /llvm/lib/Object/ObjectFile.cpp
parente9e3e9d23dd4e06ed5d9adb156ced4ab3a1f34bc (diff)
downloadllvm-894c22406f68af6574a62a40ec49e058344c324b.zip
llvm-894c22406f68af6574a62a40ec49e058344c324b.tar.gz
llvm-894c22406f68af6574a62a40ec49e058344c324b.tar.bz2
[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
Diffstat (limited to 'llvm/lib/Object/ObjectFile.cpp')
-rw-r--r--llvm/lib/Object/ObjectFile.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Object/ObjectFile.cpp b/llvm/lib/Object/ObjectFile.cpp
index c05eb0a..6a226a3 100644
--- a/llvm/lib/Object/ObjectFile.cpp
+++ b/llvm/lib/Object/ObjectFile.cpp
@@ -155,6 +155,7 @@ ObjectFile::createObjectFile(MemoryBufferRef Object, file_magic Type,
switch (Type) {
case file_magic::unknown:
case file_magic::bitcode:
+ case file_magic::clang_ast:
case file_magic::coff_cl_gl_object:
case file_magic::archive:
case file_magic::macho_universal_binary: