[all-commits] [llvm/llvm-project] 8082a0: [CodeGen] Keep track of decls that were deferred a...
Jun Zhang via All-commits
all-commits at lists.llvm.org
Wed Jul 13 05:01:20 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8082a00286380d0dafa05bfe5ddfe6075b9769f9
https://github.com/llvm/llvm-project/commit/8082a00286380d0dafa05bfe5ddfe6075b9769f9
Author: Jun Zhang <jun at junz.org>
Date: 2022-07-13 (Wed, 13 Jul 2022)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/CodeGen/CodeGenModule.h
M clang/test/Interpreter/code-undo.cpp
Log Message:
-----------
[CodeGen] Keep track of decls that were deferred and have been emitted.
This patch adds a new field called EmittedDeferredDecls in CodeGenModule
that keeps track of decls that were deferred and have been emitted.
The intention of this patch is to solve issues in the incremental c++,
we'll lose info of decls that are lazily emitted when we undo their
usage.
See example below:
clang-repl> inline int foo() { return 42;}
clang-repl> int bar = foo();
clang-repl> %undo
clang-repl> int baz = foo();
JIT session error: Symbols not found: [ _Z3foov ]
error: Failed to materialize symbols: { (main, { baz, $.incr_module_2.inits.0,
orc_init_func.incr_module_2 }) }
Signed-off-by: Jun Zhang <jun at junz.org>
Differential Revision: https://reviews.llvm.org/D128782
More information about the All-commits
mailing list