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