summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-08-25 18:23:28 +0000
committerReid Kleckner <rnk@google.com>2016-08-25 18:23:28 +0000
commit44051e63de377b32b3d9653fca4df6ea70ba81ef (patch)
tree424efced3596c3e5a771ab02a749af5b035919d1 /clang/lib/CodeGen
parent0fc8cec796387575c0c4a2635ba5579f60deeb75 (diff)
downloadbcm5719-llvm-44051e63de377b32b3d9653fca4df6ea70ba81ef.tar.gz
bcm5719-llvm-44051e63de377b32b3d9653fca4df6ea70ba81ef.zip
[MS] Pass non-trivially-copyable objects indirectly on Windows ARM
This isn't exactly what MSVC does, unfortunately. MSVC does not pass objects with destructors but no copy constructors by address. More ARM expertise is required to really understand what should be done here. Fixes PR29136. llvm-svn: 279764
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 28312fce774..d6e86a8ecb2 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -794,6 +794,12 @@ MicrosoftCXXABI::getRecordArgABI(const CXXRecordDecl *RD) const {
// FIXME: Implement for other architectures.
return RAA_Default;
+ case llvm::Triple::thumb:
+ // Use the simple Itanium rules for now.
+ // FIXME: This is incompatible with MSVC for arguments with a dtor and no
+ // copy ctor.
+ return !canCopyArgument(RD) ? RAA_Indirect : RAA_Default;
+
case llvm::Triple::x86:
// All record arguments are passed in memory on x86. Decide whether to
// construct the object directly in argument memory, or to construct the
OpenPOWER on IntegriCloud