[clang] [clang-tools-extra] [lldb] [llvm] [clang][modules] Serialize `CodeGenOptions` (PR #146422)
Jan Svoboda via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 15 11:10:21 PDT 2025
================
@@ -46,13 +46,32 @@ class CodeGenOptionsBase {
enum class CompatibilityKind {
/// Does affect the construction of the AST in a way that does prevent
/// module interoperability.
- Affecting,
+ NotCompatible,
+ /// Does affect the construction of the AST in a way that doesn't prevent
+ /// interoperability (that is, the value can be different between an
+ /// explicit module and the user of that module).
+ Compatible,
/// Does not affect the construction of the AST in any way (that is, the
/// value can be different between an implicit module and the user of that
/// module).
Benign,
};
+ using CFBranchLabelSchemeKind = CFBranchLabelSchemeKind;
+ using ProfileInstrKind = llvm::driver::ProfileInstrKind;
----------------
jansvoboda11 wrote:
These are necessary, because now we use these types outside of `CodeGenOptions` in `ASTReader::ParseCodeGenOptions()` so we either need to fully qualify the types in `CodeGenOptions.def` or leave just the type names without namespaces, pull the types into `CodeGenOptions` and qualify them with `clang::CodeGenOptions::` in clients. That's what `LangOptions` do, so I chose to do it here for consistency.
https://github.com/llvm/llvm-project/pull/146422
More information about the llvm-commits
mailing list