Skip to content

Commit

Permalink
fix(rtti): the rtti vtable is always in the default section
Browse files Browse the repository at this point in the history
  • Loading branch information
yuri91 committed Nov 19, 2024
1 parent 41ef21c commit 52e7fe4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions clang/lib/CodeGen/ItaniumCXXABI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3952,12 +3952,7 @@ void ItaniumRTTIBuilder::BuildVTablePointer(const Type *Ty) {
}

if(!CGM.getTarget().isByteAddressable()) {
bool asmjs = false;
if (Ty->isRecordType()){
asmjs = cast<CXXRecordDecl>(cast<RecordType>(Ty)->getDecl())->hasAttr<AsmJSAttr>();
} else {
asmjs = CGM.getContext().getTargetInfo().getTriple().getEnvironment() == llvm::Triple::WebAssembly;
}
bool asmjs = CGM.getContext().getTargetInfo().getTriple().isCheerpWasm();
llvm::Type* WrapperTypes[] = {CGM.getTypes().GetBasicVTableType(8, asmjs)};
llvm::Type* VTableType = llvm::StructType::get(CGM.getLLVMContext(), WrapperTypes, false, NULL, /*bytelayout*/false, asmjs);
llvm::Constant *VTable = CGM.getModule().getOrInsertGlobal(VTableName, VTableType);
Expand Down

0 comments on commit 52e7fe4

Please sign in to comment.