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
21 lines
442 B
C++
21 lines
442 B
C++
// RUN: %clang_cc1 %s -fms-extensions -triple i686-pc-win32 -emit-llvm -o - | FileCheck %s
|
|
|
|
// CHECK: @"L__FUNCTION__.?func@@YAXXZ" = private constant [5 x i16] [i16 102, i16 117, i16 110, i16 99, i16 0], align 2
|
|
|
|
void wprint(const wchar_t*);
|
|
|
|
#define __STR2WSTR(str) L##str
|
|
#define _STR2WSTR(str) __STR2WSTR(str)
|
|
#define STR2WSTR(str) _STR2WSTR(str)
|
|
|
|
void func() {
|
|
wprint(STR2WSTR(__FUNCTION__));
|
|
}
|
|
|
|
int main() {
|
|
func();
|
|
|
|
return 0;
|
|
}
|
|
|