diff options
author | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-01-18 16:23:48 +0000 |
commit | c86b984ea8ecb3e944dc3de48539f4c1f65851ea (patch) | |
tree | 3eb853da77d46cc77c4b017525a422f9ddb1385b /test/Index/print-mangled-name.cpp | |
parent | c696171ff15f0ee60dea4abfd99a135473c95656 (diff) | |
download | FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.zip FreeBSD-src-c86b984ea8ecb3e944dc3de48539f4c1f65851ea.tar.gz |
Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'test/Index/print-mangled-name.cpp')
-rw-r--r-- | test/Index/print-mangled-name.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Index/print-mangled-name.cpp b/test/Index/print-mangled-name.cpp new file mode 100644 index 0000000..b7e79c3 --- /dev/null +++ b/test/Index/print-mangled-name.cpp @@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-pch %s -o %t_linux.ast +// RUN: c-index-test -test-print-mangle %t_linux.ast | FileCheck %s --check-prefix=ITANIUM + +// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-pch %s -o %t_macho.ast +// RUN: c-index-test -test-print-mangle %t_macho.ast | FileCheck %s --check-prefix=MACHO + +// RUN: %clang_cc1 -triple i686-pc-win32 -emit-pch %s -o %t_msft.ast +// RUN: c-index-test -test-print-mangle %t_msft.ast | FileCheck %s --check-prefix=MICROSOFT + +int foo(int, int); +// ITANIUM: mangled=_Z3fooii +// MACHO: mangled=__Z3fooii +// MICROSOFT: mangled=?foo@@YAHHH + +int foo(float, int); +// ITANIUM: mangled=_Z3foofi +// MACHO: mangled=__Z3foofi +// MICROSOFT: mangled=?foo@@YAHMH + +struct S { + int x, y; +}; +// ITANIUM: StructDecl{{.*}}mangled=] +// MACHO: StructDecl{{.*}}mangled=] +// MICROSOFT: StructDecl{{.*}}mangled=] + +int foo(S, S&); +// ITANIUM: mangled=_Z3foo1SRS_ +// MACHO: mangled=__Z3foo1SRS_ +// MICROSOFT: mangled=?foo@@YAHUS |