[clang] Emitting VTables across multiple TUs. Make them weak. (PR #200942)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 1 14:53:38 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 54080 tests passed
* 1275 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang
<details>
<summary>Clang.OpenMP/target_vtable_codegen_explicit.cpp</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -verify -fopenmp -Wno-openmp-mapping -x c++ -triple x86_64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-cuda-mode  -emit-llvm-bc C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\OpenMP\Output\target_vtable_codegen_explicit.cpp.tmp-ppc-host.bc -fopenmp-version=52
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -verify -fopenmp -Wno-openmp-mapping -x c++ -triple x86_64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-cuda-mode -emit-llvm-bc 'C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\OpenMP\Output\target_vtable_codegen_explicit.cpp.tmp-ppc-host.bc' -fopenmp-version=52
# note: command had no output on stdout or stderr
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\clang.exe -cc1 -internal-isystem C:\_work\llvm-project\llvm-project\build\lib\clang\23\include -nostdsysteminc -verify -fopenmp -Wno-openmp-mapping -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-cuda-mode  -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp -fopenmp-is-target-device -fopenmp-host-ir-file-path C:\_work\llvm-project\llvm-project\build\tools\clang\test\OpenMP\Output\target_vtable_codegen_explicit.cpp.tmp-ppc-host.bc -o - -debug-info-kind=limited -fopenmp-version=52 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe --allow-unused-prefixes C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\clang.exe' -cc1 -internal-isystem 'C:\_work\llvm-project\llvm-project\build\lib\clang\23\include' -nostdsysteminc -verify -fopenmp -Wno-openmp-mapping -x c++ -triple nvptx64-unknown-unknown -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-cuda-mode -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp' -fopenmp-is-target-device -fopenmp-host-ir-file-path 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\OpenMP\Output\target_vtable_codegen_explicit.cpp.tmp-ppc-host.bc' -o - -debug-info-kind=limited -fopenmp-version=52
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' --allow-unused-prefixes 'C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp:21:11: error: CHECK: expected string not found in input
# | // CHECK: @_ZTV7Derived = linkonce_odr constant { [6 x ptr] }
# |           ^
# | <stdin>:31:27: note: scanning from here
# | $_ZTV7Derived = comdat any
# |                           ^
# | <stdin>:40:1: note: possible intended match here
# | @_ZTV7Derived = weak_odr constant { [6 x ptr] } { [6 x ptr] [ptr null, ptr null, ptr @_ZN7DerivedD1Ev, ptr @_ZN7DerivedD0Ev, ptr @_ZN7Derived5BaseAEi, ptr @_ZN7Derived8DerivedBEv] }, comdat, align 8, !dbg !0
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\OpenMP\target_vtable_codegen_explicit.cpp
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            26:  
# |            27: $_ZN7DerivedD2Ev = comdat any 
# |            28:  
# |            29: $_ZN4BaseD2Ev = comdat any 
# |            30:  
# |            31: $_ZTV7Derived = comdat any 
# | check:21'0                               X error: no match found
# |            32:  
# | check:21'0     ~
# |            33: $_ZTV4Base = comdat any 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |            34:  
# | check:21'0     ~
# |            35: @__omp_rtl_debug_kind = weak_odr hidden constant i32 0 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            36: @__omp_rtl_assume_teams_oversubscription = weak_odr hidden constant i32 0 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            37: @__omp_rtl_assume_threads_oversubscription = weak_odr hidden constant i32 0 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            38: @__omp_rtl_assume_no_thread_state = weak_odr hidden constant i32 0 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            39: @__omp_rtl_assume_no_nested_parallelism = weak_odr hidden constant i32 0 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            40: @_ZTV7Derived = weak_odr constant { [6 x ptr] } { [6 x ptr] [ptr null, ptr null, ptr @_ZN7DerivedD1Ev, ptr @_ZN7DerivedD0Ev, ptr @_ZN7Derived5BaseAEi, ptr @_ZN7Derived8DerivedBEv] }, comdat, align 8, !dbg !0 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:21'1     ?                                                                                                                                                                                                                possible intended match
# |            41: @__omp_offloading_7e4838ac_cc2e8337__ZTV7Derived_l36addr = protected constant ptr @_ZTV7Derived 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            42: @_ZTV4Base = weak_odr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr null, ptr @_ZN4BaseD1Ev, ptr @_ZN4BaseD0Ev, ptr @_ZN4Base5BaseAEi] }, comdat, align 8, !dbg !5 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            43: @__omp_offloading_7e4838ac_cc2e8337__ZTV4Base_l36addr = protected constant ptr @_ZTV4Base 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            44: @0 = private unnamed_addr constant [148 x i8] c";C:\\_work\\llvm-project\\llvm-project\\clang\\test\\OpenMP\\target_vtable_codegen_explicit.cpp;__omp_offloading_7e4838ac_cc2e8337_main_l42_debug__;43;6;;\00", align 1 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            45: @1 = private unnamed_addr constant %struct.ident_t { i32 0, i32 2, i32 0, i32 147, ptr @0 }, align 8 
# | check:21'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/200942


More information about the cfe-commits mailing list