From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Platform:Itanium C++ ABI" |
|---|
| claim | "Constructors and destructors are emitted in variants that demangle to the same text: C1 complete-object, C2 base-object (no virtual-base construction), C3 allocating constructor, CI1/CI2 inheriting constructors; D0 deleting destructor (destroys, then calls operator delete), D1 complete-object, D2 base-object destructor. Compilers usually alias C1 to C2 and D1 to D2 when the class has no virtual bases. A virtual destructor takes two vtable slots: D1, then D0." |
|---|
| scope | | level | "platform" |
|---|
| applies_to | "Platform:Itanium C++ ABI" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "a class with constructors or a destructor" |
|---|
| effect | "several symbols per constructor/destructor: _ZN<class>C1..., C2..., _ZN<class>D0Ev, D1Ev, D2Ev" |
|---|
| test_vectors | | input | "_ZN5clang16CompilerInstanceC1Ev" |
|---|
| expected | "clang::CompilerInstance::CompilerInstance()" |
|---|
|
| input | "_ZN4llvm24PassRegistrationListenerC2Ev" |
|---|
| expected | "llvm::PassRegistrationListener::PassRegistrationListener()" |
|---|
|
| input | "_ZN11ImageLoaderD0Ev" |
|---|
| expected | "ImageLoader::~ImageLoader()" |
|---|
|
| input | "_ZN11ImageLoaderD1Ev" |
|---|
| expected | "ImageLoader::~ImageLoader()" |
|---|
|
| input | "_ZNSt6vectorIPKcSaIS1_EED2Ev" |
|---|
| expected | "std::vector<char const*, std::allocator<char const*>>::~vector()" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "parseCtorDtorName: C1-C5, CI1/CI2, D0-D2, D4, D5; the variant is not printed" |
|---|
| repo | "https://github.com/llvm/llvm-project" |
|---|
| commit | "4bd435d59f89ded8e537e5c6e0b560ad89518c3f" |
|---|
| path | "libcxxabi/src/demangle/ItaniumDemangle.h" |
|---|
| lines | "3570-3601" |
|---|
|
| type | "runtime_test" |
|---|
| detail | "MinGW-w64 GCC x86-64 libstdc++-6.dll: _ZNSt9exceptionD1Ev and _ZNSt9exceptionD2Ev share one address; _ZTVSt9exception slots 0 and 1 are D1 then D0 (likewise for std::runtime_error, std::bad_alloc, std::istream)" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Constructor and destructor variants" |
|---|
| topic | "Platform:Itanium C++ ABI/Name mangling" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-17T21:52:51.449Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:08:48.086Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read llvm-project 4bd435d libcxxabi ItaniumDemangle.h grammar comment and parseCtorDtorName: C1-C5, CI1/CI2, D0, D1, D2, D4, D5 accepted and the variant not printed. Not re-checked: the aliasing and vtable slot order claims (the evidence is a MinGW binary test)." |
|---|
|
|
|---|