diff options
author | Ed Maste <emaste@FreeBSD.org> | 2017-06-25 22:19:01 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2017-06-25 22:19:01 +0000 |
commit | 2b7f789ebfc1d2b049bf705a49f76e078e3b11b7 (patch) | |
tree | 7c99930aa2aec9afef2f469345940b4d94ad176f /test/cxxfilt | |
parent | 8cc1f6cc64e76b11cee23af79828b63cd7be4c09 (diff) | |
download | src-2b7f789ebfc1d2b049bf705a49f76e078e3b11b7.tar.gz src-2b7f789ebfc1d2b049bf705a49f76e078e3b11b7.zip |
Import ELF Tool Chain snapshot at r3561vendor/elftoolchain/elftoolchain-r3561
Notes
Notes:
svn path=/vendor/elftoolchain/dist/; revision=320341
svn path=/vendor/elftoolchain/elftoolchain-r3561/; revision=320342; tag=vendor/elftoolchain/elftoolchain-r3561
Diffstat (limited to 'test/cxxfilt')
-rw-r--r-- | test/cxxfilt/tet_scen | 24 | ||||
-rw-r--r-- | test/cxxfilt/ts/Makefile | 4 | ||||
-rw-r--r-- | test/cxxfilt/ts/builtin/Makefile | 5 | ||||
-rw-r--r-- | test/cxxfilt/ts/builtin/tclist | 48 | ||||
-rw-r--r-- | test/cxxfilt/ts/misc/tclist | 40 | ||||
-rw-r--r-- | test/cxxfilt/ts/qualifiers/Makefile | 5 | ||||
-rw-r--r-- | test/cxxfilt/ts/qualifiers/tclist | 36 | ||||
-rw-r--r-- | test/cxxfilt/ts/substitute/Makefile | 5 | ||||
-rw-r--r-- | test/cxxfilt/ts/substitute/tclist | 56 | ||||
-rw-r--r-- | test/cxxfilt/ts/template/Makefile | 5 | ||||
-rw-r--r-- | test/cxxfilt/ts/template/tclist | 10 |
11 files changed, 236 insertions, 2 deletions
diff --git a/test/cxxfilt/tet_scen b/test/cxxfilt/tet_scen index ec503cd8389d..9ec6da840fa6 100644 --- a/test/cxxfilt/tet_scen +++ b/test/cxxfilt/tet_scen @@ -2,16 +2,40 @@ all "Starting Test Suite" + ^builtin ^misc + ^qualifiers ^regression + ^substitute + ^template "Complete Test Suite" +builtin + "Starting builtin Test" + /ts/builtin/tc + "Complete builtin Test" + misc "Starting misc Test" /ts/misc/tc "Complete misc Test" +qualifiers + "Starting qualifiers Test" + /ts/qualifiers/tc + "Complete qualifiers Test" + regression "Starting regression Test" /ts/regression/tc "Complete regression Test" + +substitute + "Starting substitute Test" + /ts/substitute/tc + "Complete substitute Test" + +template + "Starting template Test" + /ts/template/tc + "Complete template Test" diff --git a/test/cxxfilt/ts/Makefile b/test/cxxfilt/ts/Makefile index 9e2f728033c4..45e4e5560918 100644 --- a/test/cxxfilt/ts/Makefile +++ b/test/cxxfilt/ts/Makefile @@ -2,7 +2,11 @@ TOP= ../../.. +SUBDIR+= builtin SUBDIR+= misc +SUBDIR+= qualifiers SUBDIR+= regression +SUBDIR+= substitute +SUBDIR+= template .include "${TOP}/mk/elftoolchain.subdir.mk" diff --git a/test/cxxfilt/ts/builtin/Makefile b/test/cxxfilt/ts/builtin/Makefile new file mode 100644 index 000000000000..ecc228b09b30 --- /dev/null +++ b/test/cxxfilt/ts/builtin/Makefile @@ -0,0 +1,5 @@ +# $Id$ + +TOP= ../../../.. + +.include "../common/ts.mk" diff --git a/test/cxxfilt/ts/builtin/tclist b/test/cxxfilt/ts/builtin/tclist new file mode 100644 index 000000000000..3c8ae278332e --- /dev/null +++ b/test/cxxfilt/ts/builtin/tclist @@ -0,0 +1,48 @@ +# <builtin-type> ::= v # void +# ::= w # wchar_t +# ::= b # bool +# ::= c # char +# ::= a # signed char +# ::= h # unsigned char +# ::= s # short +# ::= t # unsigned short +# ::= i # int +# ::= j # unsigned int +# ::= l # long +# ::= m # unsigned long +# ::= x # long long, __int64 +# ::= y # unsigned long long, __int64 +# ::= n # __int128 +# ::= o # unsigned __int128 +# ::= f # float +# ::= d # double +# ::= e # long double, __float80 +# ::= g # __float128 +# ::= z # ellipsis +# ::= Dd # IEEE 754r decimal floating point (64 bits) +# ::= De # IEEE 754r decimal floating point (128 bits) +# ::= Df # IEEE 754r decimal floating point (32 bits) +# ::= Dh # IEEE 754r half-precision floating point (16 bits) +# ::= Di # char32_t +# ::= Ds # char16_t +# ::= Da # auto +# ::= Dc # decltype(auto) +# ::= Dn # std::nullptr_t (i.e., decltype(nullptr)) +# ::= u <source-name> # vendor extended type + +"_Z3barv", "bar()" +"_Z3barPv", "bar(void*)" +"_Z3bariPv", "bar(int, void*)" +"_Z3fooww", "foo(wchar_t, wchar_t)" +"_Z3foob", "foo(bool)" +"_Z3foocah", "foo(char, signed char, unsigned char)" +"_Z3barstij", "bar(short, unsigned short, int, unsigned int)" +"_Z3barlmxy", "bar(long, unsigned long, long long, unsigned long long)" +"_Z3barno", "bar(__int128, unsigned __int128)" +"_Z3foofdeg", "foo(float, double, long double, __float128)" +"_Z3fooiPcz", "foo(int, char*, ...)" +"_Z3fooDdDeDfDh", "foo(decimal64, decimal128, decimal32, half)" +"_Z3barDiDs", "bar(char32_t, char16_t)" +"_Z3barIiEDai", "auto bar<int>(int)" +"_Z3barIiEDci", "decltype(auto) bar<int>(int)" +"_Z3barIiEDni", "decltype(nullptr) bar<int>(int)" diff --git a/test/cxxfilt/ts/misc/tclist b/test/cxxfilt/ts/misc/tclist index afc1cf62fcbb..ebe3e65c1d1b 100644 --- a/test/cxxfilt/ts/misc/tclist +++ b/test/cxxfilt/ts/misc/tclist @@ -1,11 +1,11 @@ # simple function - "_Z1f", "f" "_Z1fi", "f(int)" "_Z1fic", "f(int, char)" +"_Z1f3bar", "f(bar)" +"_Z1fFviE", "f(void (int))" # namespace - "_ZN12elftoolchainE", "elftoolchain" "_ZN11elftoolchainE", "_ZN11elftoolchainE" "_ZN12elftoolchain", "_ZN12elftoolchain" @@ -13,3 +13,39 @@ "_ZN12elftoolchain3foo3barEi", "elftoolchain::foo::bar(int)" "_ZN12elftoolchain3foo3barEic", "elftoolchain::foo::bar(int, char)" +# non-static member function with qualifiers <nested-name> +# N [<CV-qualifiers>] [<ref-qualifier>] <prefix> <unqualified-name> E +"_ZNKR12elftoolchain3fooEi", "elftoolchain::foo(int) const &" +"_ZNKO12elftoolchain3fooEi", "elftoolchain::foo(int) const &&" + +# function type with qualifiers. (note that the place to encode qualifiers +# is different than <nested-name>) +# <function-type> ::= [<CV-qualifiers>] [Dx] F [Y] <bare-function-type> + [<ref-qualifier>] E +"_Z3fooKFviRE", "foo(void (int) const &)" +"_Z3fooKFviOE", "foo(void (int) const &&)" + +# Pointer-to-member type and type qualifiers +# <pointer-to-member-type> ::= M <class type> <member type> +"_Z3barM12elftoolchainFviE", "bar(void (elftoolchain::*)(int))" +"_Z3barM12elftoolchainKFviRE", "bar(void (elftoolchain::*)(int) const &)" +"_Z3fooFvvEM1AFvvE", "foo(void (), void (A::*)())" +"_Z3fooPFvvEM1AFvvE", "foo(void (*)(), void (A::*)())" +"_Z3fooPFvvREM1AFvvE", "foo(void (*)() &, void (A::*)())" +"_Z3fooPFvvREM1AFvvOE", "foo(void (*)() &, void (A::*)() &&)" +"_Z3fooKFvvREM1AFvvE", "foo(void () const &, void (A::*)())" +"_Z3fooKPFvvREM1AFvvE", "foo(void (* const)() &, void (A::*)())" +"_Z3fooPKFvvREM1AFvvE", "foo(void (*)() const &, void (A::*)())" +"_Z3fooPKFvvREPM1AFvvE", "foo(void (*)() const &, void (A::**)())" +"_Z3fooPKFviREPM1AFvidE", "foo(void (*)(int) const &, void (A::**)(int, double))" +"_Z3fooPrKFvvREPKVM1APKFvvE", "foo(void (*)() const restrict &, void (* A::* volatile const*)() const)" + +# local names + + + +# abbreviation St +"_ZSt3foo", '::std::foo' +"_ZNSt3for3barE", 'std::for::bar' + +# c++11 decltype diff --git a/test/cxxfilt/ts/qualifiers/Makefile b/test/cxxfilt/ts/qualifiers/Makefile new file mode 100644 index 000000000000..ecc228b09b30 --- /dev/null +++ b/test/cxxfilt/ts/qualifiers/Makefile @@ -0,0 +1,5 @@ +# $Id$ + +TOP= ../../../.. + +.include "../common/ts.mk" diff --git a/test/cxxfilt/ts/qualifiers/tclist b/test/cxxfilt/ts/qualifiers/tclist new file mode 100644 index 000000000000..98e725c7a6a2 --- /dev/null +++ b/test/cxxfilt/ts/qualifiers/tclist @@ -0,0 +1,36 @@ +# <type> ::= <CV-qualifiers> <type> +# ::= P <type> # pointer-to +# ::= R <type> # reference-to +# ::= O <type> # rvalue reference-to (C++0x) +# ::= C <type> # complex pair (C 2000) +# ::= G <type> # imaginary (C 2000) +# ::= U <source-name> [<template-args>] <type> # vendor extended type qualifier + +# <CV-qualifiers> ::= [r] [V] [K] +"_Z3foorPirPirPi", "foo(int* restrict, int* restrict, int* restrict)" +"_Z3fooVPd", "foo(double* volatile)" + +# Pointer +"_Z3fooPi", "foo(int*)" +"_Z3fooPPi", "foo(int**)" +"_Z3fooKPi", "foo(int* const)" +"_Z3fooPKi", "foo(int const*)" +"_Z3fooKPKi", "foo(int const* const)" +"_Z3fooKPPi", "foo(int** const)" +"_Z3fooPKPi", "foo(int* const*)" +"_Z3fooPPKi", "foo(int const**)" +"_Z3fooKPKPi", "foo(int* const* const)" + +# Reference +"_Z3barRi", "bar(int&)" +"_Z3barRKi", "bar(int const&)" +"_ZplR1XS0_", "operator+(X&, X&)" +"_ZrsRK1XS1_", "operator>>(X const&, X const&)" +"_ZN1XaSEO1X", "X::operator=(X&&)" + +# Complex +"_Z3fooCd", "foo(double complex)" +"_Z3fooGdGf", "foo(double imaginary, float imaginary)" + +# Vendor +"_Z3fooPU3farc", "foo(char far*)" diff --git a/test/cxxfilt/ts/substitute/Makefile b/test/cxxfilt/ts/substitute/Makefile new file mode 100644 index 000000000000..ecc228b09b30 --- /dev/null +++ b/test/cxxfilt/ts/substitute/Makefile @@ -0,0 +1,5 @@ +# $Id$ + +TOP= ../../../.. + +.include "../common/ts.mk" diff --git a/test/cxxfilt/ts/substitute/tclist b/test/cxxfilt/ts/substitute/tclist new file mode 100644 index 000000000000..41173dc6fa82 --- /dev/null +++ b/test/cxxfilt/ts/substitute/tclist @@ -0,0 +1,56 @@ +# <substitution> ::= S <seq-id> _ +# ::= S_ + +"_ZN1N1TIiiE2mfES_IddE", "N::T<int, int>::mf(N<double, double>)" +"_ZN1N1TIiiE2mfES0_IddE", "N::T<int, int>::mf(N::T<double, double>)" +"_ZN1N1TIiiE2mfES1_IddE", "N::T<int, int>::mf(N::T<int, int><double, double>)" +"_ZN1N1TIiiE2mfES2_IddE", "_ZN1N1TIiiE2mfES2_IddE" +# wrong result: +# "_ZN1N1TIiiE2mfES2_IddE", "N::T<int, int>::mf(N::T<int, int>::mf<double, double>)" + +"_ZN1f1gEP1hNS_1iE", "f::g(h*, f::i)" +"_ZN1f1gEP1hNS0_1iE", "f::g(h*, h::i)" +# wrong result: +# "_ZN1f1gEP1hNS0_1iE", "f::g(h*, f::g::i)" +"_ZN1f1gEP1hNS1_1iE", "f::g(h*, h*::i)" + +"_Z3fooN1A1B1TES_", "foo(A::B::T, A)" +"_Z3fooN1A1B1TES0_", "foo(A::B::T, A::B)" +"_Z3fooN1A1B1TES1_", "foo(A::B::T, A::B::T)" + +"_Z3foo5Hello5WorldS_S0_", "foo(Hello, World, Hello, World)" + +# qualifiers with builtin type should be substitute candidates +"_Z3fooPiS_", "foo(int*, int*)" +"_Z3fooKPiS_", "foo(int* const, int*)" +"_Z3fooKPiS0_", "foo(int* const, int* const)" +"_Z3fooRKiS_", "foo(int const&, int const)" +"_Z3fooRKiS0_", "foo(int const&, int const&)" +"_Z3foorKiS_", "foo(int const restrict, int const restrict)" +"_Z3fooPrKiS_", "foo(int const restrict*, int const restrict)" +"_Z3fooPrKiS0_", "foo(int const restrict*, int const restrict*)" +"_Z3foorPKiS_", "foo(int const* restrict, int const)" +"_Z3foorPKiS0_", "foo(int const* restrict, int const*)" +"_Z3foorPKiS1_", "foo(int const* restrict, int const* restrict)" +"_Z3foorKPiS_", "foo(int* const restrict, int*)" +"_Z3foorKPiS0_", "foo(int* const restrict, int* const restrict)" + +# qualifers with non-builin type +"_Z3fooP3BarS_", "foo(Bar*, Bar)" +"_Z3fooP3BarS0_", "foo(Bar*, Bar*)" +"_Z3fooPK3BarS_", "foo(Bar const*, Bar)" +"_Z3fooPK3BarS1_", "foo(Bar const*, Bar const*)" +"_Z3foorKP3BarS0_", "foo(Bar* const restrict, Bar*)" +"_Z3foorKP3BarS1_", "foo(Bar* const restrict, Bar* const restrict)" + +# vendor extended qualifiers and substitution +# note that ABI requires that "the type with all the K, V, and r qualifiers +# " plus any vendor extended types in the same order-insensitive set is +# substitutible". Here vendor extended type is not handled as above +# requirement. +"_Z3fooU3barKiS_", "foo(int const bar, int const)" +"_Z3fooU3barKiS0_", "foo(int const bar, int const bar)" + +# bug introduced with a botched fix for omitting "void" +"_Z3barvPvS_", "bar(void, void*, void*)" +# wrong result: bar(void, void*, void, void*) diff --git a/test/cxxfilt/ts/template/Makefile b/test/cxxfilt/ts/template/Makefile new file mode 100644 index 000000000000..ecc228b09b30 --- /dev/null +++ b/test/cxxfilt/ts/template/Makefile @@ -0,0 +1,5 @@ +# $Id$ + +TOP= ../../../.. + +.include "../common/ts.mk" diff --git a/test/cxxfilt/ts/template/tclist b/test/cxxfilt/ts/template/tclist new file mode 100644 index 000000000000..bb1a6234b605 --- /dev/null +++ b/test/cxxfilt/ts/template/tclist @@ -0,0 +1,10 @@ +# Misc +"_Z1TIiE", "T<int>" +"_Z1TIidE", "T<int, double>" +"_Z1TIidET_T0_", "int T<int, double>(double)" +"_ZN3Foo3BarIiiE1fEii", "Foo::Bar<int, int>::f(int, int)" +"_ZN3Foo3BarIiiE1fIiiEEii", "int Foo::Bar<int, int>::f<int, int>(int)" +"_ZN3Foo3BarIiiE1fE1TIiE", "Foo::Bar<int, int>::f(T<int>)" +"_ZN3Foo3BarIiiE1fE1TIiEi", "Foo::Bar<int, int>::f(T<int>, int)" +"_ZN3Foo3BarIiiE1fE1TIiEii", "Foo::Bar<int, int>::f(T<int>, int, int)" +"_Z3foo1TIiEdh", "foo(T<int>, double, unsigned char)" |