llvm-project/clang/test/Interpreter
Jun Zhang a4f84f1b2e
[CodeGen] Track DeferredDecls that have been emitted
If we run into a first usage or definition of a mangled name, and
there's a DeferredDecl that associated with it, we should remember it we
need to emit it later on.

Without this patch, clang-repl hits a JIT symbol not found error:
clang-repl> extern "C" int printf(const char *, ...);
clang-repl> auto l1 = []() { printf("ONE\n"); return 42; };
clang-repl> auto l2 = []() { printf("TWO\n"); return 17; };
clang-repl> auto r1 = l1();
ONE
clang-repl> auto r2 = l2();
TWO
clang-repl> auto r3 = l2();
JIT session error: Symbols not found: [ l2 ]
error: Failed to materialize symbols: { (main,
{ r3, orc_init_func.incr_module_5, $.incr_module_5.inits.0 }) }

Signed-off-by: Jun Zhang <jun@junz.org>

Differential Revision: https://reviews.llvm.org/D130831
2022-08-27 22:32:47 +08:00
..
code-undo.cpp [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
execute-weak.cpp [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
execute.cpp [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
fail.cpp [clang-repl] Fix incorrect return code 2022-07-31 19:07:05 +08:00
global-dtor.cpp [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
incremental-mode.cpp Handles failing driver tests of clang 2022-08-02 12:29:26 +05:30
lambda.cpp [CodeGen] Track DeferredDecls that have been emitted 2022-08-27 22:32:47 +08:00
lit.local.cfg [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
plugins.cpp [clang-repl] Disable building when LLVM_STATIC_LINK_CXX_STDLIB is ON. 2022-07-31 05:42:57 +09:00
sanity.c [clang-repl] Implement code undo. 2022-06-26 18:32:18 +08:00
simple-exception.cpp [clang-repl] XFAIL windows properly in simple-exception test case. 2022-08-01 09:06:35 +09:00