summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
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/MicrosoftCXXABI.cpp
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/MicrosoftCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index f22b96a6a07..bd56b732ec4 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -46,6 +46,8 @@ public:
RecordArgABI getRecordArgABI(const CXXRecordDecl *RD) const override;
+ bool isSRetParameterAfterThis() const override { return true; }
+
StringRef GetPureVirtualCallName() override { return "_purecall"; }
// No known support for deleted functions in MSVC yet, so this choice is
// arbitrary.
OpenPOWER on IntegriCloud