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

Jonas Hahnfeld via All-commits all-commits at lists.llvm.org
Fri Aug 18 00:44:09 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c861d32d7c2791bdc058d9d9fbaecc1c2f07b8c7
      https://github.com/llvm/llvm-project/commit/c861d32d7c2791bdc058d9d9fbaecc1c2f07b8c7
  Author: Jonas Hahnfeld <jonas.hahnfeld at cern.ch>
  Date:   2023-08-18 (Fri, 18 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 ]

This reapplies commit f8dadefd4a, reverted in commit 0e17372b38, but
disables RTTI in the test to avoid problems on Windows.

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




More information about the All-commits mailing list