1 // REQUIRES: x86-registered-target 2 // RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-pch %s -o %t_linux.ast 3 // RUN: c-index-test -test-print-mangle %t_linux.ast | FileCheck %s --check-prefix=ITANIUM 4 5 // RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-pch %s -o %t_macho.ast 6 // RUN: c-index-test -test-print-mangle %t_macho.ast | FileCheck %s --check-prefix=MACHO 7 8 // RUN: %clang_cc1 -triple i686-pc-win32 -emit-pch %s -o %t_msft.ast 9 // RUN: c-index-test -test-print-mangle %t_msft.ast | FileCheck %s --check-prefix=MICROSOFT 10 11 int foo(int, int); 12 // ITANIUM: mangled=_Z3fooii 13 // MACHO: mangled=__Z3fooii 14 // MICROSOFT: mangled=?foo@@YAHHH 15 16 int foo(float, int); 17 // ITANIUM: mangled=_Z3foofi 18 // MACHO: mangled=__Z3foofi 19 // MICROSOFT: mangled=?foo@@YAHMH 20 21 struct S { 22 int x, y; 23 }; 24 // ITANIUM: StructDecl{{.*}}mangled=] 25 // MACHO: StructDecl{{.*}}mangled=] 26 // MICROSOFT: StructDecl{{.*}}mangled=] 27 28 int foo(S, S&); 29 // ITANIUM: mangled=_Z3foo1SRS_ 30 // MACHO: mangled=__Z3foo1SRS_ 31 // MICROSOFT: mangled=?foo@@YAHUS 32