[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Index / print-mangled-name.cpp
blobdc6f734dfb734cf8ca1980e04d9ccff4296ff388
1 // REQUIRES: x86-registered-target
2 // RUN: c-index-test -write-pch %t_linux.ast -target i686-pc-linux-gnu %s
3 // RUN: c-index-test -test-print-mangle %t_linux.ast | FileCheck %s --check-prefix=ITANIUM
5 // RUN: c-index-test -write-pch %t_macho.ast -target x86_64-apple-darwin %s
6 // RUN: c-index-test -test-print-mangle %t_macho.ast | FileCheck %s --check-prefix=MACHO
8 // RUN: c-index-test -write-pch %t_msft.ast -target i686-pc-win32 %s
9 // RUN: c-index-test -test-print-mangle %t_msft.ast | FileCheck %s --check-prefix=MICROSOFT
11 int foo(int, int);
12 // ITANIUM: mangled=_Z3fooii
13 // MACHO: mangled=__Z3fooii
14 // MICROSOFT: mangled=?foo@@YAHHH
16 int foo(float, int);
17 // ITANIUM: mangled=_Z3foofi
18 // MACHO: mangled=__Z3foofi
19 // MICROSOFT: mangled=?foo@@YAHMH
21 struct S {
22 int x, y;
24 // ITANIUM: StructDecl{{.*}}mangled=]
25 // MACHO: StructDecl{{.*}}mangled=]
26 // MICROSOFT: StructDecl{{.*}}mangled=]
28 int foo(S, S&);
29 // ITANIUM: mangled=_Z3foo1SRS_
30 // MACHO: mangled=__Z3foo1SRS_
31 // MICROSOFT: mangled=?foo@@YAHUS
33 extern "C" int foo(int);
34 // ITANIUM: mangled=foo
35 // MACHO: mangled=_foo
36 // MICROSOFT: mangled=_foo