diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-11 15:42:06 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-09-11 15:42:06 +0000 |
| commit | 1ac0ec86b7e2ee499cc1bbf3916cd36aac6dd5ee (patch) | |
| tree | 8308e4f5e5408eb72264d4ac5e331d8e5e63cac4 /clang/lib/CodeGen/CodeGenModule.h | |
| parent | 4cb54e0a789392b1109f4ca1cb80fba5411aa449 (diff) | |
| download | bcm5719-llvm-1ac0ec86b7e2ee499cc1bbf3916cd36aac6dd5ee.tar.gz bcm5719-llvm-1ac0ec86b7e2ee499cc1bbf3916cd36aac6dd5ee.zip | |
Merge GetAddrOfCXXConstructor and GetAddrOfCXXDonstructor. NFC.
llvm-svn: 217598
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index c4d1a3b9761..3b4417b351f 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -661,11 +661,11 @@ public: llvm::Constant *GetAddrOfGlobal(GlobalDecl GD) { if (isa<CXXConstructorDecl>(GD.getDecl())) - return GetAddrOfCXXConstructor(cast<CXXConstructorDecl>(GD.getDecl()), - GD.getCtorType()); + return getAddrOfCXXStructor(cast<CXXConstructorDecl>(GD.getDecl()), + getFromCtorType(GD.getCtorType())); else if (isa<CXXDestructorDecl>(GD.getDecl())) - return GetAddrOfCXXDestructor(cast<CXXDestructorDecl>(GD.getDecl()), - GD.getDtorType()); + return getAddrOfCXXStructor(cast<CXXDestructorDecl>(GD.getDecl()), + getFromDtorType(GD.getDtorType())); else if (isa<FunctionDecl>(GD.getDecl())) return GetAddrOfFunction(GD); else @@ -801,28 +801,14 @@ public: /// \brief Retrieve the record type that describes the state of an /// Objective-C fast enumeration loop (for..in). QualType getObjCFastEnumerationStateType(); - - /// Return the address of the constructor of the given type. + /// Return the address of the constructor/destructor 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, - bool DontDefer = false); - - /// Return the address of the constructor of the given type. - llvm::GlobalValue * - GetAddrOfCXXDestructor(const CXXDestructorDecl *dtor, - CXXDtorType dtorType, - const CGFunctionInfo *fnInfo = nullptr, - llvm::FunctionType *fnType = nullptr, - bool DontDefer = false); - /// Given a builtin id for a function like "__builtin_fabsf", return a /// Function* for "fabsf". llvm::Value *getBuiltinLibFunction(const FunctionDecl *FD, |

