diff options
author | dim <dim@FreeBSD.org> | 2014-02-20 21:59:15 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2014-02-20 21:59:15 +0000 |
commit | 71b05635f0af9304195bb237ed6f5777d29020b2 (patch) | |
tree | 50d5ccda787645225336cebf0ac01094ca35224f /contrib/llvm/tools/clang/lib/CodeGen | |
parent | 882a15c9c203706f0c18c3358b30a7219c039b85 (diff) | |
download | FreeBSD-src-71b05635f0af9304195bb237ed6f5777d29020b2.zip FreeBSD-src-71b05635f0af9304195bb237ed6f5777d29020b2.tar.gz |
Import a whole bunch of clang trunk commits to enable self-hosting clang
3.4 on Sparc64 (commit descriptions left out for brevity):
r198311 r198312 r198911 r198912 r198918 r198923 r199012 r199034 r199037
r199188 r199399 r200452
Submitted by: rdivacky
Diffstat (limited to 'contrib/llvm/tools/clang/lib/CodeGen')
-rw-r--r-- | contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp index 76acf87..578cea6 100644 --- a/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp +++ b/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp @@ -5349,6 +5349,11 @@ SparcV9ABIInfo::classifyType(QualType Ty, unsigned SizeLimit) const { if (!isAggregateTypeForABI(Ty)) return ABIArgInfo::getDirect(); + // If a C++ object has either a non-trivial copy constructor or a non-trivial + // destructor, it is passed with an explicit indirect pointer / sret pointer. + if (CGCXXABI::RecordArgABI RAA = getRecordArgABI(Ty, getCXXABI())) + return ABIArgInfo::getIndirect(0, RAA == CGCXXABI::RAA_DirectInMemory); + // This is a small aggregate type that should be passed in registers. // Build a coercion type from the LLVM struct type. llvm::StructType *StrTy = dyn_cast<llvm::StructType>(CGT.ConvertType(Ty)); |