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
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index 985e536..452553f 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -803,6 +803,13 @@
QualType getObjCFastEnumerationStateType();
/// Return the address of the constructor of the given type.
+
+ llvm::GlobalValue *
+ getAddrOfCXXStructor(const CXXMethodDecl *MD, StructorType Type,
+ const CGFunctionInfo *FnInfo = nullptr,
+ llvm::FunctionType *FnType = nullptr,
+ bool DontDefer = false);
+
llvm::GlobalValue *
GetAddrOfCXXConstructor(const CXXConstructorDecl *ctor, CXXCtorType ctorType,
const CGFunctionInfo *fnInfo = nullptr,