[clang] Restore unnamed_addr on vtables in -fno-rtti builds (PR #201846)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 5 07:23:21 PDT 2026


github-actions[bot] wrote:

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

* 54110 tests passed
* 1290 tests skipped
* 1 test failed

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

### Clang
<details>
<summary>Clang.Headers/hip-header.hip</summary>

```
Exit Code: 1

Command Output (stdout):
--
# 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 -include __clang_hip_runtime_wrapper.h    -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/cuda_wrappers    -internal-isystem C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include    -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown    -target-cpu gfx906 -emit-llvm C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip -fcuda-is-device -o -    -D__HIPCC_RTC__ | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe -check-prefixes=CHECK,NOMALLOC C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip
# 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 -include __clang_hip_runtime_wrapper.h -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/../../lib/Headers/cuda_wrappers' -internal-isystem 'C:\_work\llvm-project\llvm-project\clang\test\Headers/Inputs/include' -triple amdgcn-amd-amdhsa -aux-triple x86_64-unknown-unknown -target-cpu gfx906 -emit-llvm 'C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip' -fcuda-is-device -o - -D__HIPCC_RTC__
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' -check-prefixes=CHECK,NOMALLOC 'C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip:74:11: error: CHECK: expected string not found in input
# | // CHECK: @_ZTV8vderivedIvE = weak_odr addrspace(1) constant { [4 x ptr addrspace(1)] } zeroinitializer, comdat, align 8
# |           ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip'
# | ^
# | <stdin>:27:24: note: possible intended match here
# | @_ZTV8vderivedIvE = weak_odr unnamed_addr addrspace(1) constant { [4 x ptr addrspace(1)] } zeroinitializer, comdat, align 8
# |                        ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: ; ModuleID = 'C:\_work\llvm-project\llvm-project\clang\test\Headers\hip-header.hip' 
# | check:74'0     X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |             2: source_filename = "C:\\_work\\llvm-project\\llvm-project\\clang\\test\\Headers\\hip-header.hip" 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             3: target datalayout = "e-m:e-p:64:64-p1:64:64-p2:32:32-p3:32:32-p4:64:64-p5:32:32-p6:32:32-p7:160:256:256:32-p8:128:128:128:48-p9:192:256:256:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-v2048:2048-n32:64-S32-A5-G1-ni:7:8:9" 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             4: target triple = "amdgcn-amd-amdhsa" 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             5:  
# | check:74'0     ~
# |             6: %struct.derived = type { %struct.base } 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |            22:  
# | check:74'0     ~
# |            23: $_ZTV7derived = comdat any 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            24:  
# | check:74'0     ~
# |            25: $_ZTV4base = comdat any 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# |            26:  
# | check:74'0     ~
# |            27: @_ZTV8vderivedIvE = weak_odr unnamed_addr addrspace(1) constant { [4 x ptr addrspace(1)] } zeroinitializer, comdat, align 8 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:74'1                            ?                                                                                                     possible intended match
# |            28: @_ZTV7derived = linkonce_odr unnamed_addr addrspace(1) constant { [4 x ptr addrspace(1)] } { [4 x ptr addrspace(1)] [ptr addrspace(1) null, ptr addrspace(1) null, ptr addrspace(1) addrspacecast (ptr @_ZN7derived2pvEv to ptr addrspace(1)), ptr addrspace(1) addrspacecast (ptr @__cxa_deleted_virtual to ptr addrspace(1))] }, comdat, align 8 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            29: @_ZTV4base = linkonce_odr unnamed_addr addrspace(1) constant { [4 x ptr addrspace(1)] } { [4 x ptr addrspace(1)] [ptr addrspace(1) null, ptr addrspace(1) null, ptr addrspace(1) addrspacecast (ptr @__cxa_pure_virtual to ptr addrspace(1)), ptr addrspace(1) addrspacecast (ptr @__cxa_deleted_virtual to ptr addrspace(1))] }, comdat, align 8 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            30: @__hip_cuid_ = addrspace(1) global i8 0 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            31: @llvm.compiler.used = appending addrspace(1) global [1 x ptr] [ptr addrspacecast (ptr addrspace(1) @__hip_cuid_ to ptr)], section "llvm.metadata" 
# | check:74'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            32:  
# | check:74'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/201846


More information about the cfe-commits mailing list