[clang] [Clang,debuginfo] added vtt parameter in destructor DISubroutineType (PR #130674)
Reid Kleckner via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 14:27:28 PDT 2025
Markus =?utf-8?q?Gschoßmann?= <markus.gschossmann at tum.de>,
Markus =?utf-8?q?Gschoßmann?= <markus.gschossmann at tum.de>,
Markus =?utf-8?q?Gschoßmann?= <markus.gschossmann at tum.de>,
Markus =?utf-8?q?Gschoßmann?= <markus.gschossmann at tum.de>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/130674 at github.com>
rnk wrote:
Thanks!
It looks like the new IR after this change doesn't pass verification, and presumably this causes the crash later:
```
$ clang -cc1 t.cpp -triple bpfel -debug-info-kind=constructor -emit-llvm -o -
Attribute after last parameter!
ptr @_ZN3FooD0Ev
fatal error: error in backend: Broken module found, compilation aborted!
```
If you disable the verifier you can see the generated IR, but you can't see the "attributes beyond the last parameter". I guess they don't exist, so they don't get printed:
```
$ clang -cc1 t.cpp -triple bpfel -debug-info-kind=constructor -emit-llvm -o - -disable-llvm-verifier
...
; Function Attrs: nounwind
declare !dbg !5 void @_ZN3FooD0Ev() unnamed_addr #136686
```
Actual base destructor (D0) prototypes have argument attributes that look like this:
```
define dso_local void @_ZN3BarD0Ev(ptr noundef nonnull align 8 dereferenceable(8) %this) unnamed_addr #0 align 2 !dbg !27 {
```
It's not clear what the BPF target is doing that's special that's forcing the compiler to emit this otherwise unused destructor declaration, that seems like the edge case here. Regardless, let's roll it back for now.
https://github.com/llvm/llvm-project/pull/130674
More information about the cfe-commits
mailing list