[clang] [clang-repl][CodeGen] Add setOptLevel, #pragma clang repl optimize(N) (PR #214793)
Jonas Hahnfeld via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 1 00:03:45 PDT 2026
================
@@ -39,7 +39,7 @@ namespace {
IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS; // Only used for debug info.
const HeaderSearchOptions &HeaderSearchOpts; // Only used for debug info.
const PreprocessorOptions &PreprocessorOpts; // Only used for debug info.
- const CodeGenOptions &CodeGenOpts;
+ CodeGenOptions CodeGenOpts; // copied in so caller can modify
----------------
hahnjo wrote:
Commit ddeab07ca63235f8d952e1171b56fdb0f2d761c9 changed this to a reference. I think it should be sufficient to just update the `CodeGenOptions` in the `CompilerInvocation`, without passing copies around everywhere.
https://github.com/llvm/llvm-project/pull/214793
More information about the cfe-commits
mailing list