diff options
author | Anders Carlsson <andersca@mac.com> | 2009-04-15 15:55:24 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-04-15 15:55:24 +0000 |
commit | 95d4e5d2f87a0f07fb143ccb824dfc4c5c595c78 (patch) | |
tree | 9fab5013466209889fdd7462cecc5af7db1a4365 /lib/CodeGen/CodeGenModule.h | |
parent | ee3899e1cabcbf70d9a316b33f9b79bf3189bd01 (diff) |
Start attempting to generate code for C++ ctors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | lib/CodeGen/CodeGenModule.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index 9a61a68f42..a1fc715344 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -18,6 +18,7 @@ #include "clang/AST/Attr.h" #include "CGBlocks.h" #include "CGCall.h" +#include "CGCXX.h" #include "CodeGenTypes.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/StringMap.h" @@ -311,7 +312,9 @@ public: AttributeListType &PAL); const char *getMangledName(const NamedDecl *ND); - + const char *getMangledCXXCtorName(const CXXConstructorDecl *D, + CXXCtorType Type); + enum GVALinkage { GVA_Internal, GVA_C99Inline, @@ -320,6 +323,10 @@ public: }; private: + /// UniqueMangledName - Unique a name by (if necessary) inserting it into the + /// MangledNames string map. + const char *UniqueMangledName(const char *NameStart, const char *NameEnd); + llvm::Constant *GetOrCreateLLVMFunction(const char *MangledName, const llvm::Type *Ty, const FunctionDecl *D); @@ -353,8 +360,19 @@ private: void EmitGlobalVarDefinition(const VarDecl *D); void EmitAliasDefinition(const ValueDecl *D); void EmitObjCPropertyImplementations(const ObjCImplementationDecl *D); + + // C++ related functions. + void EmitNamespace(const NamespaceDecl *D); void EmitLinkageSpec(const LinkageSpecDecl *D); + + /// EmitCXXConstructors - Emit constructors (base, complete) from a + /// C++ constructor Decl. + void EmitCXXConstructors(const CXXConstructorDecl *D); + + /// EmitCXXConstructor - Emit a single constructor with the given type from + /// a C++ constructor Decl. + void EmitCXXConstructor(const CXXConstructorDecl *D, CXXCtorType Type); // FIXME: Hardcoding priority here is gross. void AddGlobalCtor(llvm::Function * Ctor, int Priority=65535); |