Skip to content

Commit 13bc470

Browse files
committed
Make sure when recreating vector deleting dtor from an alias that it has
correct attributes and the calling convention, especially for 32 bit.
1 parent fdab7da commit 13bc470

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/CodeGen/CodeGenModule.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7976,6 +7976,8 @@ void CodeGenModule::requireVectorDestructorDefinition(const CXXRecordDecl *RD) {
79767976
auto *NewFn = llvm::Function::Create(
79777977
cast<llvm::FunctionType>(VDEntry->getValueType()),
79787978
llvm::Function::ExternalLinkage, VDName, &getModule());
7979+
SetFunctionAttributes(VectorDtorGD, NewFn, /*IsIncompleteFunction*/ false,
7980+
/*IsThunk*/ false);
79797981
NewFn->takeName(VDEntry);
79807982
VDEntry->replaceAllUsesWith(NewFn);
79817983
VDEntry->eraseFromParent();

0 commit comments

Comments
 (0)