diff options
author | Anders Carlsson <andersca@mac.com> | 2009-09-16 15:53:40 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-09-16 15:53:40 +0000 |
commit | 0a8f847e97f40cce51dc69051b964732333dc028 (patch) | |
tree | eb78e940410796b475e4b0c4345d2f5cbba63d10 /lib/CodeGen/CGCall.cpp | |
parent | 37473829cb2308af5b268a2d58bf3d7fa2056610 (diff) |
x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82050 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r-- | lib/CodeGen/CGCall.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index c63dab16a1..c58c0f6fbf 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/lib/CodeGen/CGCall.cpp @@ -492,7 +492,9 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI, break; case ABIArgInfo::Indirect: - Attributes |= llvm::Attribute::ByVal; + if (AI.getIndirectByVal()) + Attributes |= llvm::Attribute::ByVal; + Attributes |= llvm::Attribute::constructAlignmentFromInt(AI.getIndirectAlign()); // byval disables readnone and readonly. |