[clang] [clang][bytecode] Support virtual bases in C++26 (PR #204289)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 19 03:13:19 PDT 2026
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>,
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/204289 at github.com>
================
@@ -7098,6 +7119,16 @@ bool Compiler<Emitter>::compileDestructor(const CXXDestructorDecl *Dtor) {
return false;
}
+ for (const Record::Base &Base : llvm::reverse(R->virtual_bases())) {
+ if (Base.R->hasTrivialDtor())
+ continue;
+ if (!this->emitGetPtrVirtBase(cast<CXXRecordDecl>(Base.R->getDecl()),
+ SourceInfo{}))
+ return false;
+ if (!this->emitRecordDestructionPop(Base.R, {}))
+ return false;
+ }
----------------
tbaederr wrote:
Added code to ignore the virtual base class dtor calls conditionally.
https://github.com/llvm/llvm-project/pull/204289
More information about the cfe-commits
mailing list