[all-commits] [llvm/llvm-project] 5ad3a3: [clang][modules] Reset codegen options (take 2). (...
Juergen Ributzka via All-commits
all-commits at lists.llvm.org
Tue Dec 5 08:31:35 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5ad3a32c79319b0721cb26398946b9a59b50d264
https://github.com/llvm/llvm-project/commit/5ad3a32c79319b0721cb26398946b9a59b50d264
Author: Juergen Ributzka <juergen at ributzka.de>
Date: 2023-12-05 (Tue, 05 Dec 2023)
Changed paths:
M clang/include/clang/Basic/CodeGenOptions.def
M clang/include/clang/Basic/CodeGenOptions.h
A clang/include/clang/Basic/DebugOptions.def
M clang/include/module.modulemap
M clang/lib/Basic/CodeGenOptions.cpp
M clang/lib/Frontend/CompilerInvocation.cpp
A clang/test/ClangScanDeps/strip-codegen-args.m
Log Message:
-----------
[clang][modules] Reset codegen options (take 2). (#74388)
CodeGen options do not affect the AST, so they usually can be ignored.
The only exception to the rule is when a PCM is created with
`-gmodules`.
In that case the Clang module format is switched to object file
container and contains also serialized debug information that can be
affected by debug options. There the following approach was choosen:
1.) Split out all the debug options into a separate `DebugOptions.def`
file. The file is included by `CodeGenOptions.def`, so the change is
transparent to all existing users of `CodeGenOptions.def`.
2.) Reset all CodeGen options, but excluding affecting debug options.
3.) Conditionally reset debug options that can affect the PCM.
This fixes rdar://113135909.
More information about the All-commits
mailing list