[PATCH] D146389: [clang-repl][CUDA] Initial interactive CUDA support for clang-repl
Anubhab Ghosh via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 13 11:09:38 PDT 2023
argentite added inline comments.
================
Comment at: clang/lib/CodeGen/ModuleBuilder.cpp:39
const PreprocessorOptions &PreprocessorOpts; // Only used for debug info.
- const CodeGenOptions CodeGenOpts; // Intentionally copied in.
+ CodeGenOptions CodeGenOpts; // Intentionally copied in.
----------------
v.g.vassilev wrote:
> IIUC history correctly, here the intentional copy was to prevent some layering violation for what was called in 2009 `CompileOpts`. I believe that is not the case, can you check if we can take a const reference here?
I don't understand how the reference causes layering violation but if I change it to a const reference instead, the option modification code becomes slightly less awkward and all tests seem to be fine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146389/new/
https://reviews.llvm.org/D146389
More information about the cfe-commits
mailing list