[all-commits] [llvm/llvm-project] cd64a4: Reland "[CodeGen] Keep track info of lazy-emitted ...

Jun Zhang via All-commits all-commits at lists.llvm.org
Sat Jun 18 05:28:00 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cd64a427efa0baaf1bb7ae624d4301908afc07f7
      https://github.com/llvm/llvm-project/commit/cd64a427efa0baaf1bb7ae624d4301908afc07f7
  Author: Jun Zhang <jun at junz.org>
  Date:   2022-06-18 (Sat, 18 Jun 2022)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.h
    M clang/lib/CodeGen/ModuleBuilder.cpp
    M clang/test/Interpreter/execute.cpp

  Log Message:
  -----------
  Reland "[CodeGen] Keep track info of lazy-emitted symbols in ModuleBuilder"

This reverts commits:
d3ddc251acae631bf5ab4da13878f7e8b5b5a451
d90eecff5c9e7e9f8263de6cd72d70322400829f

It turned out there're some options turned on that leaks the memory
intentionally, which fires the asan builds after the patch being
applied. The issue has been fixed in
7bc00ce5cd41aad5fd0775f58c8e85a0a8d9ee56, so reland it.

Below is the original commit message:

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>




More information about the All-commits mailing list