37 lines · cpp
1// REQUIRES: x86-registered-target2// RUN: c-index-test -write-pch %t_linux.ast -target i686-pc-linux-gnu %s3// RUN: c-index-test -test-print-mangle %t_linux.ast | FileCheck %s --check-prefix=ITANIUM4 5// RUN: c-index-test -write-pch %t_macho.ast -target x86_64-apple-darwin %s6// RUN: c-index-test -test-print-mangle %t_macho.ast | FileCheck %s --check-prefix=MACHO7 8// RUN: c-index-test -write-pch %t_msft.ast -target i686-pc-win32 %s9// RUN: c-index-test -test-print-mangle %t_msft.ast | FileCheck %s --check-prefix=MICROSOFT10 11int foo(int, int);12// ITANIUM: mangled=_Z3fooii13// MACHO: mangled=__Z3fooii14// MICROSOFT: mangled=?foo@@YAHHH15 16int foo(float, int);17// ITANIUM: mangled=_Z3foofi18// MACHO: mangled=__Z3foofi19// MICROSOFT: mangled=?foo@@YAHMH20 21struct S {22 int x, y;23};24// ITANIUM: StructDecl{{.*}}mangled=]25// MACHO: StructDecl{{.*}}mangled=]26// MICROSOFT: StructDecl{{.*}}mangled=]27 28int foo(S, S&);29// ITANIUM: mangled=_Z3foo1SRS_30// MACHO: mangled=__Z3foo1SRS_31// MICROSOFT: mangled=?foo@@YAHUS32 33extern "C" int foo(int);34// ITANIUM: mangled=foo35// MACHO: mangled=_foo36// MICROSOFT: mangled=_foo37