diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-08 16:01:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-08 16:01:27 +0000 |
commit | 8d2a19b478cf7a7b46131b64c6c0ca101761074f (patch) | |
tree | 7e9957e70b78fda7735be47d9d6a78a77a0bf229 /clang/lib/CodeGen/CGClass.cpp | |
parent | 6a2f62cbd30f07c3fdc5981b887df75ee431a38e (diff) | |
download | bcm5719-llvm-8d2a19b478cf7a7b46131b64c6c0ca101761074f.tar.gz bcm5719-llvm-8d2a19b478cf7a7b46131b64c6c0ca101761074f.zip |
Handle constructors and destructors a bit more uniformly in CodeGen.
There were code paths that are duplicated for constructors and destructors just
because we have both CXXCtorType and CXXDtorsTypes.
This patch introduces an unified enum and reduces code deplication a bit.
llvm-svn: 217383
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 5a033dec06d..3277b416ed1 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/lib/CodeGen/CGClass.cpp @@ -1758,7 +1758,8 @@ CodeGenFunction::EmitDelegateCXXConstructorCall(const CXXConstructorDecl *Ctor, } llvm::Value *Callee = CGM.GetAddrOfCXXConstructor(Ctor, CtorType); - EmitCall(CGM.getTypes().arrangeCXXConstructorDeclaration(Ctor, CtorType), + EmitCall(CGM.getTypes() + .arrangeCXXStructorDeclaration(Ctor, getFromCtorType(CtorType)), Callee, ReturnValueSlot(), DelegateArgs, Ctor); } |