[all-commits] [llvm/llvm-project] b8f945: [CodeGen] Keep track info of lazy-emitted symbols ...
Jun Zhang via All-commits
all-commits at lists.llvm.org
Thu Jun 9 08:13:09 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b8f9459715815fa055b3e1c5f970c616797dfcfb
https://github.com/llvm/llvm-project/commit/b8f9459715815fa055b3e1c5f970c616797dfcfb
Author: Jun Zhang <jun at junz.org>
Date: 2022-06-09 (Thu, 09 Jun 2022)
Changed paths:
M clang/lib/CodeGen/CodeGenModule.h
M clang/lib/CodeGen/ModuleBuilder.cpp
M clang/test/Interpreter/execute.cpp
Log Message:
-----------
[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder
The intent of this patch is to selectively carry some states over to
the Builder so we won't lose the information of the previous symbols.
This used to be several downstream patches of Cling, it aims to fix
errors in Clang Interpreter when trying to use inline functions.
Before this patch:
clang-repl> inline int foo() { return 42;}
clang-repl> int x = foo();
JIT session error: Symbols not found: [ _Z3foov ]
error: Failed to materialize symbols:
{ (main, { x, $.incr_module_1.__inits.0, __orc_init_func.incr_module_1 }) }
Co-authored-by: Axel Naumann <Axel.Naumann at cern.ch>
Signed-off-by: Jun Zhang <jun at junz.org>
Differential Revision: https://reviews.llvm.org/D126781
More information about the All-commits
mailing list