[all-commits] [llvm/llvm-project] f8dade: [CodeGen] Keep track of eagerly emitted globals

Jonas Hahnfeld via All-commits all-commits at lists.llvm.org
Thu Aug 17 04:42:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f8dadefd4afc8e1b7b9a1e69a0ba8df051e03328
      https://github.com/llvm/llvm-project/commit/f8dadefd4afc8e1b7b9a1e69a0ba8df051e03328
  Author: Jonas Hahnfeld <jonas.hahnfeld at cern.ch>
  Date:   2023-08-17 (Thu, 17 Aug 2023)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.cpp
    A clang/test/Interpreter/inline-virtual.cpp

  Log Message:
  -----------
  [CodeGen] Keep track of eagerly emitted globals

An inline virtual function must be emitted, but we need to remember
it and emit the same definition again in the future in case later
LLVM optimizations stripped it from the Module. The added test case
shows the problem; before this patch, it would fail with:
    Symbols not found: [ _ZN1AD0Ev, _ZN1AD1Ev ]

Differential Revision: https://reviews.llvm.org/D156537




More information about the All-commits mailing list