diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-15 19:43:47 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-15 19:43:47 +0000 |
commit | ede1e7d490b4e38cacbffcfcd15666a15c50cf4b (patch) | |
tree | 4fa2f4c0870c0e33d503f2913471e29f536b8461 /clang/lib/CodeGen/ItaniumCXXABI.cpp | |
parent | 4d57159c09b226a5608a26c1bc57f7b66cb80a24 (diff) | |
download | bcm5719-llvm-ede1e7d490b4e38cacbffcfcd15666a15c50cf4b.tar.gz bcm5719-llvm-ede1e7d490b4e38cacbffcfcd15666a15c50cf4b.zip |
Reduce code duplication a bit more. NFC.
llvm-svn: 217813
Diffstat (limited to 'clang/lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 22839cd0fae..91e9d4d7a08 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -3038,18 +3038,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 ItaniumCXXABI::emitCXXStructor(const CXXMethodDecl *MD, |