[clang] Fix for a clang-repl crash when passing non-existent file to --Xcc (PR #225861)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 25 10:50:04 PDT 2026
================
@@ -127,6 +127,10 @@ class Interpreter {
/// An optional compiler instance for CUDA offloading
std::unique_ptr<CompilerInstance> DeviceCI;
+ /// This member is set when source file has been successfully created. It
+ /// will be used to gate 'ending' this file when the object is destroyed.
+ bool SourceFileCreated = false;
----------------
asudarsa-qti wrote:
I found another way to resolve this issue. I check if the current input in FrontendAction is empty. If not empty. only then do I invoke EndSourceFile.
Please let me know if this is agreeable.
Thanks
https://github.com/llvm/llvm-project/pull/225861
More information about the cfe-commits
mailing list