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 | f747524819641a32440186256761e8973f6aa84d (patch) | |
tree | f16d0c60c68e8a4a971306e4da58b069d3565769 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 635168aa330b7fdba627adefb5e6892a0a5b81d2 (diff) | |
download | bcm5719-llvm-f747524819641a32440186256761e8973f6aa84d.tar.gz bcm5719-llvm-f747524819641a32440186256761e8973f6aa84d.zip |
Start attempting to generate code for C++ ctors.
llvm-svn: 69168
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index 9a61a68f424..a1fc7153444 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/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); |