diff options
author | Ben Langmuir <blangmuir@apple.com> | 2023-05-02 13:55:46 -0700 |
---|---|---|
committer | Ben Langmuir <blangmuir@apple.com> | 2023-05-03 12:07:46 -0700 |
commit | 8fe8d69ddf881db70cb8df31e614a06e633e2c5f (patch) | |
tree | 39132e13a6ad66975b72e56160445d5eb10f0a74 /clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | |
parent | 3b01fa264c36c1c7bb293f001579e0f459a92b84 (diff) | |
download | llvm-8fe8d69ddf881db70cb8df31e614a06e633e2c5f.zip llvm-8fe8d69ddf881db70cb8df31e614a06e633e2c5f.tar.gz llvm-8fe8d69ddf881db70cb8df31e614a06e633e2c5f.tar.bz2 |
[clang][deps] Make clang-scan-deps write modules in raw format
We have no use for debug info for the scanner modules, and writing raw
ast files speeds up scanning ~15% in some cases. Note that the compile
commands produced by the scanner will still build the obj format (if
requested), and the scanner can *read* obj format pcms, e.g. from a PCH.
rdar://108807592
Differential Revision: https://reviews.llvm.org/D149693
Diffstat (limited to 'clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp')
-rw-r--r-- | clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index 07db4a6..114a9c1 100644 --- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp @@ -349,6 +349,11 @@ ObjectFilePCHContainerWriter::CreatePCHContainerGenerator( CI, MainFileName, OutputFileName, std::move(OS), Buffer); } +ArrayRef<StringRef> ObjectFilePCHContainerReader::getFormats() const { + static StringRef Formats[] = {"obj", "raw"}; + return Formats; +} + StringRef ObjectFilePCHContainerReader::ExtractPCH(llvm::MemoryBufferRef Buffer) const { StringRef PCH; |