3 Commits

Author SHA1 Message Date
Jonas Hahnfeld
c861d32d7c [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
2023-08-18 09:42:28 +02:00
Jonas Hahnfeld
0e17372b38 Revert "[CodeGen] Keep track of eagerly emitted globals"
The added test doesn't work on Windows:
https://lab.llvm.org/buildbot/#/builders/216/builds/25769

This reverts commit f8dadefd4afc8e1b7b9a1e69a0ba8df051e03328.
2023-08-17 14:21:39 +02:00
Jonas Hahnfeld
f8dadefd4a [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
2023-08-17 13:26:22 +02:00