summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 42cb29c8b44..36392bc5ed0 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -2903,18 +2903,7 @@ static void emitCXXDestructor(CodeGenModule &CGM, const CXXDestructorDecl *dtor,
if (dtorType == StructorType::Base && !CGM.TryEmitBaseDestructorAsAlias(dtor))
return;
- const CGFunctionInfo &fnInfo =
- CGM.getTypes().arrangeCXXStructorDeclaration(dtor, dtorType);
-
- auto *fn = cast<llvm::Function>(
- CGM.getAddrOfCXXStructor(dtor, dtorType, &fnInfo, nullptr, true));
-
- GlobalDecl GD(dtor, toCXXDtorType(dtorType));
- CGM.setFunctionLinkage(GD, fn);
- CodeGenFunction(CGM).GenerateCode(GD, fn, fnInfo);
-
- CGM.setFunctionDefinitionAttributes(dtor, fn);
- CGM.SetLLVMFunctionAttributesForDefinition(dtor, fn);
+ CGM.codegenCXXStructor(dtor, dtorType);
}
void MicrosoftCXXABI::emitCXXStructor(const CXXMethodDecl *MD,
OpenPOWER on IntegriCloud