diff options
author | Eli Bendersky <eliben@chromium.org> | 2013-07-16 10:52:03 -0700 |
---|---|---|
committer | Eli Bendersky <eliben@chromium.org> | 2013-07-16 10:52:03 -0700 |
commit | 0eb1be38d149f22aab802958086a295628a3d76f (patch) | |
tree | 4167d49dc5682b353b2e810d99370894a0be2274 /lib | |
parent | e789858899a7b36caf11b371a97411a1582a482b (diff) |
Mop up errors - now it compiles.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/ItaniumCXXABI.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/CodeGen/ItaniumCXXABI.cpp b/lib/CodeGen/ItaniumCXXABI.cpp index 9ab3f8c3ee..8a7f551e68 100644 --- a/lib/CodeGen/ItaniumCXXABI.cpp +++ b/lib/CodeGen/ItaniumCXXABI.cpp @@ -57,6 +57,20 @@ public: UseARMMethodPtrABI(UseARMMethodPtrABI), UseARMGuardVarABI(UseARMGuardVarABI) { } + bool isReturnTypeIndirect(const CXXRecordDecl *RD) const { + // Structures with either a non-trivial destructor or a non-trivial + // copy constructor are always indirect. + return !RD->hasTrivialDestructor() || RD->hasNonTrivialCopyConstructor(); + } + + RecordArgABI getRecordArgABI(const CXXRecordDecl *RD) const { + // Structures with either a non-trivial destructor or a non-trivial + // copy constructor are always indirect. + if (!RD->hasTrivialDestructor() || RD->hasNonTrivialCopyConstructor()) + return RAA_Indirect; + return RAA_Default; + } + bool isZeroInitializable(const MemberPointerType *MPT); llvm::Type *ConvertMemberPointerType(const MemberPointerType *MPT); @@ -572,8 +586,8 @@ llvm::Constant *ItaniumCXXABI::BuildMemberPointer(const CXXMethodDecl *MD, } llvm::Constant *addr = CGM.GetAddrOfFunction(MD, Ty); - MemPtr[0] = llvm::ConstantExpr::getPtrToInt(addr, ptrdiff_t); - MemPtr[1] = llvm::ConstantInt::get(ptrdiff_t, + MemPtr[0] = llvm::ConstantExpr::getPtrToInt(addr, CGM.PtrDiffTy); + MemPtr[1] = llvm::ConstantInt::get(CGM.PtrDiffTy, (UseARMMethodPtrABI ? 2 : 1) * ThisAdjustment.getQuantity()); } |