Commit Graph

10 Commits

Author SHA1 Message Date
Hans Wennborg c9bd88e681 Remove the -cxx-abi command-line flag.
This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples,
Itanium otherwise. It's no longer possible to do weird combinations.

To be able to run a test with a specific ABI without constraining it to a
specific triple, new substitutions are added to lit: %itanium_abi_triple and
%ms_abi_triple can be used to get the current target triple adjusted to the
desired ABI. For example, if the test suite is running with the i686-pc-win32
target, %itanium_abi_triple will expand to i686-pc-mingw32.

Differential Revision: http://llvm-reviews.chandlerc.com/D2545

llvm-svn: 199250
2014-01-14 19:35:09 +00:00
Hans Wennborg 442e4f7f5f Prepare for using MS ABI by default for Win32: update CodeGenCXX tests
llvm-svn: 197281
2013-12-13 22:43:52 +00:00
Reid Kleckner b9921df29c Emit uuid globals as linkonce_odr
Patch by Nico Rieck!

llvm-svn: 189860
2013-09-03 21:49:32 +00:00
David Majnemer bbecd09658 CodeGen: __uuidof should work even with an incomplete _GUID type
Summary:
We would crash in CodeGen::CodeGenModule::EmitUuidofInitializer
because our attempt to enter CodeGen::CodeGenModule::EmitConstantValue
will be foiled: the type of the constant value is incomplete.

Instead, create an unnamed type with the proper layout on all platforms.
Punt the problem of wrongly defined struct _GUID types to the user.
(It's impossible because the TU may never get to see the type and thus
we can't verify that it is suitable.)

This fixes PR16856.

Reviewers: rsmith, rnk, thakis

Reviewed By: rnk

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D1375

llvm-svn: 188481
2013-08-15 19:59:14 +00:00
David Majnemer 89085340be Sema: Assertion failure during CodeGen in CodeGenModule::EmitUuidofInitializer
Make sure we can properly generate code when the UUID has curly braces
on it, strip the curly braces at the sema layer.

This fixes PR16813.

llvm-svn: 188061
2013-08-09 08:56:20 +00:00
David Majnemer cf963cece8 [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section
Revert r188055 which reverted r188053. An unrelated change previously snuck in.

llvm-svn: 188060
2013-08-09 08:35:59 +00:00
David Majnemer a2724ae4b3 Revert "[-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section"
This commit reverts r188053.

It is breaking the build bots.

llvm-svn: 188055
2013-08-09 05:56:24 +00:00
David Majnemer 94a76b64e0 [-cxx-abi microsoft] Mangle UUIDs correctly, stick them in the proper section
We mangled them like:
L___uuid_12345678-1234-1234-1234-123456789abc

We should've mangled them like:
__GUID_12345678_1234_1234_1234_123456789abc

Furthermore, they are external symbols.

llvm-svn: 188053
2013-08-09 05:09:04 +00:00
NAKAMURA Takumi 5bbb4fa3a6 clang/test/CodeGenCXX/microsoft-uuidof.cpp: Fix for -Asserts.
llvm-svn: 165712
2012-10-11 11:20:31 +00:00
Nico Weber cf4ff586e8 Add codegen support for __uuidof().
llvm-svn: 165710
2012-10-11 10:13:44 +00:00