From 314ef7bafda9f507540f3294359f20ba7bcf7a8d Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Sat, 1 Feb 2014 00:04:45 +0000 Subject: [ms-cxxabi] Use inalloca on win32 when passing non-trivial C++ objects When a non-trivial parameter is present, clang now gathers up all the parameters that lack inreg and puts them into a packed struct. MSVC always aligns each parameter to 4 bytes and no more, so this is a pretty simple struct to lay out. On win64, non-trivial records are passed indirectly. Prior to this change, clang was incorrectly using byval on win64. I'm able to self-host a working clang with this change and additional LLVM patches. Reviewers: rsmith Differential Revision: http://llvm-reviews.chandlerc.com/D2636 llvm-svn: 200597 --- clang/test/CodeGenCXX/copy-constructor-elim.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'clang/test/CodeGenCXX/copy-constructor-elim.cpp') diff --git a/clang/test/CodeGenCXX/copy-constructor-elim.cpp b/clang/test/CodeGenCXX/copy-constructor-elim.cpp index ad3a87b9d5f..8e9bee97377 100644 --- a/clang/test/CodeGenCXX/copy-constructor-elim.cpp +++ b/clang/test/CodeGenCXX/copy-constructor-elim.cpp @@ -1,6 +1,9 @@ -// RUN: %clang_cc1 -emit-llvm -o %t %s -// RUN: not grep "_ZN1CC1ERK1C" %t -// RUN: not grep "_ZN1SC1ERK1S" %t +// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix=CHECK +// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix MS +// CHECK-NOT: _ZN1CC1ERK1C +// CHECK-NOT: _ZN1SC1ERK1S +// MS-NOT: ?0C@@QAE@ABV0 +// MS-NOT: ?0S@@QAE@ABV0 extern "C" int printf(...); -- cgit v1.2.3