[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 24 07:53:29 PDT 2025
================
@@ -760,8 +787,10 @@ std::unique_ptr<llvm::Module> Interpreter::GenModule() {
return nullptr;
}
-CodeGenerator *Interpreter::getCodeGen() const {
- FrontendAction *WrappedAct = Act->getWrapped();
+CodeGenerator *Interpreter::getCodeGen(IncrementalAction *Action) const {
+ if (!Action)
+ Action = Act.get();
+ FrontendAction *WrappedAct = Action->getWrapped();
----------------
vgvassilev wrote:
I do not understand this change. Is it because we call `getCodeGen` from both Device and Host compiler instance but we only return the codegen for the Host?
https://github.com/llvm/llvm-project/pull/136404
More information about the cfe-commits
mailing list