summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXXABI.h
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-05-09 22:46:15 +0000
committerReid Kleckner <reid@kleckner.net>2014-05-09 22:46:15 +0000
commit37abaca3c26a4f89e34df356c3ad6018f42580ce (patch)
tree5c1cceb3a6330f0477c8a155faa4989ac0832d12 /clang/lib/CodeGen/CGCXXABI.h
parent46e1ecdecc9b6e6809fd85d9a2f7ae707e1aadd0 (diff)
downloadbcm5719-llvm-37abaca3c26a4f89e34df356c3ad6018f42580ce.tar.gz
bcm5719-llvm-37abaca3c26a4f89e34df356c3ad6018f42580ce.zip
MS ABI: Pass 'sret' as the second parameter of instance methods
Summary: MSVC always passes 'sret' after 'this', unlike GCC. This required changing a number of places in Clang that assumed the sret parameter was always first in LLVM IR. This fixes win64 MSVC ABI compatibility for methods returning structs. Reviewers: rsmith, majnemer Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D3618 llvm-svn: 208458
Diffstat (limited to 'clang/lib/CodeGen/CGCXXABI.h')
-rw-r--r--clang/lib/CodeGen/CGCXXABI.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h
index fb52838e919..868c1f90930 100644
--- a/clang/lib/CodeGen/CGCXXABI.h
+++ b/clang/lib/CodeGen/CGCXXABI.h
@@ -114,6 +114,10 @@ public:
/// Returns how an argument of the given record type should be passed.
virtual RecordArgABI getRecordArgABI(const CXXRecordDecl *RD) const = 0;
+ /// Returns true if the implicit 'sret' parameter comes after the implicit
+ /// 'this' parameter of C++ instance methods.
+ virtual bool isSRetParameterAfterThis() const { return false; }
+
/// Find the LLVM type used to represent the given member pointer
/// type.
virtual llvm::Type *
OpenPOWER on IntegriCloud