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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user