[test-suite] r214126 - ABI-Testsuite: Bulk of the testsuite

Sunil Srivastava sunil_srivastava at playstation.sony.com
Mon Jul 28 14:20:39 PDT 2014


Author: ssrivastava
Date: Mon Jul 28 16:20:34 2014
New Revision: 214126

URL: http://llvm.org/viewvc/llvm-project?rev=214126&view=rev
Log:
ABI-Testsuite: Bulk of the testsuite

Added:
    test-suite/trunk/ABI-Testsuite/test/
    test-suite/trunk/ABI-Testsuite/test/README.txt   (with props)
    test-suite/trunk/ABI-Testsuite/test/basic/
    test-suite/trunk/ABI-Testsuite/test/basic/T_st.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/basic/basic.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/basic/lit.local.cfg   (with props)
    test-suite/trunk/ABI-Testsuite/test/common/
    test-suite/trunk/ABI-Testsuite/test/common/genselector.c   (with props)
    test-suite/trunk/ABI-Testsuite/test/common/lit.local.cfg   (with props)
    test-suite/trunk/ABI-Testsuite/test/common/select2.h   (with props)
    test-suite/trunk/ABI-Testsuite/test/common/testsuite.c   (with props)
    test-suite/trunk/ABI-Testsuite/test/common/testsuite.h   (with props)
    test-suite/trunk/ABI-Testsuite/test/lit.site.cfg   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/
    test-suite/trunk/ABI-Testsuite/test/mangling/anonymousnonpod.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/arrays.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/c++11.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/c++11s.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/constructors.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/expressions.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/lambdas.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/literals.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/literals1.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/operators.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/other.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/pointers_to_members.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/qualifiers.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/return_types.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/tc_n.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/template_parameter_substitution.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/test.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/testn.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/tps.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/mangling/type_casting.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/
    test-suite/trunk/ABI-Testsuite/test/misc/T_cvta.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/T_deletedfunc.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/T_empty.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/T_nearly_empty.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/T_purevirt.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/lambda_capture.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/s2_8a.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/s2_8b.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/s2_9_5.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/s3_1.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/sg_2.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/vc1.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/misc/vc2.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_3/
    test-suite/trunk/ABI-Testsuite/test/s2_3/ptrmem.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_4/
    test-suite/trunk/ABI-Testsuite/test/s2_4/T_novirt_1.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_4/T_novirt_2.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_4/lit.local.cfg   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_5/
    test-suite/trunk/ABI-Testsuite/test/s2_5/T_vf1.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_5/T_vf2.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_5/T_vf3.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_5/lit.local.cfg   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_isc.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc0.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc1.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc2.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc3.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc4.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc5.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc6.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_ksc7.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf1.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf2.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf30.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf31.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf32.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf40.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf41.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf42.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf50.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf51.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf52.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/T_vf53.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_6/lit.local.cfg   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_7/
    test-suite/trunk/ABI-Testsuite/test/s2_7/test01.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_7/test02.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_7/test06.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_7/test_align.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_bool.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_char.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_double.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_float.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_int.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_long.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_long_double.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_long_long.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_short.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_signed_char.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_unsigned_char.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_unsigned_int.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_unsigned_long.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_unsigned_long_long.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_unsigned_short.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_void.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/builtin_wchar_t.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/dynamic_cast_algorithm.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/non_virtual.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s2_9/virtual.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/section1.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/section2.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test12.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test13-2.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test13-3.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test13-4.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test13-5.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test13-6.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test13.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_4/test14.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_5/
    test-suite/trunk/ABI-Testsuite/test/s3_3_5/lambda.cpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_5/s1.cpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_5/s3a.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_5/s3a2.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_5/s3c.cpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/s3_3_5/s3c2.xpp   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snen_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snen_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snez_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xae.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xaf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xag.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xah.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_Snnz_xai.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/CT_bf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snen_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snen_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snen_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snen_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snez_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xae.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xaf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xag.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xah.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xai.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xaj.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xak.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xal.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xam.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xan.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xao.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xap.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xaq.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/CT_Snnz_xar.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snen_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snen_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snen_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snen_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snez_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xae.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xaf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xag.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xah.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xai.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xaj.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xak.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xal.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xam.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xan.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xao.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xap.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xaq.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/PT_Snnz_xar.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Sben_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Sbez_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Sbnn_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Sbnn_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Sbnn_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Sbnn_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Sbnz_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xae.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xaf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xag.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xah.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xai.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xaj.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xak.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xal.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xam.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xan.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xao.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xap.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xaq.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xar.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xas.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xat.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xau.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xav.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xaw.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xax.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xay.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xaz.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xba.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbb.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbc.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbd.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbe.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbg.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbh.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbi.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbj.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbk.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbl.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbm.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbn.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbo.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbp.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbq.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbr.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbs.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbt.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbu.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbv.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbw.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbx.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xby.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xbz.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xca.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xcb.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xcc.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xcd.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/T_Snnn_xce.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PACKED/lit.local.cfg   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snen_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snen_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snez_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xae.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xaf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xag.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xah.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_Snnz_xai.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/PT_bf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Sben_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Sbez_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Sbnn_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Sbnn_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Sbnz_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xaa.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xab.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xac.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xad.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xae.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xaf.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xag.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xah.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xai.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xaj.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xak.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xal.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xam.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xan.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xao.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xap.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xaq.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xar.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xas.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xat.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xau.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xav.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xaw.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xax.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xay.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xaz.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xba.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xbb.x   (with props)
    test-suite/trunk/ABI-Testsuite/test/struct_layout_tests/T_Snnn_xbc.x   (with props)

Added: test-suite/trunk/ABI-Testsuite/test/README.txt
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/README.txt?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/README.txt (added)
+++ test-suite/trunk/ABI-Testsuite/test/README.txt Mon Jul 28 16:20:34 2014
@@ -0,0 +1,11 @@
+To run native clang or gcc, do one of:
+  python native-x86.py clang test <lit options>
+  python native-x86.py gcc test <lit options>
+  python native-x86.py 'clang -m32' test <lit options>
+  python native-x86.py 'gcc -m32' test <lit options>
+
+The first argument to native-x86 is the 'compiler name', which includes any arguments. It will figure out whether this is a 32 bit or 64 bit compiler and configure the testsuite accordingly.
+
+In addition, if any tests are to be marked XFAIL, put they names, without suffixes, in the list skip_list in native-x86.py. These tests will be expected to fail. If these tests pass, it will be flagged as a test failure.
+
+

Propchange: test-suite/trunk/ABI-Testsuite/test/README.txt
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/basic/T_st.x
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/basic/T_st.x?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/basic/T_st.x (added)
+++ test-suite/trunk/ABI-Testsuite/test/basic/T_st.x Mon Jul 28 16:20:34 2014
@@ -0,0 +1,236 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: c_compiler -c -o %t1.o -I "common" "common/testsuite.c"
+// RUN: cxx_compiler cxx_rtti -c %s -I "common" -o %t2.o
+// RUN: linker -o %t2%exeext  %t1.o %t2.o
+// RUN: runtool %t2%exeext | checker "TEST PASSED"
+#include "testsuite.h"
+#ifdef __cplusplus
+
+struct  sfld  {
+  char c;
+  short s;
+};
+//SIG(1 sfld) C1{ Fc Fs}
+
+
+
+static void Test_sfld()
+{
+  {
+    init_simple_test("sfld");
+    sfld lv;
+    check2(sizeof(lv), 4, "sizeof(sfld)");
+    check2(__alignof__(lv), 2, "__alignof__(sfld)");
+    check_field_offset(lv, c, 0, "sfld.c");
+    check_field_offset(lv, s, 2, "sfld.s");
+  }
+}
+static Arrange_To_Call_Me vsfld(Test_sfld, "sfld", 4);
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  ifld  {
+  char c;
+  int s;
+};
+//SIG(1 ifld) C1{ Fc Fi}
+
+
+
+static void Test_ifld()
+{
+  {
+    init_simple_test("ifld");
+    ifld lv;
+    check2(sizeof(lv), 8, "sizeof(ifld)");
+    check2(__alignof__(lv), 4, "__alignof__(ifld)");
+    check_field_offset(lv, c, 0, "ifld.c");
+    check_field_offset(lv, s, 4, "ifld.s");
+  }
+}
+static Arrange_To_Call_Me vifld(Test_ifld, "ifld", 8);
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  lfld  {
+  char c;
+  long s;
+};
+//SIG(1 lfld) C1{ Fc Fl}
+
+
+
+static void Test_lfld()
+{
+  {
+    init_simple_test("lfld");
+    lfld lv;
+    check2(sizeof(lv), ABISELECT(16,8), "sizeof(lfld)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(lfld)");
+    check_field_offset(lv, c, 0, "lfld.c");
+    check_field_offset(lv, s, ABISELECT(8,4), "lfld.s");
+  }
+}
+static Arrange_To_Call_Me vlfld(Test_lfld, "lfld", ABISELECT(16,8));
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  llfld  {
+  char c;
+  __tsi64 s;
+};
+//SIG(1 llfld) C1{ Fc FL}
+
+
+
+static void Test_llfld()
+{
+  {
+    init_simple_test("llfld");
+    llfld lv;
+    check2(sizeof(lv), ABISELECT(16,12), "sizeof(llfld)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(llfld)");
+    check_field_offset(lv, c, 0, "llfld.c");
+    check_field_offset(lv, s, ABISELECT(8,4), "llfld.s");
+  }
+}
+static Arrange_To_Call_Me vllfld(Test_llfld, "llfld", ABISELECT(16,12));
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  ffld  {
+  char c;
+  float s;
+};
+//SIG(1 ffld) C1{ Fc Fi}
+
+
+
+static void Test_ffld()
+{
+  {
+    init_simple_test("ffld");
+    ffld lv;
+    check2(sizeof(lv), 8, "sizeof(ffld)");
+    check2(__alignof__(lv), 4, "__alignof__(ffld)");
+    check_field_offset(lv, c, 0, "ffld.c");
+    check_field_offset(lv, s, 4, "ffld.s");
+  }
+}
+static Arrange_To_Call_Me vffld(Test_ffld, "ffld", 8);
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  dfld  {
+  char c;
+  double s;
+};
+//SIG(1 dfld) C1{ Fc FL}
+
+
+
+static void Test_dfld()
+{
+  {
+    init_simple_test("dfld");
+    dfld lv;
+    check2(sizeof(lv), ABISELECT(16,12), "sizeof(dfld)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(dfld)");
+    check_field_offset(lv, c, 0, "dfld.c");
+    check_field_offset(lv, s, ABISELECT(8,4), "dfld.s");
+  }
+}
+static Arrange_To_Call_Me vdfld(Test_dfld, "dfld", ABISELECT(16,12));
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  ldfld  {
+  char c;
+  long double s;
+};
+//SIG(1 ldfld) C1{ Fc FD}
+
+
+
+static void Test_ldfld()
+{
+  {
+    init_simple_test("ldfld");
+    ldfld lv;
+    check2(sizeof(lv), ABISELECT(32,16), "sizeof(ldfld)");
+    check2(__alignof__(lv), ABISELECT(16,4), "__alignof__(ldfld)");
+    check_field_offset(lv, c, 0, "ldfld.c");
+    check_field_offset(lv, s, ABISELECT(16,4), "ldfld.s");
+  }
+}
+static Arrange_To_Call_Me vldfld(Test_ldfld, "ldfld", ABISELECT(32,16));
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  zb  {
+  int  :0;
+};
+//SIG(1 zb) C1{ Fi:0}
+
+
+
+static void Test_zb()
+{
+  {
+    init_simple_test("zb");
+    static zb lv;
+    check2(sizeof(lv), ABISELECT(1,1), "sizeof(zb)");
+    check2(__alignof__(lv), ABISELECT(1,1), "__alignof__(zb)");
+  }
+}
+static Arrange_To_Call_Me vzb(Test_zb, "zb", ABISELECT(1,1));
+
+#else // __cplusplus
+
+#endif // __cplusplus
+
+//============================================================================
+

Propchange: test-suite/trunk/ABI-Testsuite/test/basic/T_st.x
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/basic/basic.x
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/basic/basic.x?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/basic/basic.x (added)
+++ test-suite/trunk/ABI-Testsuite/test/basic/basic.x Mon Jul 28 16:20:34 2014
@@ -0,0 +1,60 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c %s -I "common" -o %t1.o
+// RUN: c_compiler -c %s -I "common" -o %t2.o
+
+
+// basic tests of sizes and zero-width-bitfield rules that need to match
+// done as static checks. 
+// If this file fails, there is no point in going forward
+
+#define static_cmp(a,b)  ((((a)==(b))*2)-1)
+
+#ifdef SHOW
+#define check_sizeof(name, ty, sz) unsigned name = sizeof(ty)
+#define check_alignof(name, ty, al) unsigned name = __alignof__(ty)
+#else
+#include "testsuite.h"
+#define check_sizeof(name, ty, sz) int name[static_cmp(sizeof(ty), sz)]
+#define check_alignof(name, ty, al) int name[static_cmp(__alignof__(ty), al)]
+#endif
+
+check_sizeof(chsize, char, 1);
+check_alignof(chalign, char, 1);
+
+check_sizeof(ssize, short, 2);
+check_alignof(salign, short, 2);
+
+check_sizeof(isize, int, 4);
+check_alignof(ialign, int, 4);
+
+check_sizeof(fsize, float, 4);
+check_alignof(falign, float, 4);
+
+check_sizeof(llsize, long long, 8);
+check_alignof(llalign, long long, 8);
+
+check_sizeof(dsize, double, 8);
+check_alignof(dalign, double, 8);
+
+check_sizeof(ldsize, long double, ABISELECT(16,12));
+check_alignof(ldalign, long double, ABISELECT(16,4));
+
+check_sizeof(lsize, long, ABISELECT(8,4));
+check_alignof(lalign, long, ABISELECT(8,4));
+
+check_sizeof(psize, void*, ABISELECT(8,4));
+check_alignof(palign, void*, ABISELECT(8,4));
+
+typedef struct { char a; int :0; } abcd;
+typedef struct { int :0; } efgh;
+
+check_sizeof(s1size, abcd, 4);
+#ifdef __cplusplus
+check_sizeof(s2size, efgh, ABISELECT(1,1));
+#else
+check_sizeof(s2size, efgh, 0);
+#endif
+
+int sizzzz[] = { sizeof(abcd), sizeof(efgh) };
+

Propchange: test-suite/trunk/ABI-Testsuite/test/basic/basic.x
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/basic/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/basic/lit.local.cfg?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/basic/lit.local.cfg (added)
+++ test-suite/trunk/ABI-Testsuite/test/basic/lit.local.cfg Mon Jul 28 16:20:34 2014
@@ -0,0 +1,3 @@
+# This file is distributed under the University of Illinois Open Source License.
+# See LICENSE.TXT for details.
+config.suffixes = ['.c']

Propchange: test-suite/trunk/ABI-Testsuite/test/basic/lit.local.cfg
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/common/genselector.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/common/genselector.c?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/common/genselector.c (added)
+++ test-suite/trunk/ABI-Testsuite/test/common/genselector.c Mon Jul 28 16:20:34 2014
@@ -0,0 +1,13 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+#include <stdio.h>
+
+int main()
+{
+  FILE *fp = fopen("nselector.h", "w");
+  if (sizeof(long) == 8)
+    fprintf(fp, "#define ABI_SELECTOR(a,b,c,d,e) a // LP64\n");
+  else
+    fprintf(fp, "#define ABI_SELECTOR(a,b,c,d,e) b // ILP32 \n");
+  return 0;
+}

Propchange: test-suite/trunk/ABI-Testsuite/test/common/genselector.c
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/common/lit.local.cfg
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/common/lit.local.cfg?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/common/lit.local.cfg (added)
+++ test-suite/trunk/ABI-Testsuite/test/common/lit.local.cfg Mon Jul 28 16:20:34 2014
@@ -0,0 +1,4 @@
+# This file is distributed under the University of Illinois Open Source License.
+# See LICENSE.TXT for details.
+# Skip this directory
+config.suffixes = []
\ No newline at end of file

Propchange: test-suite/trunk/ABI-Testsuite/test/common/lit.local.cfg
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/common/select2.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/common/select2.h?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/common/select2.h (added)
+++ test-suite/trunk/ABI-Testsuite/test/common/select2.h Mon Jul 28 16:20:34 2014
@@ -0,0 +1,6 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+#include "../../selector.h"
+#define LPSELECT(a,b) ABISELECT(a,b)
+
+

Propchange: test-suite/trunk/ABI-Testsuite/test/common/select2.h
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/common/testsuite.c
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/common/testsuite.c?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/common/testsuite.c (added)
+++ test-suite/trunk/ABI-Testsuite/test/common/testsuite.c Mon Jul 28 16:20:34 2014
@@ -0,0 +1,819 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+#include "testsuite.h"
+
+
+#if 0 // __linux__
+Not yet. 
+#define _GNU_SOURCE
+#include <dlfcn.h>
+static char *find_symname(void *addr, char *buf);
+#else
+#define find_symname(a,b) ""
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+// given a full pathname, return path starting from test
+static char *trim_fn(const char *ifn)
+{
+  // basically find last /test/
+  char *x, *fn = (char*) ifn;
+  char *rv = fn;
+  if (!strncmp(fn, "test/", 5))
+    return fn; // fn starts with test/
+  while ((x = strstr(rv, "/test/"))) // look for /test/
+    rv = x+1;
+  return rv;
+}
+
+#define TRUE 1
+#define FALSE 0
+int num_classes = 0, n_errors = 0, n_tests = 0;
+int verbose = 0;
+int test_finished = FALSE;
+void f_check2(int actual, int expected, const char *name, const char *filename, int linenum)
+{
+  n_tests++;
+  if (actual != expected) {
+    printf("ERROR at %s:%d '%s' actual %d != expected %d\n", trim_fn(filename), linenum, name, actual, expected);
+    n_errors++;
+  } else if (verbose > 1) {
+    printf("OK at %s:%d '%s' = %d\n", trim_fn(filename), linenum, name, actual);
+  }
+}
+
+void f_check_field_offset(void* ps, void* pf, int ofst, const char *name, const char * filename, int linenum)
+{
+  n_tests++;
+  if ((((char*)ps) + ofst) != ((char*)pf)) {
+    //printf("ERROR at %s:%d '%s' 0x%p + %d != 0x%p\n", trim_fn(filename), linenum, name, ps, ofst, pf);
+    printf("ERROR at %s:%d '%s' expected ofst %d != actual ofst %d\n", trim_fn(filename), linenum, 
+               name, ofst, (int)(((char*) pf)-((char*) ps)));
+    n_errors++;
+  } else if (verbose > 1) {
+    printf("OK at %s:%d '%s' expected ofst = %d\n", trim_fn(filename), linenum, name, ofst);
+  }
+}
+
+
+static Class_Descriptor *cur_cd;
+
+static void *full_object_address; // address of the full object being constructed.
+        // This is used to do checks for ctors and dtors during the construction. 
+        // if the object is being constructed via a placement new, we know the address before
+        // the ctors starts, else this is deduced from the first call to a ctor.
+
+static int cur_init_seq;
+static int ctors_done; // set to 1 once the full object has been created.
+
+void 
+init_simple_test(const char *name)
+{
+  num_classes++;
+  cur_cd = NULL;
+  if (verbose)
+    printf("Testing class %s\n", name);
+}
+
+void 
+init_test(Class_Descriptor *cd, void *var_addr)
+{
+  cur_cd = cd;
+  full_object_address = var_addr;
+  cur_init_seq = 0;
+  num_classes++;
+  ctors_done = 0;
+  if (verbose)
+  printf("Testing class %s\n", cd->name);
+}
+
+#include <stdarg.h>
+extern void abort();
+extern void exit(int);
+static void Blow_Up(const char *m, ...)
+{
+  va_list ap;
+  va_start(ap, m);
+  printf("Assertion Failed: ");
+  vprintf(m, ap);
+  printf("\n");
+  exit(1);
+}
+
+#define Is_True(a, b) if (!(a)) Blow_Up b
+
+static Base_Class *
+find_base_from_seq_num(Class_Descriptor *cd, int seq)
+{
+  Base_Class *b = cur_cd->bases;
+  if (b) {
+    for (; b->type; b++) 
+      if (b->init_seq == seq)
+        return b;
+  }
+  return NULL;
+}
+
+
+static int satisfies_alternate_matches(VTBL_ENTRY expected, VTBL_ENTRY actual, 
+                                         Class_Descriptor *cd, int t)
+{
+  VTBL_ENTRY *alt_tbl = cd->alt_thunk_names;
+  int i=0, state = 0;
+
+  if (!alt_tbl) return 0;
+  // alt_tbl is an array of items separated by a single NULL and terminated by another NULL
+  // each item is a sequence of VTBL entrie such that the first one is the expected value and
+  // rest of them are acceptable alternate values
+  // state machine: state 0 at the start. state 1 inside the list of extected. 2 inside other list
+  // state    ANTERM    expected   actual   any-non-NULL
+  // 0         F         1         F          2
+  // 1         F         F         T          1
+  // 2         0         2         2          2
+  // 
+  //printf(" SAM EXP:%p ACT:%p CD=%p tbl:%p t=%d\n", expected, actual, cd, alt_tbl, t);
+  while (1) {
+    VTBL_ENTRY v = alt_tbl[i];
+    //printf("  [%d] %d= ", i, state); 
+    //printf((v==NULL)?" 0\n":(v==ALT_NAMES_TERMINATOR)?" ALNT\n":":%p\n", v);
+    switch (state) {
+      case 0: 
+        if (v == expected) 
+          state = 1;
+        else if (v == actual || v == ALT_NAMES_TERMINATOR)
+          return FALSE;
+        else
+          state = 2;
+        break;
+      case 1:
+        if (v == actual) {
+          return TRUE;
+        } else if (v == ALT_NAMES_TERMINATOR || v == expected) {
+          return TRUE; // this allows tests to pass if the expected sym is a virtual thunk
+                       // but the actual sym is not in the alternate lists. This can happen
+                       // if there are multiple virtual thunks reaching same place, and
+                       // some compiler selects a different one than our. For now we are
+                       // allowing that. Perhaps we can figure out a way of tightening this
+                       // by 
+                       //    - adding all possible thunks that reach same place, 
+                       //    - somehow comparing thunks for equivalence
+          //return FALSE;
+        } else 
+          state = 1;
+        break;
+      case 2:
+        state = (v == ALT_NAMES_TERMINATOR) ? 0 : 2;
+    }
+    i++;
+  }
+}
+
+
+// actual points to the VTT variable defined by the compiler under test.
+// expected points to an array of VTT_ENTRY structures. Each VTT_ENTRY structure has a 
+// field 'VTBL_ENTRY *vtbl', which must match the corresponding entry of actual. However,
+// the meaning of the match is non-trivial. If expected[i].ofst==0, actual[i] and expected[i].vtbl
+// both must point to same element of the primary vtbl of the class, hence the pointer values
+// must match. if expected[i].ofst is non-zero, both point to copies of secondary vtables whose 
+// contents must be same. In that case, we run memcmp on those vtables.
+static void 
+check_vtt_tbl(Class_Descriptor *cd, VTT_ENTRY *expected, VTBL_ENTRY **actual, char *name, int size)
+{
+  int i, j;
+  n_tests++;
+  if (verbose > 1) 
+    printf("check_vtt_tbl %s %s EXPECTED:%p ACTUAL:%p %d\n", cd->name, name, expected, actual, size);
+  for (i=0; i<size; i++) {
+    if (expected[i].vtbl != actual[i]) {
+      // actual pointers do not match, but the contents could still match. 
+      int ofst = expected[i].ofst;
+      int size = expected[i].size;
+      VTBL_ENTRY *exp = expected[i].vtbl - ofst;
+      VTBL_ENTRY *act = actual[i] - ofst;
+      int n_mismatches = 0;
+      if (memcmp(exp, act, size*sizeof(VTBL_ENTRY)) == 0) {
+        // contents match. 
+        continue;
+      }
+      for (j=0; j<size; j++) {
+        if (exp[j] != act[j] && !satisfies_alternate_matches(exp[j], act[j], cd, j)) {
+          if (n_mismatches==0) {
+            static char erb1[10240], erb2[10240];
+            if (act[j] == NULL) {
+              continue; // a vtbl entry can be NULL in clang, if clang chooses to always use another vtbl
+            }
+            printf("ERROR: Expected contents of %s::vtbl from vtt, for class %s do not match. at index %d. "
+                   "memcmp(EXPECTED:%p,ACTUAL:%p,%d)\n", 
+                   name, cd->name, j, exp, act, (int)(size*sizeof(VTBL_ENTRY)));
+            n_mismatches++;
+            n_errors++;
+            printf("   %d: EXPECTED:%p%s ACTUAL:%p%s\n", j, 
+                    (void*)exp[j], find_symname((void*)exp[j], erb1),
+                    (void*)act[j], find_symname((void*)act[j], erb2));
+          }
+        }
+      }
+    }
+  }
+}
+
+
+static void 
+check_vftbl(Class_Descriptor *cd, void *expected, void *actual, char *name, int size)
+{
+  int i, n_mismatches=0;
+  n_tests++;
+  if (verbose > 1) 
+    printf("check_vftbl %s %s %p %p %d\n", cd->name, name, expected, actual, size);
+  if (memcmp(expected, actual, sizeof(VTBL_ENTRY)*size)) {
+    void **pexp = (void**) expected;
+    void **pact = (void**) actual;
+    for (i=0; i<size; i++) {
+      if (pexp[i] != pact[i] && 
+              !satisfies_alternate_matches((VTBL_ENTRY)pexp[i], (VTBL_ENTRY)pact[i], cd, -i)) {
+        static char erb1[10240], erb2[10240];
+        if (pact[i] == NULL) {
+          continue; // a vtbl entry can be NULL in clang, if clang chooses to always use another vtbl
+        }
+          
+        if (n_mismatches==0) {
+          printf("ERROR: Expected contents of %s::vtbl, for class %s do not match.\n", name, cd->name);
+          n_errors++;
+          n_mismatches++;
+        }
+        printf("  %d: EXPECTED:%p%s ACTUAL:%p%s\n", i, pexp[i], find_symname(pexp[i], erb1),
+                pact[i], find_symname(pact[i], erb2));
+      }
+    }
+  }
+}
+
+// if derivation of b in cd has any virtual steps, return he most-derived such base, else 
+// return NULL
+static Base_Class *
+any_virtual_steps_in_derivation(Class_Descriptor *cd, Base_Class *b)
+{
+  // first a simple assertion check that b is a base class of cd
+  Is_True(
+    cd->bases &&  // cd has bases
+    (b >= cd->bases) && ((b-cd->bases) < cd->n_bases) && // b lies between first and last base of cd
+    ((cd->bases + (b-cd->bases)) == b), // it is a proper Base_Class ptr
+          ("Wrong base in any_virtual..."));
+  while (1) {
+    if (b->is_virtual)
+      return b;
+    if (b->parent_idx < 0)
+      return 0;
+    b = cd->bases + b->parent_idx;
+  }
+}
+
+// check tbls of cd and all non-virtual bases, and, if check_virtual_bases is TRUE, its
+// virtual bases as well. This flag will be true when the var_ptr points to a full object of 
+// type cd, i.e., 
+//  - when the cd is the main class under test and the full object of cd has been constructed,
+//    and destruction has not yet started,
+//  - or, if cd is a base class of the class under test, but cd itself does not have any 
+//    virtual base classes and we are currently in ctor or dtor of cd.
+static void 
+check_full_object_vtbls(void *var_ptr, Class_Descriptor *cd, int check_virtual_bases)
+{
+  Base_Class *b;
+  // check that the initialized contents of the main vtbl variable, as generated by the 
+  // compiler-under-test are what we expect them to be
+  if (cd->expected_vtbl_contents) {
+      check_vftbl(cd, cd->expected_vtbl_contents, cd->vtbl.var, cd->vtbl.name, cd->vtbl_size);
+      // check that the fully initialized object attaches to that vtbl variable at correct
+      // offset. i.e., var_ptr[0] should point inside the vtbl_var+vtbl_ofst. 
+      // However, if var_ptr is does not point to a full object of cd (indicated by 
+      // check_virtual_bases being false), and cd has some virtual bases, its vtbl will not match
+      // the cd->vtbl_var because that reflects the shape of a full object of cd.
+      if (check_virtual_bases || !cd->has_virtual_bases) {
+        if ((*(VTBL_ENTRY**)var_ptr) != (cd->vtbl.var + cd->vtbl_ofst)) {
+          printf("ERROR: Object of class %s::%s does not point to expected spot in vtbl\n", cur_cd->name, cd->name);
+          n_errors++;
+        }
+      }
+  }
+  // check that any non-primary base classes also attach to the expected offsets
+  if (cd->bases)
+  for (b=cd->bases; b->type; b++) {
+      if (b->ofst != 0 && b->vtbl_ofst >= 0 && (check_virtual_bases || !any_virtual_steps_in_derivation(cd, b))) {
+        // cd->vtbl.var is the vbl variable. It contains the main vtbl, followed by vtbls
+        // for base classes at non-zero offsets. b->vtbl_ofst is the offset (in terms of vtbl 
+        // entries) of the b's vtbl in the main vtbl. But the object does not attach to the top
+        // of any vtbl; it attaches at least two entries down, and maybe more. That is given by 
+        // b->num_negative_vtbl_entries
+        if ((*(VTBL_ENTRY**)(b->ofst+(char*)var_ptr)) !=
+                (cd->vtbl.var + (b->vtbl_ofst+b->num_negative_vtbl_entries))) {
+          printf("ERROR: base class %s of class %s::%s does not have correct vtbl ", b->type->name,
+                 cur_cd->name,  cd->name);
+          printf("0x%x != (0x%x + %d + %d) = 0x%x\n",
+          (int)(*(VTBL_ENTRY**)(b->ofst+(char*)var_ptr))  ,
+              (int)cd->vtbl.var ,(int) b->num_negative_vtbl_entries, (int)b->vtbl_ofst,
+              (int)(cd->vtbl.var + (b->vtbl_ofst+b->num_negative_vtbl_entries)));
+          n_errors++;
+        }
+      }
+  }
+}
+
+
+
+// Given a derived class der, and it base class entry b. d_in_b is a Base_Class entry in
+// b->type. Find corresponding Base_Class entry of der.
+// There are three possible situations:
+// 1) d_in_b is virtual by itself. In that case we need to just find a virtual base class of same
+//    type in der. Since there can be only one such virtual base class in der, that is all.
+// 2) d_in_b is not virtual, and there are no virtual steps from b to d_in_b. In this case
+//    the relative offset of b-to-d_in_b will be same in der as it is in a b. So we just look
+//    for a base class of expected type at such computed offset.
+// 3) Third case is more complicated. here d_in_b is not virtual by itself, but there are virtual
+//    steps in b-to-d_in_b derivation. Say a base class t is lowest such step, i.e., t is a 
+//    virtual base of b, and d_in_b is a base class of t without any virtual steps from t to 
+//    d_in_b. In this case we first find the virtual base t in der using rule 1, and then use 
+//    rule 2 to find the final answer
+//
+static Base_Class *
+find_corresp_base(Class_Descriptor *der, Base_Class *b, Base_Class *d_in_b)
+{
+  Base_Class *t, *p, *q;
+
+  if (d_in_b->is_virtual) {
+    // case 1
+    for (t = der->bases; t < (der->bases + der->n_bases); t++)
+      if (t->is_virtual && t->type == d_in_b->type)
+        return t;
+    Is_True(0, ("Count not find virtual base class %s in %s", d_in_b->type->name, der->name));
+  }
+  if (!(p=any_virtual_steps_in_derivation(b->type, d_in_b))) {
+    // case 2
+    for (t = der->bases; t < (der->bases + der->n_bases); t++)
+      if ((!t->is_virtual) && t->ofst == (b->ofst + d_in_b->ofst) && t->type == d_in_b->type )
+        return t;
+    Is_True(0, ("Count not find non virtual base class %s in %s", d_in_b->type->name, der->name));
+  }
+
+  // case 3. First we find the highest non-virtual derived class from d_in_b
+  q = find_corresp_base(der, b, p);// use rule 1. This will work because we know that p is virtual
+  for (t = der->bases; t < (der->bases + der->n_bases); t++)
+    if ((!t->is_virtual) && t->ofst == (q->ofst + d_in_b->ofst-p->ofst) && t->type == d_in_b->type )
+      return t;
+  Is_True(t<(der->bases + der->n_bases), ("Could not find_corresp_base(%s, %s, %s)", der->name, 
+              b->type->name, d_in_b->type->name));
+  return 0;
+}
+
+// same as strcat, but some toolkits do not have strcat
+static void 
+mystrcat(char *a, char *b)
+{
+  int i, j;
+  for (j=0; a[j]; j++) ;
+  for (i=0; b[i]; i++) a[j++] = b[i];
+  a[j] = 0;
+}
+
+// Called from ctor and dtors of base classes of the main class under test (which is cur_cd).
+// init_seq is the sequence number of ctors, which increases from 1 till the whole class has
+// been contructed, and decreases back. n is the name of the baseclass whose ctor/dtor has 
+// been called. this_p is the 'this' pointer being pass the ctor/dtor. The task here is to check
+// that correct vtbls are being passed to the current class being constructed, and all its
+// base classes.
+void 
+check_base(int init_seq, const char *n, void* this_p, const char *filename, int linenum)
+{
+  Base_Class *b;
+  if (verbose> 1) 
+    printf("check_%ctor %s %p-%p from %s:%d cur_cd=%s init_seq=%d cur_init_seq=%d\n", 
+            ctors_done?'d':'c',
+            n, this_p, full_object_address, trim_fn(filename), linenum, cur_cd->name, init_seq, cur_init_seq);
+  if (init_seq == 1 && !full_object_address) {
+    // this is first call. Go through base classes of cur_cd to find the base with 
+    // init_seq==1, and deduce the full object address from that. 
+    b = find_base_from_seq_num(cur_cd, 1);
+    Is_True(b, ("first-init base not found"));
+    full_object_address = (void*) (((char*)this_p) - b->ofst);
+  } else {
+    // find the base with this init seq
+    b = find_base_from_seq_num(cur_cd, init_seq);
+    Is_True(b, ("init base %s %d not found", cur_cd->name, init_seq));
+  }
+  if (strcmp(b->type->name, n)) {
+    printf("Wrong ctor/dtor being called \n");
+    n_errors++;
+    return;
+  }
+  if (full_object_address != (void*) (((char*)this_p) - b->ofst)) {
+    printf("ERROR: %ctor of %s::%s being called with wrong offset 0x%p != 0x%p+%d = 0x%p\n", 
+            ctors_done?'d':'c', cur_cd->name, b->type->name,
+            this_p, full_object_address, (int)b->ofst, 
+             ((char*)full_object_address)+b->ofst);
+    n_errors++;
+    return;
+  }
+  if (!cur_cd->vtbl.var)
+    return; // nothing further to check.
+  // While construction a full object A, during construction or destruction of a subobject, 
+  // say B, the virtual function set of A::B must be same as the full object B, irrespective of
+  // any virtual function overrides between B and A. However, the shape of A::B is not necessarily
+  // same of the full object B.
+  if (!b->type->has_virtual_bases) {
+    // The shape of A::B is same as the full object B, since B does not have any virtual bases.
+    // In that case, we can just run the full_object test.
+    check_full_object_vtbls(this_p, b->type, TRUE);
+  } else {
+    // b->type has some virtual bases of its own. So the shape is not same as that of a full 
+    // b->type, but the virtual function set is. In this case check the primary vtbl, and 
+    // each base class separately.
+    // We are running ctor of B, while constructing full object A
+    // First, the primary vtbl test.
+    //   a) if b->type_subarray_index_in_vtt is non-zero, the primary vtable is A.vtt[b.index_in_vtbl-1]
+    //   b) else find the lowest parent, D, of B whose Base_Class entry for class B has a non-zero 
+    //      index_in_vtt. (this is a_base_class.index_in_construction_vtable_array). There 
+    //      must be one.
+    //   c) proceed up from D to A, collecting 
+    //      (base_subarray_index_in_vtt-1) whereever base_subarray_index.. is non-zero, and
+    //      add that to the number of the last step.
+    VTBL_ENTRY *pointed_tbl = *(VTBL_ENTRY**)this_p;
+    VTT_ENTRY *vttp;
+    Base_Class *d_in_b, *d_in_cur_cd;
+    Class_Descriptor *bc = b->type;
+    //check_full_object_vtbls(this_p, b->type, FALSE); // check non-virtual base classes, if any
+    Is_True(b->base_subarray_index_in_vtt>0, ("%s::%s->type_subarray_index_in_vtt must be >0",
+                                                   cur_cd->name, bc->name));
+    vttp = cur_cd->expected_vtt_contents + (b->base_subarray_index_in_vtt-1);
+    check_vftbl(cur_cd, vttp->vtbl - vttp->ofst, pointed_tbl-vttp->ofst, b->type->name, vttp->size);
+    // and now we need to check vtbls of all subclasses of b that use vtbl.
+    // scan all base classes of B, and find corresponding Base_Class entry in cur_cd->bases
+    for (d_in_b = bc->bases; d_in_b < (bc->bases+bc->n_bases); d_in_b++) {
+      char buf[10240];
+      if (!d_in_b->type->vtbl.var)
+        continue; // nothing to check for this base
+      if (d_in_b->index_in_vtt == 0)
+        continue; // checked via some other base
+      d_in_cur_cd = find_corresp_base(cur_cd, b, d_in_b);
+      if (d_in_b->ofst == 0)
+        continue; // d is at offset 0, so the vtbl has already been checked above.
+      // we need to take the offset from d_in_cur_cd, because that reflects the shape of cur_cd
+      // but we take expected vtbl ptr by first selecting vtt group for b-in-cur_cd and then
+      // using d-in-b to pick a particular vtbl
+      vttp = cur_cd->expected_vtt_contents + (b->base_subarray_index_in_vtt-1) + (d_in_b->index_in_vtt-1);
+      pointed_tbl = *(VTBL_ENTRY**)(((long)full_object_address) + d_in_cur_cd->ofst);
+
+      // follwing four lines are essentially
+      //     sprintf(buf, "%s-during-%s()", d_in_b->type->name, bc->name);
+      buf[0] = 0;
+      mystrcat(buf, d_in_b->type->name);
+      mystrcat(buf, "-during-");
+      mystrcat(buf, bc->name);
+      mystrcat(buf, "()");
+      check_vftbl(cur_cd, vttp->vtbl - vttp->ofst, pointed_tbl-vttp->ofst, buf, vttp->size);
+    }
+  }
+}
+
+static Base_Class *find_base_class(ptrdiff_t ofst, Class_Descriptor *cd, const char *name)
+{
+  Base_Class *bc = cd->bases;
+  if (bc) {
+    for (; bc < (cd->bases+cd->n_bases); bc++)
+      if (bc->ofst == ofst && !strcmp(bc->type->name, name))
+        return bc;
+  }
+  return NULL;
+}
+
+void 
+f_note_ctor(const char *n, void* this_p, const char *filename, int linenum)
+{
+  if (cur_cd == NULL) // cur_cd has no base classes. This must be from a field
+    return;
+  if (!cur_cd->has_class_type_fields) {
+    if (strcmp(n, cur_cd->name))
+      check_base(++cur_init_seq, n, this_p, filename, linenum);
+    // else we have reached the ctor of the top class. The tests will be done by test_class_info
+  } else if (cur_cd->n_bases == 0) {
+    // nothing to check. ctor is for a field.
+  } else {
+    // cur_cd has fields that will call constructors and destructors, therefore init_sequence 
+    // checks can not be done, but it also has bases that need to be checked.
+    // See if a base matches the offset and type, and check that
+    Base_Class *bc = find_base_class(((char*)this_p) - ((char*)full_object_address), cur_cd, n);
+    if (bc)
+      check_base(bc->init_seq, n, this_p, filename, linenum);
+  }
+}
+
+void 
+f_note_dtor(const char *n, void * this_p, const char *filename, int linenum)
+{
+  if (test_finished)
+    return;
+  if (cur_cd == NULL) // cur_cd has no base classes. This must be from a field
+    return;
+  if (!cur_cd->has_class_type_fields) {
+    if (strcmp(n, cur_cd->name))
+      check_base(cur_init_seq--, n, this_p, filename, linenum);
+    // else we are destroying the top class. The tests have been done by test_class_info
+  } else if (cur_cd->n_bases == 0) {
+    // nothing to check. dtor is for a field.
+  } else {
+    // cur_cd has fields that will call constructors and destructors, therefore init_sequence 
+    // checks can not be done, but it also has bases that need to be checked.
+    // See if a base matches the offset and type, and check that
+    Base_Class *bc = find_base_class(((char*)this_p) - ((char*)full_object_address), cur_cd, n);
+    if (bc)
+      check_base(bc->init_seq, n, this_p, filename, linenum);
+  }
+}
+
+void Check_Ctor_Dtor_Calls(void *op)
+{
+  if (cur_init_seq != 0) {
+    printf("ERROR: Expected number of dtors not called %s\n", cur_cd->name);
+    n_errors++;
+  }
+}
+
+
+void test_class_info(void *var_ptr, Class_Descriptor* cd)
+{
+  ctors_done = 1;
+  if (verbose > 1) {
+    printf("test_class_info %s %p cur_init_seq=%d\n", cd->name, var_ptr, cur_init_seq);
+  }
+  if (full_object_address && full_object_address != var_ptr) {
+    printf("ERROR: full object address does not match deduced address %s\n", cur_cd->name);
+    n_errors++;
+  }
+  if ((cur_init_seq != cd->n_initialized_bases) && !cd->has_class_type_fields) {
+    printf("ERROR: Not all bases of %s were initialized \n", cur_cd->name);
+    n_errors++;
+  }
+  if (cd->expected_vtbl_contents) {
+    // check that fully constructed object points to correct vtbls.
+    check_full_object_vtbls(var_ptr, cd, TRUE);
+  }
+  if (!cd->vtt.var) {
+    // Sunil: may 1, 2014: Made vtt a weak symbol and added '&&cd->vtt.var' check. Clang, with -O
+    // does not generate VTT if it is not going to be used, such as if a class X has virtual base 
+    // Y but Y has no virtual base of functions. In this case the VTT for X will never be used.
+    // TODO: add check for that property; that base classes do not need vtt.
+  } else if (cd->expected_vtt_contents) {
+    // We can not simply compare the contents of VTT tables always. 
+    // VTT table has two kind of entries. Some entries point to elements of main vtbl whose
+    // name is specified by the ABI spec, so we refer to them as globally visible name, and
+    // we can expec the pointer values in vtt to be same.
+    // In other cases though, vtt entries point to aux-vtables, whose names are not specified
+    // by the ABI spec, so the generated tests have their own names which are not same as the
+    // names generated by the compiler-under-test. Their contents are expected to match, but
+    // not the pointer values. The contents are being tested by the ctor vtable tests.
+    // TODO: check those vtt entries here that point to main vtbl
+    check_vtt_tbl(cd, cd->expected_vtt_contents, cd->vtt.var, cd->vtt.name, cd->vtt_size);
+  }
+}
+
+static int f_isLittleEndian() {
+  unsigned short i = 0xff00;
+  unsigned char *i_ptr = (unsigned char *) &i;
+  return !(*i_ptr);
+}
+static int isLittleEndian;
+
+static unsigned char LITTLE_ENDIAN_MASKS[] = { 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
+static unsigned char BIG_ENDIAN_MASKS[] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff };
+
+// Function to read the value of a bitfield
+// NOTE: This function implicitly depends on a byte having 8 bits. If a byte is of a different size, several of the calculations would be incorrect.
+static long long readValue(unsigned char *iter, unsigned int bit_offset, int size) {
+  int is_little_endian = isLittleEndian;
+  long long retval = 0;
+  unsigned char mask = 0;
+  unsigned char adjustment_offset = 0;
+
+  if(!iter) return retval;
+
+  // read the first partial piece (if any)
+  if(bit_offset) {
+    unsigned char bits_to_read = 8 - bit_offset;
+    // Check to see if the object is fully contained within the remaining bits, and if so
+    // restrict the read to only those bits.
+    if(size < bits_to_read)
+      bits_to_read = size;
+
+    if(is_little_endian) {
+      mask = LITTLE_ENDIAN_MASKS[bits_to_read] << bit_offset;
+      retval = ((*iter) & mask) >> bit_offset;
+      adjustment_offset += bits_to_read;
+    } else {
+      mask = BIG_ENDIAN_MASKS[bits_to_read] >> bit_offset;
+      retval = (*iter) & mask;
+      // If we read in the entire value, we need to potentially right shift it, and clear 
+      // out the upper bits to be safe
+      if(size == bits_to_read) {
+        retval >>= (8 - (bits_to_read + bit_offset));
+        retval &= ~(BIG_ENDIAN_MASKS[8 - bits_to_read]);
+      }
+    }
+
+    // Decrement the size by the number of bits read, and move to the next byte
+    size -= bits_to_read;
+    iter++;
+  }
+  
+  // read in a full byte at a time
+  while(size >= 8) {
+    if(is_little_endian) {
+      retval |= ((long long)((*iter) & 0xff)) << adjustment_offset;
+      adjustment_offset += 8;
+    } else {
+      retval <<= 8;
+      retval |= (*iter) & 0xff;
+    }
+    // Decrement the size by a byte and move to the next byte
+    size -= 8;
+    iter++;
+  }
+
+  // read any remaining bits
+  if(size) {
+    if(is_little_endian) {
+      mask = LITTLE_ENDIAN_MASKS[size];
+      retval |= ((long long)((*iter) & mask)) << adjustment_offset;
+      adjustment_offset += size;
+    } else {
+      mask = BIG_ENDIAN_MASKS[size];
+      retval <<= size;
+      retval |= ((*iter) & mask) >> (8 - size);
+    }
+    size = 0;
+    iter = 0;
+  }
+
+  return retval;
+}
+
+
+int  is_bitfield_value_correct(void *obj_ptr, unsigned int byte_offset, unsigned int bit_offset, unsigned int size, long long expected_value) {
+  long long read_value = readValue(((unsigned char *)obj_ptr) + byte_offset, bit_offset, size);
+  unsigned long long expected_mask = 0, i;
+
+  //n_tests++;
+
+  // Calculate the mask to be used for the incoming value which was probably sign extended
+  expected_mask = 0;
+  for(i = 0; i < size; i += 8) {
+    expected_mask <<= 8;
+    expected_mask |= 0xff;
+  }
+  if(size % 8) {
+    expected_mask <<= (size % 8);
+    expected_mask |= LITTLE_ENDIAN_MASKS[(size % 8)];
+  }
+  expected_value &= expected_mask;
+  read_value &= expected_mask;
+
+  if(read_value != expected_value) 
+    return 0;
+
+  return 1;
+}
+void clear_var(void *a, unsigned b)
+{
+  // do not rely on memzero
+  char *ca = a;
+  unsigned i;
+  for (i=0; i<b; i++)
+    ca[i] = 0;
+}
+
+
+
+void test_bitfield_value(void *obj_ptr, unsigned int byte_offset, unsigned int bit_offset, 
+                         unsigned int size, long long expected_value, unsigned var_size, 
+                         const char *name, const char *filename, int linenum) {
+  long long read_value = readValue(((unsigned char *)obj_ptr) + byte_offset, bit_offset, size);
+  unsigned long long expected_mask = 0, i;
+
+  n_tests++;
+
+  // Calculate the mask to be used for the incoming value which was probably sign extended
+  expected_mask = 0;
+  if (size > 7)
+  for(i = 0; i < size; i += 8) {
+    expected_mask <<= 8;
+    expected_mask |= 0xff;
+  }
+  if(size % 8) {
+    expected_mask <<= (size % 8);
+    expected_mask |= LITTLE_ENDIAN_MASKS[(size % 8)];
+  }
+  expected_value &= expected_mask;
+  read_value &= expected_mask;
+
+  if(read_value != expected_value) {
+    int i, found = -1;
+    for (i=1; i<20; i++) {
+      if ((byte_offset+i) < var_size && is_bitfield_value_correct(obj_ptr, byte_offset+i, bit_offset, size, expected_value)) {
+        found = byte_offset+i;
+        break;
+      }
+      if (byte_offset >= i && is_bitfield_value_correct(obj_ptr, byte_offset-i, bit_offset, size, expected_value)) {
+        found = byte_offset-i;
+        break;
+      }
+    }
+    printf("ERROR at %s:%d Bitfield errors found (expected=0X%llX, got=0X%llX) in %s", 
+            trim_fn(filename), linenum, expected_value, read_value, name);
+    if (found >= 0) printf(" expected byte ofst %d != actual byte ofst %d", byte_offset, found);
+    printf("\n");
+    n_errors++;
+  }
+
+  return;
+}
+
+
+ATCM *atcm_head;
+
+#ifndef __cplusplus
+extern void *malloc(size_t);
+void atc_register(voidfunc func, const char *name, size_t sz)
+{
+  ATCM *sa = (ATCM*) malloc(sizeof(ATCM));
+  sa->next = atcm_head;
+  atcm_head = sa;
+  sa->func = func;
+  sa->name = name;
+}
+
+#endif
+
+
+int main(int argc, char **argv)
+{
+  int i, run_full_test = 1;
+  ATCM *p;
+  isLittleEndian = f_isLittleEndian();
+  for (i=1; i<argc; i++) {
+    char *a = argv[i];
+    if (a[0] == '-' && a[1] == 'v') {
+      verbose++;
+      continue;
+    }
+    for (p=atcm_head; p; p = p->next)
+      if (strcmp(a, p->name)==0)
+        break;
+    if (!p) {
+      printf("Unknown arg '%s'\n", a);
+      exit(1);
+    }
+    p->func();
+    run_full_test = 0;
+  }
+  if (run_full_test) {
+    ATCM *t, *h = NULL;
+    // first reverse the chain
+    while (atcm_head) {
+      t = atcm_head;
+      atcm_head = t->next;
+      t->next = h;
+      h = t;
+    }
+
+    while (h) {
+      h->func();
+      h = h->next;
+    }
+  }
+  printf("TEST %s. %d classes. %d tests. %d failures.\n", 
+           n_errors||!n_tests?"FAILED":"PASSED",num_classes, n_tests, n_errors);
+  
+  test_finished = TRUE;
+  cur_cd = NULL;
+  return n_errors != 0;
+}
+
+long long hide_sll(long long p) { return p; }
+unsigned long long hide_ull(unsigned long long p) { return p; }
+#if 0 //def __linux__
+static char *find_symname(void *addr, char *buf)
+{
+  Dl_info dli;
+  int rv;
+  if (!addr) return "";
+  rv = dladdr(addr, &dli);
+  if (rv) return "";
+  long ofst = ((long)dli.dli_saddr) - ((long)addr);
+  if (ofst > 0)
+    sprintf(buf, " (%s+%ld)", dli.dli_sname, ofst);
+  else if (ofst < 0)
+    sprintf(buf, " (%s-%ld)", dli.dli_sname, -ofst);
+  else
+    sprintf(buf, " (%s)", dli.dli_sname);
+  return buf;
+}
+#endif

Propchange: test-suite/trunk/ABI-Testsuite/test/common/testsuite.c
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/common/testsuite.h
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/common/testsuite.h?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/common/testsuite.h (added)
+++ test-suite/trunk/ABI-Testsuite/test/common/testsuite.h Mon Jul 28 16:20:34 2014
@@ -0,0 +1,224 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+#ifndef __testsuite_dot_h
+#define __testsuite_dot_h
+#include <stddef.h>
+
+#include "../../selector.h"
+
+typedef long VTBL_ENTRY;
+
+
+#define LPSELECT(a,b) ABISELECT(a,b)
+
+#define vfunc_called(a,b)
+
+#define NO_STATIC_CHECKS 1
+
+#ifdef __cplusplus
+#define STRUCT_IF_C 
+#else
+#define STRUCT_IF_C struct // in C mode we neet put 'struct' before typetag
+#endif
+
+#define ALT_NAMES_TERMINATOR ((VTBL_ENTRY)1)
+
+#define __tsi64 long long
+#define __tsu64 unsigned long long
+#define __tsulong unsigned long
+extern int verbose, num_classes , n_errors , n_tests ;
+//typedef char char_al_16 __attribute__((aligned(16)));
+//typedef char char_al_32 __attribute__((aligned(32)));
+//typedef char char_al_64 __attribute__((aligned(64)));
+//typedef char char_al_128 __attribute__((aligned(128)));
+//typedef char char_al_256 __attribute__((aligned(256)));
+//typedef char char_al_512 __attribute__((aligned(512)));
+//typedef char char_al_1024 __attribute__((aligned(1024)));
+//typedef char char_al_2048 __attribute__((aligned(2048)));
+typedef struct { char __attribute__((aligned(16))) a[16]; } sal_16;
+typedef struct { char __attribute__((aligned(32))) a[32]; } sal_32;
+typedef struct { char __attribute__((aligned(64))) a[64]; } sal_64;
+typedef struct { char __attribute__((aligned(128))) a[128]; } sal_128;
+typedef struct { char __attribute__((aligned(256))) a[256]; } sal_256;
+typedef struct { char __attribute__((aligned(512))) a[512]; } sal_512;
+typedef struct { char __attribute__((aligned(1024))) a[1024]; } sal_1024;
+typedef struct { char __attribute__((aligned(2048))) a[2048]; } sal_2048;
+
+// A struct to map names of functions to their ptrs. A terminated array of
+// these is attached to each Class_Descriptor
+typedef struct {
+  void (*func)();
+  const char *name;
+} Name_Map;
+#define NSPAIR(name) { &name, #name}
+#define NSPAIRA(name) { name, #name}
+typedef struct Class_Descriptor Class_Descriptor;
+
+// A structure to represent base classes 
+// or destructing a derived class under test. An array of these is attached to the
+// Class_Descriptor. That array specifies expected sequence of base classses that will 
+// be constructed while constructing the 
+typedef struct _base_class {
+  Class_Descriptor *type;   // class decriptor of the base
+  ptrdiff_t        ofst;    // offset in derived class
+  ptrdiff_t        vtbl_ofst;  // if >=0, the index of vtable component for this base class inside
+                            // the full object. This is not where the baseclass.vptr field will 
+                            // point to, though. For that we need to add num_negative_vtbl_entries
+  ptrdiff_t        num_negative_vtbl_entries;
+                            // In the full object, the base_class.vptr points to
+                            // *(vtbl_enrty**)(full_object_address+b->ofst) ==
+                            // b->base->tv.typeinfo_var_ptr + b->vtbl_ofst+b->num_negative_vtbl_entries
+  unsigned int index_in_vtt;         
+                            // if base needs a vftbl, this is the index of that vftbl in the vtt
+                            // of the derived class. Both this and next field are 1-shifted, in
+                            // the sense that the value 0 indicates that this field is unused, and 
+                            // value N represends index (N-1)
+  unsigned int base_subarray_index_in_vtt; 
+                            // if base needs a vtt itself, this is the index of that vtt set
+                            // in its parent vtt.
+  int init_seq;             // while initializing final derive ctor-body of this base classs is 
+                            // executed at this seq, from 1. If <0, if that base class has no 
+                            // ctor, so a call to note_ctor will not be made for this
+  int parent_idx;           // indexof direct parent, if any. -1 if none
+  unsigned char is_direct, is_virtual;
+} Base_Class;
+
+typedef struct {
+  VTBL_ENTRY *var;
+  char *name;
+} vName_Map;
+typedef struct {
+  VTBL_ENTRY **var;
+  char *name;
+} vpName_Map;
+
+typedef struct {
+  VTBL_ENTRY *vtbl;
+  unsigned short ofst, size;
+} VTT_ENTRY;
+
+struct Class_Descriptor {
+  char *name; // mangled class name
+  Base_Class *bases; // a NULL terminated arrray of ptrs to Class_Descriptors of direct bases
+  int n_bases;
+  VTBL_ENTRY *expected_vtbl_contents; 
+              // ptr to an initialized array of ints having expected vtbl contents
+
+  VTT_ENTRY *expected_vtt_contents; 
+              // ptr to an initialized array of VTT_ENTRY having expected vtt contents
+              // VTT entries contain a ptr to an expected point in vtbl, and a negative ofst
+              // and size, if that point is not in the main vtbl variable
+
+  int class_size;
+
+  struct {
+    VTBL_ENTRY *typeinfo_var_ptr; // actually it is a typeinfo ptr, but it is pointed to by a
+                                   // vtbl_entry, so it is more convenient this way
+    const char *typeinfo_var_name;
+  } tv;
+  int tv_size;
+
+
+  // The virtual function table var is a combined 
+  vName_Map vtbl; // extern reference to vtbl var, defined by the compiler under test
+  int vtbl_size, // number of entries in vtbl var. This not the 
+      vtbl_ofst; // offset from top of vtbl_var where the class attaches to it 
+  // size before address point is vtbl_ofst. total size is vtbl_size
+
+  vpName_Map vtt; // extern reference to VTT name, defined by the compiler under test
+  int vtt_size;
+  unsigned int n_initialized_bases;
+  unsigned char has_virtual_bases;
+  unsigned char has_class_type_fields;
+  VTBL_ENTRY *alt_thunk_names;
+};
+
+
+
+#ifdef __cplusplus
+//inline void *operator new(std::size_t, void * x) { return x;}
+inline void *operator new(size_t, void * x) { return x;}
+extern "C" {
+#endif
+
+  extern long long hide_sll(long long);
+  extern unsigned long long hide_ull(unsigned long long);
+  extern void f_note_ctor(const char *, void*, const char *, int);
+  extern void f_note_dtor(const char *, void*, const char *, int);
+  extern void init_test(Class_Descriptor*, void *addr);
+  extern void init_simple_test(const char *name);
+  extern void f_check2(int actual, int expected, const char *name, const char *filename, int linenum);
+  extern void f_check_field_offset(void *var_p, void *fld_p, int expected_ofst, const char *name, const char *filename,int linenum);
+  extern void Check_Ctor_Dtor_Calls(void *);
+  void test_class_info(void *, Class_Descriptor*);
+  void test_bitfield_value(void *obj_ptr, unsigned byte_offset, unsigned bit_offset, unsigned bit_size, long long expected_value, unsigned obj_size, const char *name, const char *filename, int linenum);
+  void clear_var(void *a, unsigned sz);
+#ifdef __cplusplus
+}
+#endif
+
+#define note_ctor(a,b) f_note_ctor(a,b,__FILE__, __LINE__)
+#define note_dtor(a,b) f_note_dtor(a,b,__FILE__, __LINE__)
+
+#ifdef NO_STATIC_CHECKS
+
+// This version of checking macros does all checking at runtime.
+#define check2(a, b, c) f_check2(a,b,c,__FILE__, __LINE__)
+
+
+#else // !NO_STATIC_CHECKS
+
+// This version of checking macros reports test failures at compiler time. The resulting code
+// is smaller with this version, but even one failure will prevent the build
+#define check2(a,b,c) { extern int jj[(2*((a)==(b)))-1];n_tests++;} 
+
+#endif // !NO_STATIC_CHECKS
+
+#define check_field_offset(var, fld, ofst, name) \
+    f_check_field_offset(&var, &(var.fld), ofst, name, __FILE__, __LINE__)
+
+#define check_base_class_offset(var, derivation_seq, ofst, cn) \
+    f_check_field_offset(&var, derivation_seq &var, ofst, #derivation_seq cn, __FILE__, __LINE__)
+#define AMB_check_base_class_offset(var, derivation_seq, ofst, cn) 
+
+#define set_bf_and_test(var, bitfield, byte_ofst, bit_ofst, bit_size, value, classname) \
+    {var.bitfield = value; \
+     test_bitfield_value(&var, byte_ofst, bit_ofst, bit_size, value, sizeof(var),classname "." #bitfield, __FILE__, __LINE__);}
+
+typedef void (*voidfunc)(void);
+typedef struct _atcm { // The C struct equivalent to Arrange_To_Call_Me
+  voidfunc func;
+  struct _atcm *next;
+  const char *name;
+} ATCM;
+
+#ifdef __cplusplus
+extern struct Arrange_To_Call_Me *atcm_head;
+struct Arrange_To_Call_Me {
+  voidfunc func;
+  Arrange_To_Call_Me *next; 
+  const char *name;
+  Arrange_To_Call_Me(voidfunc f, const char *n, unsigned size=10) { 
+    if (size <= 10240) {
+      func = f;
+      next = atcm_head;
+      atcm_head = this;
+      name = n;
+    }
+  }
+};
+#define ARRANGE_TO_CALL_ME(func,cn) Arrange_To_Call_Me v##cn(func, #cn, sizeof(cn));
+#else
+extern void atc_register(voidfunc func, const char *name, size_t sz);
+#define ARRANGE_TO_CALL_ME(func,cn) __attribute__((constructor)) static void atc_##cn() \
+              { atc_register(func,#cn, sizeof(struct cn));}
+
+
+#endif
+
+// bs is the size of a signed bitfield in bits. v is a constant being assigned to it. 
+// sign extend v.
+#define SEXT_BFV(bs,v) ((v)|(((v) & (1ULL<<((bs)-1))) ? (~(1ULL<<(bs))) : 0))
+
+
+#endif // __testsuite_dot_h

Propchange: test-suite/trunk/ABI-Testsuite/test/common/testsuite.h
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/lit.site.cfg
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/lit.site.cfg?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/lit.site.cfg (added)
+++ test-suite/trunk/ABI-Testsuite/test/lit.site.cfg Mon Jul 28 16:20:34 2014
@@ -0,0 +1,170 @@
+# This file is distributed under the University of Illinois Open Source License.
+# See LICENSE.TXT for details.
+# -*- Python -*-
+
+import lit
+
+# Configuration file for the 'lit' test runner.
+
+# name: The name of this test suite.
+config.name = 'SN C++ IA64 ABI Tests'
+
+# testFormat: The test format to use to interpret tests.
+#
+# For now we require '&&' between commands, until they get globally killed and
+# the test runner updated.
+config.test_format = lit.formats.ShTest(execute_external = True)
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes = ['.c', '.cpp']
+
+###
+
+# Discover the 'clang' and 'clangcc' to use.
+
+import os
+import shutil
+
+def copyFile(srcfile,dstfile):
+    try:
+        shutil.copyfile(srcfile, dstfile)
+    except:
+        sfp = open(srcfile, "r")
+        src = sfp.read();
+        dfp = open(dstfile, "w")
+        dfp.write(src)
+        dfp.close()
+        sfp.close()    
+    return
+
+def generateTests():
+    config = lit_config.params["test_params"]
+    
+    if "skip_list" not in config or len(config["skip_list"]) == 0:
+        skip_list = []
+    else:
+        skip_list = [os.path.normpath(tmp) for tmp in sorted(config["skip_list"])]
+    
+    for root, dirs, files in os.walk("test"):
+        for filename in files:
+            (file_noext, ext) = os.path.splitext(filename)
+            new_ext = ""
+            if ext == ".x":
+                new_ext = ".c"
+            elif ext == ".xpp":
+                new_ext = ".cpp"
+            else:
+                # skip this file
+                continue
+            
+            # Generate the full new/old filenames
+            srcfile = os.path.join(root, filename)
+            dstfile = os.path.join(root, file_noext + new_ext)
+
+            # Algorithm for creating the files more optimally:
+            # 
+            # Target file Exists:
+            #  - Size is same as original
+            #    - File is NOT in skip list
+            #      => No action needed
+            #    - File is in skip list
+            #      => Append skip lines to file
+            #  - Size is different from original
+            #    - File is NOT in skip list
+            #      => Delete file and copy over original file
+            #    - File is in skip list
+            #      => No action needed
+            #
+            # Target file does not exist:
+            #  => Copy over file and add skip line as necessary
+
+            # Copy foo.xpp => foo.cpp if necessary
+            if "force_copy" in config and int(config["force_copy"]) == 1:
+                # Force the copy by deleting the file
+                os.remove(dstfile)
+            if os.path.isfile(dstfile):
+                src_size = os.path.getsize(srcfile)
+                dst_size = os.path.getsize(dstfile)
+                if src_size != dst_size:
+                    if os.path.splitext(srcfile)[0] in skip_list:
+                        # File is already marked as expected fail, so no further action needed
+                        continue
+                    else:
+                        # Delete the file
+                        os.remove(dstfile)
+                        # Copy the original file over
+                        copyFile(srcfile, dstfile)
+            else:
+                # Target file does not exist, so copy over the original
+                copyFile(srcfile, dstfile)
+
+            # At this point we have the original file copied over, detect whether we need
+            # to mark it as an expected failure
+            if os.path.splitext(srcfile)[0] in skip_list:
+                # If a file is in the skip list, mark it as expected failure
+                with open(dstfile, "a") as skipfile:
+                    skipfile.write("// XFAIL: *\n")
+    
+    return
+
+def determinePlatform():
+    tspec = lit_config.params["test_params"]
+
+    platform = tspec["Platform"]
+    config.environment['SN_PLATFORM'] = platform
+    
+    platform_defs = {}
+
+    platform_defs['common'] = os.path.join('%s' % os.path.dirname(os.path.realpath(__file__)), "common")
+    platform_defs['platform'] = platform
+    platform_defs['c_compiler'] = tspec["c_compiler"]
+    platform_defs['cxx_compiler'] = tspec["cxx_compiler"]
+    platform_defs['runtool'] = tspec["runtool"]
+    platform_defs['bindump'] = tspec["bindump"]
+    platform_defs['cxx_rtti'] = tspec["cxx_rtti"]
+    platform_defs['cxx_exceptions'] = tspec["cxx_exceptions"]
+    if 'linker' in tspec:
+      platform_defs['linker'] = tspec["linker"]
+    else:
+      platform_defs['linker'] = tspec["c_compiler"]
+    if 'checker' in tspec:
+      platform_defs['checker'] = tspec["checker"]
+    else:
+      platform_defs['checker'] = "grep"
+    platform_defs['prefixes'] = '--check-prefix=CHECK ' + tspec["prefixes"]
+    platform_defs['cxx_11'] = tspec["cxx_cpp11"]
+
+    hfp = open("selector.h", "w")
+
+    if 'compiler_flags' in tspec:
+        platform_defs['c_compiler'] = platform_defs['c_compiler'] + ' ' + tspec['compiler_flags']
+        platform_defs['cxx_compiler'] = platform_defs['cxx_compiler'] + ' ' + tspec['compiler_flags']
+    if 'linker_flags' in tspec:
+        platform_defs['linker'] = platform_defs['linker'] + ' ' + tspec['linker_flags']
+
+ # possible values are LP64-x86 ILP32-x86
+
+    im = tspec["Mode"]
+    if (im == "LP64-x86") :
+      # 64 bit x86 clang3.4 mode.
+      hfp.write("#define ABISELECT(a,b) a // LP64 x86\n")
+    elif (im == "ILP32-x86"):
+      # 32 bit x86, Dual align
+      hfp.write("#define ABISELECT(a,b) b // LP64 x86\n")
+    #  #sys.exit(1)
+    else:
+      print "ERROR: Invalid combination of config options. tspec= " , tspec
+      sys.exit(1)
+    hfp.close()
+
+    return platform_defs
+
+# Determine which toolset to use
+tools = determinePlatform()
+generateTests()
+if not lit_config.quiet:
+    lit_config.note('using toolset:')
+    for key, value in tools.items():
+        lit_config.note('\t%s => %s' % (key, value))
+for key, value in tools.items():
+    config.substitutions.append( (key, value) )

Propchange: test-suite/trunk/ABI-Testsuite/test/lit.site.cfg
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/anonymousnonpod.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/anonymousnonpod.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/anonymousnonpod.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/anonymousnonpod.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,18 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// CHECK: _ZN3FooUt_3barEv
+
+struct Foo {
+    struct {
+        int x;
+        void bar() {}
+    } name;
+};
+
+int main() {
+    Foo f;
+    f.name.bar();
+}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/anonymousnonpod.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/arrays.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/arrays.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/arrays.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/arrays.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,40 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// arrays
+// CHECK-DAG: _Z3bazRA6_i
+void baz(int (&) [6]) {}
+
+// CHECK-DAG: _Z4barcILi6EEvRAT__i
+template <int n> void barc(int (&) [n]);
+template <> void barc<6>(int (&) [6]) {}
+
+// CHECK-DAG: _Z3razRA6_A3_i
+void raz(int (&) [6] [3]) {}
+
+// CHECK-DAG: _Z3razRA3_iRA3_S_
+void raz(int (&) [3], int (&) [3] [3]) {}
+
+// CHECK-DAG: _Z3fooIfEvRAplstT_Li1E_i
+template <typename T> void foo(int (&) [((sizeof (T))+1)]);
+template <> void foo<float>(int (&) [((sizeof (float))+1)]) {}
+
+// CHECK-DAG: _Z3fooIA5_iEvv
+template <typename T> void foo();
+template <> void foo<int [5]>() {}
+
+// CHECK-DAG: _Z3fooIA5_iEvPT_
+template <typename T> void foo(T*);
+template <> void foo<int [5]>(int (*) [5]) {}
+
+// CHECK-DAG: _Z3fooIA5_iEvT_PS1_
+template <typename T> void foo(T, T*);
+template <> void foo<int [5]>(int [5], int (*) [5]) {}
+
+// CHECK-DAG: _Z3fooIA5_iEPT_v
+template <typename T> T* foo();
+template <> int (* foo<int [5]>()) [5] { return 0;}
+
+

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/arrays.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/c++11.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/c%2B%2B11.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/c++11.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/c++11.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,144 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+#include <cstddef>
+// CHECK-DAG: _Z3f24Dn
+void f24(std::nullptr_t) {}
+
+// decltype
+// CHECK-DAG: _Z3f25ILi3EEvDtT_E
+template <int I> void f25(decltype(I));
+template<> void f25<3>(int) {}
+
+// CHECK-DAG: _Z1FIiEDTcl1gfp_EET_
+void g(int);
+template <class T> auto F(T p)->decltype(g(p));
+// return type in the mangling of the template signature is encoded as DTcl1gfp_E
+template <> auto F(int p)->decltype(g(p)) {}
+
+// CHECK-DAG: _Z1fN1SUt_E
+struct S { static struct {} x; };
+typedef decltype(S::x) TX;
+void f(TX) {}
+
+// CHECK-DAG: _ZN1S1xE
+TX S::x;
+
+// Function parameter references
+// CHECK-DAG: _Z1fIiEvT_DtfL0p_E
+template <class T> void f(T p, decltype(p));
+template <> void f(int p, decltype(p)) {}
+
+// CHECK-DAG: _Z1gIiEvT_PFDtfL0p_EvE
+template <class T> void g(T p, decltype(p) (*)());
+template <> void g(int p, decltype(p) (*)()) {}
+
+// CHECK-DAG: _Z1hIiEvT_PFDtfL0p_EvE
+template <class T> void h(T p, auto (*)()->decltype(p));
+template <> void h(int p, auto (*)()->decltype(p)) {}
+
+// CHECK-DAG: _Z1iIiEvT_PFDtfp_ES0_E
+template <class T> void i(T p, auto (*)(T q)->decltype(q));
+template <> void i(int p, auto (*)(int q)->decltype(q)) {}
+
+// CHECK-DAG: _Z1jIiEvT_PFS0_DtfL1p_EE
+template <class T> void j(T p, auto (*)(decltype(p))->T);
+template <> void j(int p, auto (*)(decltype(p))->int) {}
+
+// CHECK-DAG: _Z1kIiEvT_PFPAszfL0p__iS0_E
+template <class T> void k(T p, int (*(*)(T p))[sizeof(p)]);
+template <> void k(int p, int (*(*)(int p))[sizeof(p)]) {}
+
+// CHECK-DAG: _Z1lIiEvT_PDtfL0pK_E
+template<typename T> void l(T const p, decltype(p)*);
+template <> void l(int p, int const *) {}
+
+// Multiple function parameter references
+// CHECK-DAG: _Z1mIiEvT_DtfL0p_ES0_DtfL0p1_E
+template <class T> void m(T p, decltype(p), T q, decltype(q));
+template <> void m(int p, decltype(p), int q, decltype(q)) {}
+
+// CHECK-DAG: _Z1nIiEvT_PFDtfp0_ES0_S0_E
+template <class T> void n(T p, auto (*)(T q, T r)->decltype(r));
+template <> void n(int p, auto (*)(int q, int r)->decltype(r)) {}
+
+// CHECK-DAG: _Z1oIiEvfT_PFDtfp0_EcS0_EPFDtfL0p0_ES0_E
+template <class T> void o(float f, T p, auto (*)(char c, T q)->decltype(q), auto (*)(T q)->decltype(p));
+template <> void o(float f, int p, auto (*)(char c, int q)->decltype(q), auto (*)(int q)->decltype(p)) {}
+
+
+// CHECK-DAG: _Z3fffIP2S2EDtptfp_1xET_
+struct S2 { long double x; };
+template<class T> auto fff(T p)->decltype(p->x);
+template <> auto fff(S2 *p)->decltype(p->x) { return 0; }
+
+// CHECK-DAG: _Z3gggIN1N1XEEDtsrNT_1XE1yES2_
+namespace N {
+    struct X {
+        long y;
+    };
+}
+template<class T> auto ggg(T p)->decltype(T::X::y);
+template<> auto ggg(N::X p)->decltype(N::X::y) { return 0; }
+
+// CHECK-DAG: _ZN1A1fIPNS_1DEEEDtptfp_gssr1A1BE1xET_
+namespace A {
+    struct B { int x; };
+    struct D : public B {};
+    template<class T> auto f(T p)->decltype(p->::A::B::x);
+    template <> auto f<D*>(D* p)->decltype(p->::A::B::x) { return 0; }
+}
+
+// CHECK-DAG: _Z3hhhI1QEDTpldtfp_1xdtL_Z1qE1xET_
+struct Q {int x; } q;
+template<class T> auto hhh(T p)->decltype(p.x + q.x);
+template <> auto hhh(Q p)->decltype(p.x + q.x) { return 0; }
+
+// CHECK-DAG: _Z3jjjIiEDTplfp_dtL_Z1dEsr1B1XIT_EE1xES0_
+template<class T> struct X { static T x; };
+struct B: X<int> {};
+struct D: B {} d;
+template<class T> auto jjj(T p)->decltype(p+d.B::X<T>::x);
+template<> auto jjj(int p)->decltype(p+d.B::X<int>::x) { return 0; }
+
+// new auto
+// CHECK-DAG: _Z2kkIN1N1XEEvDTnw_DapicvT__EEE
+template <typename T> void kk(decltype(new auto(T())) p) {}
+template <> void kk<N::X>(N::X*) {}
+
+// CHECK-DAG: _Z4foouDs
+void foou(char16_t) {}
+
+// CHECK-DAG: _Z4foouDi
+void foou(char32_t) {}
+
+namespace C {
+    struct XX {
+        struct Y {
+        };
+    };
+    struct Z {
+        XX x;
+    };
+    // CHECK-DAG: _ZN1C1fIPNS_1ZEEENDtptfp_1xE1YET_
+    template<class T> auto f(T p)->typename decltype(p->x)::Y;
+    template <> auto f<Z*>(Z* p)->decltype(p->x)::Y {}
+    // CHECK-DAG: _ZN1C1fIPNS_1ZEEEvT_NDtptfL0p_1xE1YE
+    template<class T> void f(T p, typename decltype(p->x)::Y);
+    template <> void f<Z*>(Z* p, decltype(p->x)::Y) {}
+};
+
+// CHECK-DAG: _Zli8_literaly
+unsigned long long operator"" _literal(unsigned long long i) { return i; }
+
+// compiles on clang but not on g++
+// is an example in the ABI document.
+// ref-qualifier from n2439
+// CHECK-DAG: _Z1fM2A2KFvvRE
+struct A2 {};
+void f(void (A2::*)() const &) {}
+
+// CHECK-DAG: _Z1fM2A2KFvvOE
+void f(void (A2::*)() const &&) {}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/c++11.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/c++11s.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/c%2B%2B11s.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/c++11s.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/c++11s.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,34 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+
+// References to declared entities
+// CHECK-DAG: _Z3fooc
+void foo(char) {}
+template <void (&)(char)> struct CB {};
+// CHECK-DAG: _Z3bar2CBILZ3foocEE
+void bar(CB<foo> cb) {}
+
+// CHECK-DAG: _Z4test3CB2ILZ7IsEmptyEE
+extern "C" bool IsEmpty(char *);
+template<bool (&)(char *)> struct CB2 {};
+void test(CB2<IsEmpty> cb) {}
+
+// CHECK-DAG: _Z3hhhI1QEDTpldtfp_1xdtL_Z1qE1xET_
+struct Q {int x; } q;
+template<class T> auto hhh(T p)->decltype(p.x + q.x);
+template <> auto hhh(Q p)->decltype(p.x + q.x) { return 0; }
+
+// CHECK-DAG: _Z3iiiI2Q1EDTpldtfp_1xL_ZN1Q1xEEET_
+struct Q1 {int x; } q1;
+template<class T> auto iii(T p)->decltype(p.x + Q::x);
+template<> auto iii(Q1 p)->decltype(p.x + Q::x) { return 0; }
+
+// CHECK-DAG: _Z3kkkI2S4EDTadsrT_miES1_
+struct S4 {
+    S4 operator-(S4 rhs) { return rhs; }
+};
+template<class T> auto kkk(T p)->decltype(&T::operator-);
+template<> auto kkk(S4 p)->decltype(&S4::operator-) { return 0; }

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/c++11s.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/constructors.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/constructors.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/constructors.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/constructors.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,39 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// CHECK-DAG: _ZN3fooC1Ev
+// CHECK-DAG: _ZN3fooC2Ev
+// CHECK-DAG: _ZN3fooD0Ev
+// CHECK-DAG: _ZN3fooD1Ev
+// CHECK-DAG: _ZN3fooD2Ev
+struct foo {
+    foo();
+    virtual ~foo();
+};
+
+foo::foo(){}
+foo::~foo(){}
+
+// CHECK-DAG: _ZN4baseC1Ev
+// CHECK-DAG: _ZN4baseC2Ev
+// CHECK-DAG: _ZN4baseD0Ev
+// CHECK-DAG: _ZN4baseD1Ev
+// CHECK-DAG: _ZN4baseD2Ev
+struct base {
+    base() ;
+    virtual ~base() ;
+};
+
+base::base(){}
+base::~base(){}
+
+struct derived : base {};
+
+int main() {
+    foo f = foo();
+    base b = base();
+    derived d = derived();
+    return 0;
+}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/constructors.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/expressions.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/expressions.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/expressions.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/expressions.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,246 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 cxx_rtti cxx_exceptions -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+#include <typeinfo>
+
+template<class T, int N> struct S1 {};
+template<class T, T N> struct S2 {};
+
+// LP64-DAG: _Z1fIiEv2S1IT_Li16EE
+// ILP32-DAG: _Z1fIiEv2S1IT_Li12EE
+template<class T> void f(S1<T, sizeof(long double)>);
+ // The sizeof(...) is not instantiation-dependent, and converted to int:
+ // the result is encoded as "Li16E" for 16-byte long double types.
+template <> void f<int>(S1<int, sizeof(long double)>) {}
+
+// LP64-DAG: _Z1fIiEv2S2IT_XLm16EEE
+// ILP32-DAG: _Z1fIiEv2S2IT_XLj12EEE
+template<class T> void f(S2<T, sizeof(long double)>);
+ // The sizeof(...) is not instantiaion-dependent, and converted to an
+ // unknown type: the result is encoded as "Lm16E" for 16-byte long double
+ // types and std::size_t a synonom for "unsigned long".
+template <> void f<int>(S2<int, sizeof(long double)>) {}
+
+// CHECK-DAG: _Z1fIiEv2S2IT_XstPS1_EE
+template<class T> void f(S2<T, sizeof(T*)>);
+ // The sizeof(...) is instantiation-dependent (even though its value may
+ // be known if all pointers have the same size): It is encoded as "stPT_".
+template <> void f<int>(S2<int, sizeof(int*)>) {}
+
+// unary operator
+// CHECK-DAG: _Z2fhIiEvT_DTcofL0p_E
+template <typename T> void fh(T a, decltype(~a) p);
+template <> void fh<int>(int a, decltype(~a) p) {}
+
+// binary operator
+// CHECK-DAG: _Z2fgIiEvT_DTrmfL0p_Li4EE
+template <typename T> void fg(T a, decltype(a % 4) p);
+template <> void fg<int>(int a, decltype(a % 4) p) {}
+
+// ternary operator
+// CHECK-DAG: _Z2ffIiEvT_DTqufL0p_LA4_KcELA3_S1_EE
+template <typename T> void ff(T a, decltype(a ? "yes" : "no") p);
+template <> void ff<int>(int a, decltype(a ? "yes" : "no") p) {}
+
+// call
+// CHECK-DAG: _Z3fooIiEDTcl3barfp_LA4_KcEEET_
+auto bar(int x, const char *s)->decltype(s) { return s;}
+template<class T>  auto foo(T x) ->  decltype(bar(x, "abc"));
+template <> auto foo<int>(int x) -> decltype(bar(x, "abc")) { return 0; }
+
+// conversion with one argument
+// CHECK-DAG: _Z2ggIlLi3EEvPAcvT_T0__i
+template<class T, int N> void gg(int (*)[T(N)]) {}
+template <> void gg<long, 3>(int (*)[3l]) {} 
+
+// conversion with a different number of arguments
+// CHECK-DAG: _Z1hIiEvDTcmcvT__Ecvi_EE
+template <class T> void h(decltype(T(), int())) {}
+template <> void h<int>(int) {}
+
+// another conversion
+// CHECK-DAG: _Z2jjI1XEvDTcvT_Li1EE
+struct X {
+    X();
+    X(int);
+    int member;
+};
+template <typename T> void jj(decltype(T(1)) p) {}
+template <> void jj<X>(X) {}
+
+// new expression without initializer
+// CHECK-DAG: _Z2iiIiEvDTnw_T_EE
+template <typename T> void ii(decltype(new T) p) {}
+template <> void ii<int>(int*) {}
+
+// new expression with initializer
+// CHECK-DAG: _Z1jI1XEvDTnw_T_piLi1EEE
+template <typename T> void j(decltype(new T(1)) p) {}
+template <> void j<X>(X*) {}
+
+// CHECK-DAG: _Z1kI1XEvDTnw_T_ilLi1EEE
+template <typename T> void k(decltype(new T{1}) p) {}
+template <> void k<X>(X*) {}
+
+// array new expression without initializer
+// CHECK-DAG: _Z5iiiiiIiEvDTna_T_EE
+template <typename T> void iiiii(decltype(new T[5]) p) {}
+template <> void iiiii<int>(int*) {}
+
+// CHECK-DAG: _Z1lI1XEvDTna_T_EE
+template <typename T> void l(decltype(new T[6]) p);
+template <> void l<X>(X*) {}
+
+// array new expression with initializer
+// CHECK-DAG: _Z2llI1XEvDTna_T_piEE
+template <typename T> void ll(decltype(new T[7]()) p);
+template <> void ll<X>(X*) {}
+
+// CHECK-DAG: _Z1mI1XEvDTna_T_ilLi1ELi1EEE
+template <typename T> void m(decltype(new T[6]{1, 1}) p) {}
+template <> void m<X>(X*) {}
+
+// delete
+// CHECK-DAG: _Z1nIiEvPT_PDTdlfL0p_E
+template <typename T> void n(T* p, decltype(delete p)* p1) {}
+template <> void n<int>(int* p, void* p1) {}
+
+// array delete
+// CHECK-DAG: _Z1oIiEvPT_PDTdafL0p_E
+template <typename T> void o(T* p, decltype(delete[] p)* p1) {}
+template <> void o<int>(int* p, void* p1) {}
+
+// typeid(type)
+// CHECK-DAG: _Z1pIiEvDTtiT_E
+template <typename T> void p(decltype(typeid(T)));
+template <> void p<int>(decltype(typeid(int))) {}
+
+// typeid(expression)
+// CHECK-DAG: _Z1qIiEvDTtestT_E
+template <typename T> void q(decltype(typeid(sizeof(T))));
+template <> void q<int>(decltype(typeid(sizeof(int)))) {}
+
+// dynamic cast
+// CHECK-DAG: _Z2dyI1BEvDTcvPT_nw_1ApiEE
+class A { 
+    virtual void foo();
+    virtual ~A();
+};
+class B : public A {
+    virtual ~B();
+};
+template<class T> void dy(decltype(dynamic_cast<T*>(new A())));
+template <> void dy<B>(decltype(dynamic_cast<B*>(new A()))) {} 
+
+// static cast
+// CHECK-DAG: _Z2stIlLi3EEvPAcvT_T0__i
+template<class T, int N> void st(int (*)[static_cast<T>(N)]) {}
+template <> void st<long, 3>(int (*)[3l]) {} 
+
+// const cast
+// CHECK-DAG: _Z10intfactoryv
+// CHECK-DAG: _Z2coIRiEvDTcvT_clL_Z10intfactoryvEEE
+const int& cref_i = 5;
+const int& intfactory() { return cref_i; }
+template<class T> void co(decltype(const_cast<T>(intfactory())));
+template <> void co<int&>(decltype(const_cast<int&>(intfactory()))) {} 
+
+// reinterpret cast
+// CHECK-DAG: _Z2reIjLi3EEvDTcvPT_T0_E
+template<class T, int N> void re(decltype(reinterpret_cast<T*>(N)));
+template <> void re<unsigned , 3>(decltype(reinterpret_cast<unsigned*>(3))) {} 
+
+// sizeof type
+// sizeof expression
+// CHECK-DAG: _Z1fIiEv2S2IT_XplszstS1_Li1EEE
+template<class T> void f(S2<T, sizeof(sizeof(T)) + 1>);
+template <> void f<int>(S2<int, sizeof(sizeof(int)) + 1>) {}
+
+// alignof type
+// alignof expression
+// CHECK-DAG: _Z1fIiEv2S2IT_XplazatS1_Li2EEE
+template<class T> void f(S2<T, alignof(alignof(T)) + 2>);
+template <> void f<int>(S2<int, alignof(alignof(int)) + 2>) {}
+
+// noexcept expression
+// CHECK-DAG: _Z1fIiEvDTnxcvT__EE
+template<class T> void f(decltype(noexcept(T())));
+template <> void f<int>(decltype(noexcept(int()))) {}
+
+// dot
+// CHECK-DAG: _Z3dotI2S3EvT_DtdtfL0p_1aE
+struct S3 {
+    int a;
+};
+template <class T> void dot(T p, decltype(p.a));
+template <> void dot<S3>(S3, int) {}
+
+// arrow
+// CHECK-DAG: _Z5arrowI2S3EvPT_DtptfL0p_1aE
+template <class T> void arrow(T* p, decltype(p->a));
+template <> void arrow<S3>(S3*, int) {}
+
+// dotstar
+// CHECK-DAG: _Z1aI2X1MS0_iEvT_T0_DTdsfL0p_fL0p0_E
+template <class T, class U> void a(T x, U y, decltype(x.*y) );
+struct X1 {
+    int *m;
+};
+typedef int X1::*ptm;
+template <> void a<X1, ptm>(X1 x, ptm y, decltype(x.*y)) {}
+
+// size of a parameter pack
+// CHECK-DAG: _Z4soppIJEEv2S5IXsZT_EJDpRT_EE
+template<unsigned I, class... Types> struct S5 { };
+template<typename ...Types>
+void sopp(S5<sizeof...(Types), Types&...>) { }
+template <> void sopp(S5<0>) {}
+
+// CHECK-DAG: _Z4soppIJidEEv2S5IXsZT_EJDpRT_EE
+template <> void sopp<int, double>(S5<2, int&, double&>) {}
+
+// size of a function parameter pack
+// CHECK-DAG: _Z5sofppIJEEvDTsZT_EDpT_
+template<class... Types> void sofpp(decltype(sizeof...(Types)) count, Types...) {}
+template <> void sofpp<>(std::size_t count) {}
+// CHECK-DAG: _Z5sofppIJcifEEvDTsZT_EDpT_
+template <> void sofpp<char, int, float>(std::size_t count, char c, int i, float f) {}
+
+// pack expansion 
+// CHECK-DAG: _Z2peIJLi1ELi2ELi3EEEP9int_tupleIJXspT_EEEv
+template<int ...Values> struct int_tuple { };
+template<int ...Values> int_tuple<Values...>* pe() {}
+template <> int_tuple<1, 2, 3>* pe() { return new int_tuple<1, 2, 3>; }
+
+// throw expression
+// CHECK-DAG: _Z1tIiEvPT_PDTtwfL0p_E
+template <typename T> void t(T* p, decltype(throw p)* p1) {}
+template <> void t<int>(int* p, void* p1) {}
+
+// throw with no operand (rethrow)
+// CHECK-DAG: _Z2rtIiEvPT_PDTqufL0p_twfL0p_trE
+template <typename T> void rt(T* p, decltype(p ? throw p : throw)* p1) {}
+template <> void rt<int>(int* p, void* p1) {}
+
+// unresolved operator-function-id
+// The operator can be encoded using the "on" operator function-id mangling e.g. "DTclonplfp_fp_EE".
+// CHECK-DAG: _Z1gI2S4EDTclplfp_fp_EET_
+struct S4 {
+    S4(int a) {}
+};
+S4 operator+(S4 lhs, S4 rhs) { return rhs; }
+template <class T> auto g(T p1) -> decltype(operator+(p1,p1));
+template <> auto g<S4>(S4 p1) -> decltype(operator+(p1,p1)) { return 0; }
+
+// this expression
+// CHECK-DAG: _ZN1O1gIiEEDTcldtptfpT1m1fIT_EEEv
+struct M {
+    template <class T> T f();
+};
+struct O {
+    M m;
+    template <class T> auto g() -> decltype (this->m.f<T>());
+};
+template <> int O::g<int>() { return 0; }

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/expressions.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/lambdas.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/lambdas.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/lambdas.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/lambdas.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,52 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// Test default arguments apperaing in class definitions
+// CHECK-DAG: _ZZN1S1fEiiEd0_NKUlvE0_clEv
+// CHECK-DAG: _ZZN1S1fEiiEd0_NKUlvE_clEv
+// CHECK-DAG: _ZZN1S1fEiiEd_NKUlvE_clEv
+struct S {
+   void f(int a = [] {return 1;}() + [] {return 2;}(), int b = []{return 3;}());
+};
+void foo() {
+   S s;
+   s.f();
+}
+
+// inclass initializers of class members
+// CHECK-DAG: _ZNK2S21yMUlvE_clEv
+struct S2 {
+    int y = []{ return 5;}();
+};
+void foo2() {
+    S2 s3;
+}
+
+// the bodies of inline functions
+// CHECK-DAG: _ZZ4foo3vENKUlvE_clEv
+inline int foo3() {
+    int t = []{ return 7;}();
+    return t;
+}
+void bar() {
+    foo3();
+}
+
+// the bodies of non-exported nonspecialized template functions
+// CHECK-DAG:   _ZZ4foo4IfEvvENKUlvE_clEv
+template <typename C> void foo4() {
+    int u = [] { return 8;}();
+}
+void call_foo4() {
+    foo4<float>();
+}
+
+// initializers of nonspecialized static members of template classes
+// CHECK-DAG: _ZNK2S1IiE1xMUlvE_clEv
+template<typename T> struct S1 {
+   static int x;
+};
+template<typename T> int S1<T>::x = []{ return 1;}();
+template int S1<int>::x;

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/lambdas.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/literals.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/literals.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/literals.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/literals.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,56 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// Literals in expressions.
+// CHECK-DAG: _Z1fIiEvRAszplcvT__EngLi42E_c
+// NB no negative integer literals
+template <class T> void f(char (&buffer)[sizeof(T() + -42)]) {}
+void call_f() {
+  char buffer[sizeof(int)];
+  f<int>(buffer);
+}
+
+// float
+// CHECK-DAG: _Z1gIfEvRAszplcvT__ELf40a00000E_c
+template <class T> void g(char (&buffer)[sizeof(T() + 5.0f)]) {}
+void call_g() {
+  char buffer[sizeof(float)];
+  g<float>(buffer);
+}
+
+// negative float (uses unary negation)
+// CHECK-DAG: _Z2g2IfEvRAszplcvT__EngLf3f800000E_c
+template <class T> void g2(char (&buffer)[sizeof(T() + -1.0f)]) {}
+void call_g2() {
+  char buffer[sizeof(float)];
+  g2<float>(buffer);
+}
+
+// CHECK-DAG: _Z2g3IdEvRAszplcvT__ELd4014000000000000E_c
+template <class T> void g3(char (&buffer)[sizeof(T() + 5.0)]) {}
+void call_g3() {
+  char buffer[sizeof(double)];
+  g3<double>(buffer);
+}
+
+
+// Generate raw pointer literal expression nullptr (rather than template argument that happens to be a null pointer).
+// CHECK-DAG: _Z1hIiEvRAszcvPT_LDnE_c
+template <class T> void h(char (&buffer)[sizeof((T*)nullptr)]) {}
+void call_h() {
+  char buffer[sizeof((int*)nullptr)];
+  h<int>(buffer);
+}
+
+// string literals
+// CHECK-DAG: _Z3fooIiEDTcl3barfp_LA4_KwEEET_
+int bar(int x, const wchar_t *);
+template<class T>  auto foo(T x) ->  decltype(bar(x, L"abc"));
+template <> auto foo<int>(int x) -> decltype(bar(x, L"abc")) { return 0; }
+
+// CHECK-DAG: _Z4foo1IfEDTcl4bar1fp_LA5_KcEEET_
+float bar1(float x, const char *);
+template<class T>  auto foo1(T x) ->  decltype(bar1(x, "abcd"));
+template <> auto foo1<float>(float x) -> decltype(bar1(x, "abcd")) { return 0; }

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/literals.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/literals1.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/literals1.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/literals1.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/literals1.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,45 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+
+
+// long double (difference in format)
+// CHECK-DAG: _Z2g4IeEvRAszplcvT__ELe4001a000000000000000E_c
+template <class T> void g4(char (&buffer)[sizeof(T() + 5.0L)]) {}
+void call_g4() {
+  char buffer[sizeof(long double)];
+  g4<long double>(buffer);
+}
+
+
+// Literals in templates
+#include <cstddef>
+template <typename T, T I> T returnit() {return I;};
+enum colour { RED = -3, GREEN, BLUE};
+// use long type for enumeration
+enum bigcolour { YELLOW = (1l << 32), CYAN, MAGENTA};
+void callreturnit() {
+    // CHECK-DAG: _Z8returnitIiLi4EET_v
+    auto a = returnit<int, 4>();
+    // CHECK-DAG: _Z8returnitIjLj4EET_v
+    auto b = returnit<unsigned int, 4>();
+    // CHECK-DAG: _Z8returnitIlLl4EET_v
+    auto c = returnit<long, 4>();
+    // CHECK-DAG: _Z8returnitImLm4EET_v
+    auto d = returnit<unsigned long, 4>();
+    // CHECK-DAG: _Z8returnitIxLxn456789EET_v
+    auto e = returnit<long long, -456789>();
+    // CHECK-DAG: _Z8returnitIbLb1EET_v
+    auto f = returnit<bool, true>();
+    // CHECK-DAG: _Z8returnitIbLb0EET_v
+    auto g = returnit<bool, false>();
+    // CHECK-DAG: _Z8returnitIDnLDn0EET_v
+    auto n = returnit<std::nullptr_t, nullptr>();
+    // CHECK-DAG: _Z8returnitI6colourLS0_n2EET_v
+    auto cg = returnit<colour, GREEN>();
+    // LP64-DAG: _Z8returnitI9bigcolourLS0_4294967296EET_v
+    // ILP32-DAG: _Z8returnitI9bigcolourLS0_n2147483648EET_v
+    auto cy = returnit<bigcolour, YELLOW>();
+}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/literals1.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/operators.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/operators.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/operators.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/operators.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,118 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// CHECK-DAG: _ZdlPv
+void operator delete(void *) {}
+
+// CHECK-DAG: _ZdaPv
+void operator delete[](void *) {}
+
+// General structures for operands.
+struct operand {};
+struct operations {
+    void operator= (operand);
+    void operator->* (operand);
+    void operator-> ();
+    void operator() (operand);
+    void operator[] (operand);
+};
+// CHECK-DAG: _Zps7operand
+void operator+ (operand) {}
+// CHECK-DAG: _Zng7operand
+void operator- (operand) {}
+// CHECK-DAG: _Zad7operand
+void operator& (operand) {}
+// CHECK-DAG: _Zde7operand
+void operator* (operand) {}
+// CHECK-DAG: _Zco7operand
+void operator~ (operand) {}
+// CHECK-DAG: _Zpl7operandS_
+void operator+ (operand, operand) {}
+// CHECK-DAG: _Zmi7operandS_
+void operator- (operand, operand) {}
+// CHECK-DAG: _Zml7operandS_
+void operator* (operand, operand) {}
+// CHECK-DAG: _Zdv7operandS_
+void operator/ (operand, operand) {}
+// CHECK-DAG: _Zrm7operandS_
+void operator% (operand, operand) {}
+// CHECK-DAG: _Zan7operandS_
+void operator& (operand, operand) {}
+// CHECK-DAG: _Zor7operandS_
+void operator| (operand, operand) {}
+// CHECK-DAG: _Zeo7operandS_
+void operator^ (operand, operand) {}
+// CHECK-DAG: _ZN10operationsaSE7operand
+void operations::operator= (operand) {}
+// CHECK-DAG: _ZpL7operandS_
+void operator+= (operand, operand) {}
+// CHECK-DAG: _ZmI7operandS_
+void operator-= (operand, operand) {}
+// CHECK-DAG: _ZmL7operandS_
+void operator*= (operand, operand) {}
+// CHECK-DAG: _ZdV7operandS_
+void operator/= (operand, operand) {}
+// CHECK-DAG: _ZrM7operandS_
+void operator%= (operand, operand) {}
+// CHECK-DAG: _ZaN7operandS_
+void operator&= (operand, operand) {}
+// CHECK-DAG: _ZoR7operandS_
+void operator|= (operand, operand) {}
+// CHECK-DAG: _ZeO7operandS_
+void operator^= (operand, operand) {}
+// CHECK-DAG: _Zls7operandS_
+void operator<< (operand, operand) {}
+// CHECK-DAG: _Zrs7operandS_
+void operator>> (operand, operand) {}
+// CHECK-DAG: _ZlS7operandS_
+void operator<<= (operand, operand) {}
+// CHECK-DAG: _ZrS7operandS_
+void operator>>= (operand, operand) {}
+// CHECK-DAG: _Zeq7operandS_
+void operator== (operand, operand) {}
+// CHECK-DAG: _Zne7operandS_
+void operator!= (operand, operand) {}
+// CHECK-DAG: _Zlt7operandS_
+void operator< (operand, operand) {}
+// CHECK-DAG: _Zgt7operandS_
+void operator> (operand, operand) {}
+// CHECK-DAG: _Zle7operandS_
+void operator<= (operand, operand) {}
+// CHECK-DAG: _Zge7operandS_
+void operator>= (operand, operand) {}
+// CHECK-DAG: _Znt7operand
+void operator! (operand) {}
+// CHECK-DAG: _Zaa7operandS_
+void operator&& (operand, operand) {}
+// CHECK-DAG: _Zoo7operandS_
+void operator|| (operand, operand) {}
+// CHECK-DAG: _Zpp7operand
+void operator++ (operand) {}
+// CHECK-DAG: _Zmm7operand
+void operator-- (operand) {}
+// CHECK-DAG: _Zcm7operandS_
+void operator, (operand, operand) {}
+// CHECK-DAG: _ZN10operationspmE7operand
+void operations::operator->* (operand) {}
+// CHECK-DAG: _ZN10operationsptE
+void operations::operator-> () {}
+// CHECK-DAG: _ZN10operationsclE7operand
+void operations::operator() (operand) {}
+// CHECK-DAG: _ZN10operationsixE7operand
+void operations::operator[] (operand) {}
+
+struct Type {};
+struct castable {
+    operator float();
+    operator char const *();
+    operator Type();
+};
+// CHECK-DAG: _ZN8castablecvfEv
+castable::operator float() { return 1.0f; }
+// CHECK-DAG: _ZN8castablecvPKcEv
+castable::operator char const*() { return "this"; }
+// CHECK-DAG: _ZN8castablecv4TypeEv
+castable::operator Type() { return Type(); }
+

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/operators.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/other.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/other.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/other.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/other.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,91 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// Test for types as parameters
+// CHECK-DAG: _Z2f1w
+void f1(wchar_t) {}
+
+// CHECK-DAG: _Z2f2b
+void f2(bool) {}
+
+// CHECK-DAG: _Z2f3c
+void f3(char) {}
+
+// CHECK-DAG: _Z2f4a
+void f4(signed char) {}
+
+// CHECK-DAG: _Z2f5h
+void f5(unsigned char) {}
+
+// CHECK-DAG: _Z2f6s
+void f6(short) {}
+
+// CHECK-DAG: _Z2f7t
+void f7(unsigned short) {}
+
+// CHECK-DAG: _Z2f8i
+void f8(int) {}
+
+// CHECK-DAG: _Z2f9j
+void f9(unsigned int) {}
+
+// CHECK-DAG: _Z3f10l
+void f10(long) {}
+
+// CHECK-DAG: _Z3f11m
+void f11(unsigned long) {}
+
+// CHECK-DAG: _Z3f12x
+void f12(long long) {}
+
+// CHECK-DAG: _Z3f13y
+void f13(unsigned long long) {}
+
+// CHECK-DAG: _Z3f16f
+void f16(float) {}
+
+// CHECK-DAG: _Z3f17d
+void f17(double) {}
+
+// CHECK-DAG: _Z3f18e
+void f18(long double) {}
+
+// CHICK: _Z3f19g
+//void f19(__float128) {}
+
+// CHECK-DAG: _Z3f20z
+void f20(...) {}
+
+// decimal floating point types unsupported
+
+
+// CHECK-DAG: _Z3fooILi2EEvRAplT_Li1E_i
+template<int I> void foo (int (&)[I + 1]) { }
+template <> void foo<2> (int (&)[3]) {}
+
+// Template parameters
+// CHECK-DAG: _Z1fIiEvT_
+template<class T> void f(T) {}
+template <> void f(int) {};
+
+// "template parameter reference is a substitution candidate, distinct from the type (or other subsstitutible entity) that is the actual parameter."
+// CHECK-DAG: _Z3fooI3barET_S1_S0_S1_S0_
+class bar {};
+template <typename T> T foo(T, bar, T, bar);
+template <> bar foo<bar>(bar, bar, bar, bar) { bar b; return b; }
+
+// compression
+// CHECK-DAG: _Z1fPFvvEM1SFvvE
+typedef void T();
+struct S {};
+void f(T*, T (S::*)) {}
+
+// CHECK-DAG: _ZN1N1TIiiE2mfENS0_IddEE
+namespace N {
+    template <typename A, typename B> struct T {
+        void mf(N::T<double, double>);
+    };
+};
+template <> void N::T<int, int>::mf(N::T<double, double>) {}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/other.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/pointers_to_members.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/pointers_to_members.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/pointers_to_members.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/pointers_to_members.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,37 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// member_function_pointers
+// CHECK-DAG: _Z1fM1AFvvE
+class A {};
+void f(void (A::*)()) {}
+
+// CHECK-DAG: _Z1fM1AKFvvE
+void f(void (A::*)() const) {}
+
+// CHECK-DAG: _Z3fooRKM3barFvvE
+class bar {};
+void foo(void (bar::* const&)()) {}
+
+// CHECK-DAG: _Z3fooRKM3barFvvES3_
+void foo(void (bar::* const&)(), void (bar::* const&)()) {}
+
+// CHECK-DAG: _Z3fooM3barFvvERKS1_
+void foo(void (bar::*)(), void (bar::* const&)()) {}
+
+// CHECK-DAG: _Z3fooIM3barFvvEEvRKT_
+template <typename T> void foo(T const&);
+template <> void foo<void (bar::*)()>(void (bar::* const&)()) {}
+
+// member_variable_pointers
+// CHECK-DAG: _Z3fooM3barb
+void foo(bool bar::*) {}
+
+// CHECK-DAG: _Z3fooIb3fopEvMT0_T_
+class fop {};
+template <typename T, class C> void foo(T C::*);
+template <> void foo<bool, fop>(bool fop::*) {}
+
+

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/pointers_to_members.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/qualifiers.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/qualifiers.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/qualifiers.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/qualifiers.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,91 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// cv_qualifier_ordering
+// CHECK-DAG: _Z8functionRKi
+void function(int const &) {}
+
+// CHECK-DAG: _Z8functiooRVi
+void functioo(int volatile &) {}
+
+// Test that restrict is not generated as part of mangling
+// CHECK-DAG: _Z9function2Pi
+void function2(int * __restrict) {}
+
+// CHECK-DAG: _Z9function3Ri
+void function3(int & __restrict) {}
+
+// CHECK-DAG: _Z8functiopRK5param
+struct param {};
+void functiop(param const &) {}
+
+// CHECK-DAG: _Z8functioqRV5param
+void functioq(param volatile &) {}
+
+// CHECK-DAG: _ZNK5clash8functiotEv
+// CHECK-DAG: _ZNV5clash8functiouEv
+class clash {
+    void functiot() const;
+    void functiou() volatile;
+};
+void clash::functiot() const {}
+void clash::functiou() volatile {}
+
+// CHECK-DAG: _Z8functiowRVKi
+void functiow(int const volatile &){}
+
+// CHECK-DAG: _Z8functiox5paramRKS_
+void functiox(param, param const &) {}
+
+// CHECK-DAG: _Z8functioy5paramRVS_
+void functioy(param, param volatile &) {}
+
+// CHECK-DAG: _Z8functioa5paramS_6param2RKS0_
+class param2 {};
+void functioa(param, param, param2, param2 const &) {}
+
+// CHECK-DAG: _Z8functiob5paramS_6param2RVS0_
+void functiob(param, param, param2, param2 volatile &) {}
+
+// Restrict not part of mangling.
+// CHECK-DAG: _Z8functioz5paramRS_
+void functioz(param, param & __restrict) {}
+
+// CHECK-DAG: _Z8functioc5paramS_6param2RS0_
+void functioc(param, param, param2, param2 & __restrict) {}
+
+// type_qualifier_spacing
+// CHECK-DAG: _Z8functiodPi
+void functiod(int *) {};
+
+// CHECK-DAG: _Z8functioeRi
+void functioe(int &) {};
+
+// CHECK-DAG: _Z8functiofOi
+void functiof(int &&) {};
+
+// mixing_types_with_cv_qualifiers
+// CHECK-DAG: _Z8functiogPKi
+void functiog(int const *) {}
+
+// CHECK-DAG: _Z8functiohPi
+void functioh(int* const) {}
+
+// CHECK-DAG: _Z8functioiPKi
+void functioi(int const* const) {}
+
+// miscellaneous_qualifier_positioning
+// CHECK-DAG: _Z8functiojCf
+void functioj(float _Complex) {}
+
+// rvalue references
+// CHECK-DAG: _Z4foorOi
+void foor(int&&) {}
+
+// CHECK-DAG: _Z4foosOKi
+void foos(int const &&) {}
+
+// CHECK-DAG: _Z4footOVKi
+void foot(int volatile const &&) {}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/qualifiers.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/return_types.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/return_types.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/return_types.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/return_types.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,43 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+class bar {};
+// return types
+// CHECK-DAG: _Z3fooI3barEPvv
+template <typename T> void* foo();
+template<> void* foo<bar>() { return 0; }
+
+// CHECK-DAG: _Z3fooI3barEKiv
+template <typename T> int const foo();
+template<> int const foo<bar>() { return 0; }
+
+// CHECK-DAG: _Z4foo2IiEPFivET_
+template <typename T> int (* foo2(T))();
+template <> int (* foo2<int>(int))() { return 0; }
+
+// CHECK-DAG: _Z4foo3IiEPFT_vES0_
+template <typename T> T (* foo3(T))();
+template <> int (* foo3<int>(int))() { return 0; }
+
+// CHECK-DAG: _Z4foo4IPFcvEET_S2_
+template <typename T> T foo4(T);
+template <> char (* foo4<char (*)()>(char (*)()))() { return 0; }
+
+// CHECK-DAG: _Z4foo5IPFcvEET_RKS2_
+template <typename T> T foo5(const T &);
+template <> char (* foo5<char (*)()>(char (* const&)()))() { return 0; }
+
+// CHECK-DAG: _Z4foo6IPFcvEEPT_RKS2_
+template <typename T> T* foo6(const T &);
+template <> char (** foo6<char (*)()>(char (* const&)()))() { return 0; }
+
+// CHECK-DAG: _Z4foo6IM3bazFvvEEPT_RKS3_
+class baz {};
+template <> void (baz::** foo6<void (baz::*)()>(void (baz::* const&)()))() { return 0; }
+
+// CHECK-DAG: _Z4foo6IM3bazcEPT_RKS2_
+template <> char baz::** foo6<char baz::*>(char baz::* const&) { return 0; }
+
+

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/return_types.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/tc_n.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/tc_n.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/tc_n.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/tc_n.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,14 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+#include <climits>
+
+template <unsigned long I> void foo4();
+
+// 64bit unsigned long
+// LP64-DAG: _Z4foo4ILm18446744073709551615EEvv
+// ILP32-DAG: _Z4foo4ILm4294967295EEvv
+template <> void foo4<ULONG_MAX>() {}
+

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/tc_n.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/template_parameter_substitution.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/template_parameter_substitution.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/template_parameter_substitution.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/template_parameter_substitution.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,93 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// template_parameter_substitution
+
+struct bar {};
+
+// CHECK-DAG: _Z3fooI3barEvT_
+template <typename T> void foo(T);
+template <> void foo<bar>(bar) {}
+
+// CHECK-DAG: _Z3fooI3barET_S1_
+template <typename T> T foo(T);
+template <> bar foo<bar>(bar) { bar b; return b; }
+
+// CHECK-DAG: _Z3fooIh3barET_T0_
+template <typename T, typename U> T foo(U);
+template <> unsigned char foo<unsigned char, bar>(bar) { return 0; }
+
+// CHECK-DAG: _ZN4testIcE3bazIiEEcT_
+template <typename T> struct test {
+    template <typename U> T baz(U);
+};
+template <> template <> char test<char>::baz<int>(int) { return 0; }
+
+// CHECK-DAG: _Z3fooI3basIiEjEvT_T0_
+template <typename T> struct bas {};
+template <class C, typename U> void foo(C, U);
+template <> void foo<bas<int>, unsigned int>(bas<int>, unsigned int) {}
+
+// CHECK-DAG: _Z4foo1I3barEPvv
+template <typename T> void * foo1();
+template <> void* foo1<bar>() { return 0; }
+
+// CHECK-DAG: _Z4foo2I3barEKcv
+template <typename T> char const foo2();
+template <> char const foo2<bar>() { return 0; }
+
+// CHECK-DAG: _Z4foo3ILi2EEv3batIXT_EE
+template <int I> struct bat {};
+template <int I> void foo3(bat<I>);
+template <> void foo3<2>(bat<2>) {}
+
+// CHECK-DAG: _Z4foo4Ih1SEPT_RT0_PKcS6_
+struct S {};
+template <typename T, class C> T* foo4(C&, char const*, char const*);
+template <> unsigned char* foo4<unsigned char, S>(S&, char const*, char const*) { return 0; }
+
+// CHECK-DAG: _Z4foo5IfcEvT_PFiT0_E
+template <typename T, typename U> void foo5(T, int (*)(U));
+template <> void foo5<float, char>(float, int (*)(char)) {}
+
+// CHECK-DAG: _Z3fudIcLi1EEvT_PAT0__PFiS0_E
+template <typename T, int I> void fud(T, int (* (*) [I])(T));
+template <> void fud<char, 1>(char, int (* (*) [1])(char)) {}
+
+// CHECK-DAG: _Z5OuterI5InnerIfEEiT_
+template <typename T> struct Inner {};
+template <typename U> int Outer(U);
+template <> int Outer<Inner<float> >(Inner<float>) { return 0; }
+
+// parameter packs
+// CHECK-DAG: _Z4foo6IJEEvi
+template<class... Types> void foo6(int);
+template <> void foo6<>(int) {}
+
+// CHECK-DAG: _Z4foo7IiJEEvf
+template<typename, class... Types> void foo7(float);
+template <> void foo7<int>(float) {}
+
+// CHECK-DAG: _Z4foo8IJjlEEvi
+template<class... Types> void foo8(int);
+template <> void foo8<unsigned int, long>(int) {}
+
+// CHECK-DAG: _Z4foo9IfJjlEEvi
+template<typename, class... Types> void foo9(int);
+template <> void foo9<float, unsigned int, long>(int) {}
+
+// CHECK-DAG: _Z5foo10IjJlEERT_PS0_
+template <typename T, class... Types> T& foo10(T*);
+template <> unsigned int& foo10<unsigned int, long>(unsigned int* a) { return (unsigned int&)a; }
+
+// CHECK-DAG: _Z5foo11IJifPcEEvDpT_
+template <typename... Types> void foo11(Types...);
+template <> void foo11<int, float, char*>(int, float, char*) {}
+
+// CHECK-DAG: _Z5foo12IiJf3bauIcJlEEEEvRT_
+template <typename T, typename ...Types> struct bau {};
+template <typename T, typename ...Types> void foo12(T&);
+template <> void foo12<int, float, bau<char, long> >(int&) {}
+

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/template_parameter_substitution.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/test.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/test.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/test.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/test.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,340 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+#include <cstddef>
+
+// CHECK-DAG: _Z8functionv
+void function() {}
+
+// CHECK-DAG: _Z3fooi
+void foo(int) {}
+
+extern "C" {
+// CHECK-DAG: foo
+void foo() {}
+}
+
+// tests
+// CHECK-DAG: _ZN16jksnurvbvlhvfkux26ltqskcbxhbqavdtthaorlirkvrER23evpowqhtpqlwphewbccruiwR23ruxsdsnmueaxeuyqizhdsel
+struct evpowqhtpqlwphewbccruiw {};
+struct ruxsdsnmueaxeuyqizhdsel {};
+struct jksnurvbvlhvfkux {
+  void ltqskcbxhbqavdtthaorlirkvr(evpowqhtpqlwphewbccruiw &,
+                                  ruxsdsnmueaxeuyqizhdsel &);
+};
+void jksnurvbvlhvfkux::ltqskcbxhbqavdtthaorlirkvr(evpowqhtpqlwphewbccruiw &,
+                                                  ruxsdsnmueaxeuyqizhdsel &) {}
+
+// CHECK-DAG: _ZN8okldbcpoI7ubkozqz14smagsiclrkkqwcLj0E20alhmzoeengpqmwjfmjwgE8whnstwiy9bxllucksuERKNS3_16swsniwznpdhlkivsE
+struct ubkozqz {};
+struct smagsiclrkkqwc {};
+struct alhmzoeengpqmwjfmjwg {};
+template <class T, class U, unsigned a, class W> struct okldbcpo {
+  struct swsniwznpdhlkivs {};
+  struct whnstwiy {
+    void bxllucksu(okldbcpo<T, U, a, W>::swsniwznpdhlkivs const &);
+  };
+};
+
+template <>
+void okldbcpo<ubkozqz, smagsiclrkkqwc, 0u, alhmzoeengpqmwjfmjwg>::whnstwiy::
+    bxllucksu(okldbcpo<ubkozqz, smagsiclrkkqwc, 0u,
+                       alhmzoeengpqmwjfmjwg>::swsniwznpdhlkivs const &) {}
+
+// CHECK-DAG: _ZN5gznwyD1Ev
+struct gznwy {
+  ~gznwy();
+};
+gznwy::~gznwy() {}
+
+// CHECK-DAG: _ZN15tuscbncxpqrqspjC1ERK8xsflodyeS2_b
+struct xsflodye {};
+struct tuscbncxpqrqspj {
+  tuscbncxpqrqspj(xsflodye const &, xsflodye const &, bool);
+};
+tuscbncxpqrqspj::tuscbncxpqrqspj(xsflodye const &, xsflodye const &, bool) {}
+
+// CHECK-DAG: _ZN5hyljqIPFvN10mnukufmczi19htmuvhnsicconebhkdhERK8xsflodyeS4_E18wmfnwhhdgcxowslpokE20lqklfjefhpcslvrofnutC1EiRKS7_
+struct mnukufmczi {
+  struct htmuvhnsicconebhkdh {};
+};
+struct wmfnwhhdgcxowslpok {};
+template <typename T, class C> struct hyljq {
+  struct lqklfjefhpcslvrofnut {
+    lqklfjefhpcslvrofnut(int, wmfnwhhdgcxowslpok const &);
+  };
+};
+
+template <>
+hyljq<void (*)(mnukufmczi::htmuvhnsicconebhkdh, xsflodye const &,
+               xsflodye const &),
+      wmfnwhhdgcxowslpok>::lqklfjefhpcslvrofnut::
+    lqklfjefhpcslvrofnut(int, wmfnwhhdgcxowslpok const &) {}
+
+// CHECK-DAG: _Z9kqerssezlIN3gvu6zrjfkc14oqxicyfkugyisiE18mjwzznszyjtfpvksthEPT0_PT_
+struct loml {};
+struct mjwzznszyjtfpvksth {};
+struct gvu {
+  struct zrjfkc {
+    struct oqxicyfkugyisi {};
+  };
+};
+template <class C, class D> D *kqerssezl(C *) {};
+template <>
+mjwzznszyjtfpvksth *kqerssezl<gvu::zrjfkc::oqxicyfkugyisi, mjwzznszyjtfpvksth>(
+    gvu::zrjfkc::oqxicyfkugyisi *c) {
+  return 0;
+}
+
+// CHECK-DAG: _ZNK10augyuwbszmI8cfhlachhEixEi
+class cfhlachh {};
+template <class C> struct augyuwbszm {
+  void operator[](int) const;
+};
+template <> void augyuwbszm<cfhlachh>::operator[](int) const {}
+
+// CHECK-DAG: _ZNK5tupbkIiEneERKS0_
+template <typename T> struct tupbk {
+  void operator!=(tupbk<T> const &) const;
+};
+template <> void tupbk<int>::operator!=(tupbk<int> const &) const {}
+
+// CHECK-DAG: _ZN4iamy12saxordnzvdreE
+namespace iamy {
+int saxordnzvdre;
+};
+
+// CHECK-DAG: _Z1WiiiRK24frrjwvjhttlhsfrgvkqbnuuw
+struct frrjwvjhttlhsfrgvkqbnuuw {};
+void W(int, int, int, frrjwvjhttlhsfrgvkqbnuuw const &) {}
+
+// CHECK-DAG: _ZN7wuytgnapLEt
+struct wuytgna {
+  void operator+=(unsigned short);
+};
+void wuytgna::operator+=(unsigned short) {}
+
+// CHECK-DAG: _ZlsR6byeldgRK11gdopbemiyor
+struct byeldg {};
+struct gdopbemiyor {};
+void operator<<(byeldg &, gdopbemiyor const &) {}
+
+// CHECK-DAG: _ZrsR6byeldgRi
+void operator>>(byeldg &, int &) {}
+
+// CHECK-DAG: _ZN5inssc6assertIbEEvT_
+struct inssc {
+  template <typename T> void assert(T);
+};
+template <> void inssc::assert<bool>(bool) {}
+
+// CHECK-DAG: _Z9kqerssezlIP22grogpuwiutiwyiztgugzjkPvEPT0_PT_
+class grogpuwiutiwyiztgugzjk {};
+template <>
+void **kqerssezl<grogpuwiutiwyiztgugzjk *, void *>(grogpuwiutiwyiztgugzjk **) {
+  return 0;
+}
+
+// anonymous_namespaces
+// skip as not specified by the ABI (and not important for linking)
+
+// special names
+// CHECK-DAG: _ZTV4foo1
+class foo1 {
+  virtual void f();
+  virtual ~foo1();
+};
+void foo1::f() {}
+
+// substitutions_work_in_base_36
+// CHECK-DAG: _Z3foo2s1S_2s2S0_2s3S1_2s4S2_2s5S3_2s6S4_2s7S5_2s8S6_2s9S7_3s10S8_3s11S9_3s12SA_3s13SB_3s14SC_3s15SD_3s16SE_3s17SF_3s18SG_3s19SH_3s20SI_3s21SJ_3s22SK_3s23SL_3s24SM_3s25SN_3s26SO_3s27SP_3s28SQ_3s29SR_3s30SS_3s31ST_3s32SU_3s33SV_3s34SW_3s35SX_3s36SY_3s37SZ_3s38S10_
+class s1 {};
+class s2 {};
+class s3 {};
+class s4 {};
+class s5 {};
+class s6 {};
+class s7 {};
+class s8 {};
+class s9 {};
+class s10 {};
+class s11 {};
+class s12 {};
+class s13 {};
+class s14 {};
+class s15 {};
+class s16 {};
+class s17 {};
+class s18 {};
+class s19 {};
+class s20 {};
+class s21 {};
+class s22 {};
+class s23 {};
+class s24 {};
+class s25 {};
+class s26 {};
+class s27 {};
+class s28 {};
+class s29 {};
+class s30 {};
+class s31 {};
+class s32 {};
+class s33 {};
+class s34 {};
+class s35 {};
+class s36 {};
+class s37 {};
+class s38 {};
+
+void foo(s1, s1, s2, s2, s3, s3, s4, s4, s5, s5, s6, s6, s7, s7, s8, s8, s9, s9,
+         s10, s10, s11, s11, s12, s12, s13, s13, s14, s14, s15, s15, s16, s16,
+         s17, s17, s18, s18, s19, s19, s20, s20, s21, s21, s22, s22, s23, s23,
+         s24, s24, s25, s25, s26, s26, s27, s27, s28, s28, s29, s29, s30, s30,
+         s31, s31, s32, s32, s33, s33, s34, s34, s35, s35, s36, s36, s37, s37,
+         s38, s38) {}
+
+// substitutions
+// CHECK-DAG: _ZSt3foov
+namespace std {
+void foo() {}
+};
+
+// CHECK-DAG: _Z3fooSaIcE
+#include <string>
+void foo(std::allocator<char>) {}
+
+// CHECK-DAG: _Z3fooSs
+void
+foo(std::basic_string<char, std::char_traits<char>, std::allocator<char> >) {}
+
+#include <iostream>
+// CHECK-DAG: _Z3fooSi
+void foo(std::basic_istream<char, std::char_traits<char> >) {}
+
+// CHECK-DAG: _Z3fooSo
+void foo(std::basic_ostream<char, std::char_traits<char> >) {}
+
+// CHECK-DAG: _Z3fooSd
+void foo(std::basic_iostream<char, std::char_traits<char> >) {}
+
+// CHECK-DAG: _Z1fa
+void f(signed char) {}
+
+// CHECK-DAG: _Z1gai
+void g(signed char, int) {}
+
+// CHECK-DAG: _Z1haa
+void h(signed char, signed char) {}
+
+// CHECK-DAG: _Z1fs
+void f(short) {}
+
+// CHECK-DAG: _Z1gsi
+void g(short, int) {}
+
+// CHECK-DAG: _Z1hss
+void h(short, short) {}
+
+class bar {};
+// CHECK-DAG: _ZN4foof3bazEMNS_3barEKFbvE
+class foof {
+  class bar {};
+  void baz(bool (foof::bar::*)() const);
+};
+void foof::baz(bool (foof::bar::*)() const) {}
+
+// CHECK-DAG: _Z3fooPvPA4_A4_h
+void foo(void *, unsigned char (*)[4][4]) {}
+
+// CHECK-DAG: _ZN4foogIXadL_Z4buraEEE3barEv
+int bura;
+template <int *C> class foog {
+  void bar();
+};
+template <> void foog<(&bura)>::bar() {}
+
+// CHECK-DAG: _ZN4foohILi3ELi7EE3qrdIcEEvRAplstPT_L_ZN4qkla10ydyxkgmnvsIiLi3EE5ckepsEE_i
+namespace qkla {
+template <typename, int n> struct ydyxkgmnvs {
+  static const int ckeps = n;
+};
+};
+template <int, int> struct fooh {
+  template <typename T>
+  void qrd(int (&)[((sizeof(T *)) + qkla::ydyxkgmnvs<int, 3>::ckeps)]) {}
+};
+template <>
+template <>
+void fooh<3, 7>::qrd<char>(
+    int (&)[((sizeof(char *)) + qkla::ydyxkgmnvs<int, 3>::ckeps)]) {}
+
+// CHECK-DAG: _ZN5snlqx11agvhrfxatlcILj32ELj79764919ELj4294967295ELj4294967295ELb1ELb1EE13bmfngddnzstfeEPKvS3_
+namespace snlqx {
+template <unsigned, unsigned, unsigned, unsigned, bool, bool>
+struct agvhrfxatlc {
+  void bmfngddnzstfe(void const *, void const *);
+};
+};
+template <>
+void snlqx::agvhrfxatlc<32u, 79764919u, 4294967295u, 4294967295u, true,
+                        true>::bmfngddnzstfe(void const *, void const *) {}
+
+// CHECK-DAG: _Z4foojM3barb
+void fooj(bool bar::*) {}
+
+// CHECK-DAG: _Z4fookIFvPK3barEEvv
+template <typename T> void fook();
+template <> void fook<void(bar const *)>() {}
+
+// CHECK-DAG: _ZN4foolILi3ELi7EE4qrd2EPN5snlqx4cqiv4nerxINS2_8lctrvokgIiLl3ELl7ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647ELl2147483647EEEN4qkla4qjgcILi0EEENS2_4ecnwINS2_4kuezINS6_3uraILi1EEEEESC_NS6_4ngslESE_SE_EEEE
+namespace qkla {
+template <int I> struct ura {};
+template <int I> struct qjgc {};
+struct ngsl {};
+};
+namespace snlqx {
+namespace cqiv {
+template <typename T1, typename T2, typename T3> struct nerx {};
+template <typename, long, long, long, long, long, long, long, long, long, long,
+          long, long, long, long, long, long, long, long, long, long>
+struct lctrvokg {};
+template <class C, class, class, class, class> struct ecnw {};
+template <class C> struct kuez {};
+};
+};
+template <int, int> struct fool {
+  void qrd2(snlqx::cqiv::nerx<
+      snlqx::cqiv::lctrvokg<int, 3l, 7l, 2147483647l, 2147483647l, 2147483647l,
+                           2147483647l, 2147483647l, 2147483647l, 2147483647l,
+                           2147483647l, 2147483647l, 2147483647l, 2147483647l,
+                           2147483647l, 2147483647l, 2147483647l, 2147483647l,
+                           2147483647l, 2147483647l, 2147483647l>,
+      qkla::qjgc<0>,
+      snlqx::cqiv::ecnw<snlqx::cqiv::kuez<qkla::ura<1> >, qkla::ura<1>, qkla::ngsl,
+                       qkla::ngsl, qkla::ngsl> > *);
+};
+template <>
+void fool<3, 7>::qrd2(snlqx::cqiv::nerx<
+    snlqx::cqiv::lctrvokg<int, 3l, 7l, 2147483647l, 2147483647l, 2147483647l,
+                         2147483647l, 2147483647l, 2147483647l, 2147483647l,
+                         2147483647l, 2147483647l, 2147483647l, 2147483647l,
+                         2147483647l, 2147483647l, 2147483647l, 2147483647l,
+                         2147483647l, 2147483647l, 2147483647l>,
+    qkla::qjgc<0>,
+    snlqx::cqiv::ecnw<snlqx::cqiv::kuez<qkla::ura<1> >, qkla::ura<1>, qkla::ngsl,
+                     qkla::ngsl, qkla::ngsl> > *) {}
+
+// CHECK-DAG: _Z4foomiPFicE
+void foom(int, int(char)) {}
+
+// CHECK-DAG: _Z4fooniPFicE
+void foon(int, int (*)(char)) {}
+
+// CHECK-DAG: _Z4foooiRFicE
+void fooo(int, int (&)(char)) {}
+
+// CHECK-DAG: _Z4foopiOFicE
+void foop(int, int (&&)(char)) {}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/test.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/testn.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/testn.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/testn.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/testn.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,20 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler cxx_11 -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+#include <cstddef>
+
+
+// LP64-DAG: _ZnwmjjPv
+// ILP32-DAG: _ZnwjjjPv
+void * operator new(std::size_t, unsigned int, unsigned int, void* a) { return 0; }
+
+// operators
+// LP64-DAG: _Znwm
+// ILP32-DAG: _Znwj
+void *operator new(std::size_t) { return 0; }
+
+// LP64-DAG: _Znam
+// ILP32-DAG: _Znaj
+void *operator new[](std::size_t) { return 0; }

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/testn.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/tps.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/tps.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/tps.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/tps.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,9 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+// CHECK-DAG: _Z4funcILi4EE4struIXT_EERKS1_
+template <int I> struct stru {};
+template <int I> stru<I> func(stru<I> const&);
+template <> stru<4> func<4>(stru<4> const&) { stru<4> w; return w; }

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/tps.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/mangling/type_casting.xpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/mangling/type_casting.xpp?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/mangling/type_casting.xpp (added)
+++ test-suite/trunk/ABI-Testsuite/test/mangling/type_casting.xpp Mon Jul 28 16:20:34 2014
@@ -0,0 +1,41 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: cxx_compiler -c %s -o %t.o
+// RUN: bindump %t.o | FileCheck prefixes %s
+
+#include <climits>
+
+// CHECK: _Z3fooILi6EEvv
+template <int I> void foo();
+template <> void foo<6>() {}
+
+// CHECK: _Z3fooILin6EEvv
+template <> void foo<-6>() {}
+
+// CHECK: _Z4foo2ILj6EEvv
+template <unsigned int I> void foo2();
+template <> void foo2<6u>() {}
+
+// CHECK: _Z4foo3ILl6EEvv
+template <long I> void foo3();
+template <> void foo3<6l>() {}
+
+// CHECK: _Z4foo4ILm6EEvv
+template <unsigned long I> void foo4();
+template <> void foo4<6ul>() {}
+
+
+// CHECK: _Z4foo5ILx6EEvv
+template <long long I> void foo5();
+template <> void foo5<6ll>() {}
+
+// CHECK: _Z4foo6ILy6EEvv
+template <unsigned long long I> void foo6();
+template <> void foo6<6ull>() {}
+
+// CHECK: _Z4foo7ILb0EEvv
+template <bool I> void foo7();
+template <> void foo7<0>() {}
+
+// CHECK: _Z4foo7ILb1EEvv
+template <> void foo7<1>() {}

Propchange: test-suite/trunk/ABI-Testsuite/test/mangling/type_casting.xpp
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/misc/T_cvta.x
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/misc/T_cvta.x?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/misc/T_cvta.x (added)
+++ test-suite/trunk/ABI-Testsuite/test/misc/T_cvta.x Mon Jul 28 16:20:34 2014
@@ -0,0 +1,648 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: c_compiler -c -o %t1.o -I "common" "common/testsuite.c"
+// RUN: cxx_compiler cxx_rtti -c %s -I "common" -o %t2.o
+// RUN: c_compiler -c %s -I "common" -o %t3.o
+// RUN: linker -o %t2%exeext  %t1.o %t2.o %t3.o
+// RUN: runtool %t2%exeext | checker "TEST PASSED"
+#include "testsuite.h"
+#ifdef __cplusplus
+
+struct  abcd  {
+  int p;
+  virtual ::abcd * foo(int ); // _ZN4abcd3fooEi
+  ~abcd(); // tgen
+  abcd(); // tgen
+};
+//SIG(-1 abcd) C1{ v1 Fi}
+
+
+abcd * abcd ::foo(int ){vfunc_called(this, "_ZN4abcd3fooEi");}
+abcd ::~abcd(){ note_dtor("abcd", this);} // tgen
+abcd ::abcd(){ note_ctor("abcd", this);} // tgen
+
+static void Test_abcd()
+{
+  extern Class_Descriptor cd_abcd;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[3];
+    init_test(&cd_abcd, buf);
+    abcd *dp, &lv = *(dp=new (buf) abcd());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(16,8), "sizeof(abcd)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(abcd)");
+    check_field_offset(lv, p, ABISELECT(8,4), "abcd.p");
+    test_class_info(&lv, &cd_abcd);
+    dp->~abcd();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vabcd(Test_abcd, "abcd", ABISELECT(16,8));
+
+#else // __cplusplus
+
+extern void _ZN4abcdC1Ev();
+extern void _ZN4abcdD1Ev();
+Name_Map name_map_abcd[] = {
+  NSPAIR(_ZN4abcdC1Ev),
+  NSPAIR(_ZN4abcdD1Ev),
+  {0,0}
+};
+extern VTBL_ENTRY _ZTI4abcd[];
+extern void _ZN4abcd3fooEi();
+static  VTBL_ENTRY vtc_abcd[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4abcd[0]),
+  (VTBL_ENTRY)&_ZN4abcd3fooEi,
+};
+extern VTBL_ENTRY _ZTI4abcd[];
+extern  VTBL_ENTRY _ZTV4abcd[];
+Class_Descriptor cd_abcd = {  "abcd", // class name
+  0,0,//no base classes
+  &(vtc_abcd[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(16,8), // object size
+  NSPAIRA(_ZTI4abcd),ABISELECT(16,8), //typeinfo_var
+  NSPAIRA(_ZTV4abcd),3, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  0, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  efgh  {
+  int q;
+  virtual ::efgh * foo(int ); // _ZN4efgh3fooEi
+  ~efgh(); // tgen
+  efgh(); // tgen
+};
+//SIG(-1 efgh) C1{ v1 Fi}
+
+
+efgh * efgh ::foo(int ){vfunc_called(this, "_ZN4efgh3fooEi");}
+efgh ::~efgh(){ note_dtor("efgh", this);} // tgen
+efgh ::efgh(){ note_ctor("efgh", this);} // tgen
+
+static void Test_efgh()
+{
+  extern Class_Descriptor cd_efgh;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[3];
+    init_test(&cd_efgh, buf);
+    efgh *dp, &lv = *(dp=new (buf) efgh());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(16,8), "sizeof(efgh)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(efgh)");
+    check_field_offset(lv, q, ABISELECT(8,4), "efgh.q");
+    test_class_info(&lv, &cd_efgh);
+    dp->~efgh();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vefgh(Test_efgh, "efgh", ABISELECT(16,8));
+
+#else // __cplusplus
+
+extern void _ZN4efghC1Ev();
+extern void _ZN4efghD1Ev();
+Name_Map name_map_efgh[] = {
+  NSPAIR(_ZN4efghC1Ev),
+  NSPAIR(_ZN4efghD1Ev),
+  {0,0}
+};
+extern VTBL_ENTRY _ZTI4efgh[];
+extern void _ZN4efgh3fooEi();
+static  VTBL_ENTRY vtc_efgh[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4efgh[0]),
+  (VTBL_ENTRY)&_ZN4efgh3fooEi,
+};
+extern VTBL_ENTRY _ZTI4efgh[];
+extern  VTBL_ENTRY _ZTV4efgh[];
+Class_Descriptor cd_efgh = {  "efgh", // class name
+  0,0,//no base classes
+  &(vtc_efgh[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(16,8), // object size
+  NSPAIRA(_ZTI4efgh),ABISELECT(16,8), //typeinfo_var
+  NSPAIRA(_ZTV4efgh),3, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  0, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  pqrs  : abcd , efgh {
+  int r;
+  virtual ::pqrs * foo(int ); // _ZN4pqrs3fooEi
+  ~pqrs(); // tgen
+  pqrs(); // tgen
+};
+//SIG(1 pqrs) C1{ BC2{ v1 Fi} BC3{ v1 Fi} v1 Fi}
+
+
+pqrs * pqrs ::foo(int ){vfunc_called(this, "_ZN4pqrs3fooEi");}
+pqrs ::~pqrs(){ note_dtor("pqrs", this);} // tgen
+pqrs ::pqrs(){ note_ctor("pqrs", this);} // tgen
+
+static void Test_pqrs()
+{
+  extern Class_Descriptor cd_pqrs;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[ABISELECT(5,6)];
+    init_test(&cd_pqrs, buf);
+    pqrs *dp, &lv = *(dp=new (buf) pqrs());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(32,20), "sizeof(pqrs)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(pqrs)");
+    check_base_class_offset(lv, (abcd*), 0, "pqrs");
+    check_base_class_offset(lv, (efgh*), ABISELECT(16,8), "pqrs");
+    check_field_offset(lv, r, ABISELECT(28,16), "pqrs.r");
+    test_class_info(&lv, &cd_pqrs);
+    dp->~pqrs();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vpqrs(Test_pqrs, "pqrs", ABISELECT(32,20));
+
+#else // __cplusplus
+
+extern void _ZN4pqrsC1Ev();
+extern void _ZN4pqrsD1Ev();
+Name_Map name_map_pqrs[] = {
+  NSPAIR(_ZN4pqrsC1Ev),
+  NSPAIR(_ZN4pqrsD1Ev),
+  {0,0}
+};
+extern Class_Descriptor cd_abcd;
+extern VTBL_ENTRY _ZTI4abcd[];
+extern  VTBL_ENTRY _ZTV4abcd[];
+extern Class_Descriptor cd_efgh;
+extern VTBL_ENTRY _ZTI4efgh[];
+extern  VTBL_ENTRY _ZTV4efgh[];
+static Base_Class bases_pqrs[] = {
+  // ofst, vfto, nneg, vtt_idx, base_vtt_idx, init_seq, direct, virtual
+  {&cd_abcd,    0, //bcp->offset
+    -1, //bcp->virtual_function_table_offset
+    2, //num_negative_vtable_entries(t, bcp)
+    0, //bcp->index_in_construction_vtbl_array
+    0, //bcp->base_subarray_index_in_construction_vtbl_array
+    1, //init_seq
+    -1, //immediately_derived
+  1, 0},
+  {&cd_efgh,    ABISELECT(16,8), //bcp->offset
+    3, //bcp->virtual_function_table_offset
+    2, //num_negative_vtable_entries(t, bcp)
+    0, //bcp->index_in_construction_vtbl_array
+    0, //bcp->base_subarray_index_in_construction_vtbl_array
+    2, //init_seq
+    -1, //immediately_derived
+  1, 0},
+  {0}};
+extern VTBL_ENTRY _ZTI4pqrs[];
+extern void _ZN4pqrs3fooEi();
+extern void ABISELECT(_ZTchn16_h16_N4pqrs3fooEi,_ZTchn8_h8_N4pqrs3fooEi)();
+static  VTBL_ENTRY vtc_pqrs[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4pqrs[0]),
+  (VTBL_ENTRY)&_ZN4pqrs3fooEi,
+  ABISELECT(-16,-8),
+  (VTBL_ENTRY)&(_ZTI4pqrs[0]),
+  (VTBL_ENTRY)&ABISELECT(_ZTchn16_h16_N4pqrs3fooEi,_ZTchn8_h8_N4pqrs3fooEi),
+};
+extern VTBL_ENTRY _ZTI4pqrs[];
+extern  VTBL_ENTRY _ZTV4pqrs[];
+Class_Descriptor cd_pqrs = {  "pqrs", // class name
+  bases_pqrs, 2,
+  &(vtc_pqrs[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(32,20), // object size
+  NSPAIRA(_ZTI4pqrs),ABISELECT(56,32), //typeinfo_var
+  NSPAIRA(_ZTV4pqrs),6, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  2, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  aaa1  {
+  int x;
+  int y;
+  virtual ::abcd * fff(int ); // _ZN4aaa13fffEi
+  virtual ::efgh * kkk(int ); // _ZN4aaa13kkkEi
+  ~aaa1(); // tgen
+  aaa1(); // tgen
+};
+//SIG(-1 aaa1) C1{ v1 v2 Fi[2]}
+
+
+abcd * aaa1 ::fff(int ){vfunc_called(this, "_ZN4aaa13fffEi");}
+efgh * aaa1 ::kkk(int ){vfunc_called(this, "_ZN4aaa13kkkEi");}
+aaa1 ::~aaa1(){ note_dtor("aaa1", this);} // tgen
+aaa1 ::aaa1(){ note_ctor("aaa1", this);} // tgen
+
+static void Test_aaa1()
+{
+  extern Class_Descriptor cd_aaa1;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[ABISELECT(3,4)];
+    init_test(&cd_aaa1, buf);
+    aaa1 *dp, &lv = *(dp=new (buf) aaa1());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(16,12), "sizeof(aaa1)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(aaa1)");
+    check_field_offset(lv, x, ABISELECT(8,4), "aaa1.x");
+    check_field_offset(lv, y, ABISELECT(12,8), "aaa1.y");
+    test_class_info(&lv, &cd_aaa1);
+    dp->~aaa1();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vaaa1(Test_aaa1, "aaa1", ABISELECT(16,12));
+
+#else // __cplusplus
+
+extern void _ZN4aaa1C1Ev();
+extern void _ZN4aaa1D1Ev();
+Name_Map name_map_aaa1[] = {
+  NSPAIR(_ZN4aaa1C1Ev),
+  NSPAIR(_ZN4aaa1D1Ev),
+  {0,0}
+};
+extern VTBL_ENTRY _ZTI4aaa1[];
+extern void _ZN4aaa13fffEi();
+extern void _ZN4aaa13kkkEi();
+static  VTBL_ENTRY vtc_aaa1[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4aaa1[0]),
+  (VTBL_ENTRY)&_ZN4aaa13fffEi,
+  (VTBL_ENTRY)&_ZN4aaa13kkkEi,
+};
+extern VTBL_ENTRY _ZTI4aaa1[];
+extern  VTBL_ENTRY _ZTV4aaa1[];
+Class_Descriptor cd_aaa1 = {  "aaa1", // class name
+  0,0,//no base classes
+  &(vtc_aaa1[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(16,12), // object size
+  NSPAIRA(_ZTI4aaa1),ABISELECT(16,8), //typeinfo_var
+  NSPAIRA(_ZTV4aaa1),4, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  0, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  bbb1  {
+  int p;
+  int q;
+  virtual ::abcd * fff(int ); // _ZN4bbb13fffEi
+  virtual ::efgh * kkk(int ); // _ZN4bbb13kkkEi
+  ~bbb1(); // tgen
+  bbb1(); // tgen
+};
+//SIG(-1 bbb1) C1{ v1 v2 Fi[2]}
+
+
+abcd * bbb1 ::fff(int ){vfunc_called(this, "_ZN4bbb13fffEi");}
+efgh * bbb1 ::kkk(int ){vfunc_called(this, "_ZN4bbb13kkkEi");}
+bbb1 ::~bbb1(){ note_dtor("bbb1", this);} // tgen
+bbb1 ::bbb1(){ note_ctor("bbb1", this);} // tgen
+
+static void Test_bbb1()
+{
+  extern Class_Descriptor cd_bbb1;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[ABISELECT(3,4)];
+    init_test(&cd_bbb1, buf);
+    bbb1 *dp, &lv = *(dp=new (buf) bbb1());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(16,12), "sizeof(bbb1)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(bbb1)");
+    check_field_offset(lv, p, ABISELECT(8,4), "bbb1.p");
+    check_field_offset(lv, q, ABISELECT(12,8), "bbb1.q");
+    test_class_info(&lv, &cd_bbb1);
+    dp->~bbb1();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vbbb1(Test_bbb1, "bbb1", ABISELECT(16,12));
+
+#else // __cplusplus
+
+extern void _ZN4bbb1C1Ev();
+extern void _ZN4bbb1D1Ev();
+Name_Map name_map_bbb1[] = {
+  NSPAIR(_ZN4bbb1C1Ev),
+  NSPAIR(_ZN4bbb1D1Ev),
+  {0,0}
+};
+extern VTBL_ENTRY _ZTI4bbb1[];
+extern void _ZN4bbb13fffEi();
+extern void _ZN4bbb13kkkEi();
+static  VTBL_ENTRY vtc_bbb1[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4bbb1[0]),
+  (VTBL_ENTRY)&_ZN4bbb13fffEi,
+  (VTBL_ENTRY)&_ZN4bbb13kkkEi,
+};
+extern VTBL_ENTRY _ZTI4bbb1[];
+extern  VTBL_ENTRY _ZTV4bbb1[];
+Class_Descriptor cd_bbb1 = {  "bbb1", // class name
+  0,0,//no base classes
+  &(vtc_bbb1[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(16,12), // object size
+  NSPAIRA(_ZTI4bbb1),ABISELECT(16,8), //typeinfo_var
+  NSPAIRA(_ZTV4bbb1),4, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  0, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  ccc1  : virtual aaa1 , virtual bbb1 {
+  int d;
+  int f;
+  virtual ::pqrs * fff(int ); // _ZN4ccc13fffEi
+  virtual ::pqrs * kkk(int ); // _ZN4ccc13kkkEi
+  ~ccc1(); // tgen
+  ccc1(); // tgen
+};
+//SIG(1 ccc1) C1{ VBC2{ v1 v2 Fi[2]} VBC3{ v1 v2 Fi[2]} v1 v2 Fi[2]}
+
+
+pqrs * ccc1 ::fff(int ){vfunc_called(this, "_ZN4ccc13fffEi");}
+pqrs * ccc1 ::kkk(int ){vfunc_called(this, "_ZN4ccc13kkkEi");}
+ccc1 ::~ccc1(){ note_dtor("ccc1", this);} // tgen
+ccc1 ::ccc1(){ note_ctor("ccc1", this);} // tgen
+
+static void Test_ccc1()
+{
+  extern Class_Descriptor cd_ccc1;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[ABISELECT(7,10)];
+    init_test(&cd_ccc1, buf);
+    ccc1 *dp, &lv = *(dp=new (buf) ccc1());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(48,36), "sizeof(ccc1)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(ccc1)");
+    check_base_class_offset(lv, (aaa1*), ABISELECT(16,12), "ccc1");
+    check_base_class_offset(lv, (bbb1*), ABISELECT(32,24), "ccc1");
+    check_field_offset(lv, d, ABISELECT(8,4), "ccc1.d");
+    check_field_offset(lv, f, ABISELECT(12,8), "ccc1.f");
+    test_class_info(&lv, &cd_ccc1);
+    dp->~ccc1();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vccc1(Test_ccc1, "ccc1", ABISELECT(48,36));
+
+#else // __cplusplus
+
+extern void _ZN4ccc1C1Ev();
+extern void _ZN4ccc1D1Ev();
+Name_Map name_map_ccc1[] = {
+  NSPAIR(_ZN4ccc1C1Ev),
+  NSPAIR(_ZN4ccc1D1Ev),
+  {0,0}
+};
+extern Class_Descriptor cd_aaa1;
+extern VTBL_ENTRY _ZTI4aaa1[];
+extern  VTBL_ENTRY _ZTV4aaa1[];
+extern Class_Descriptor cd_bbb1;
+extern VTBL_ENTRY _ZTI4bbb1[];
+extern  VTBL_ENTRY _ZTV4bbb1[];
+static Base_Class bases_ccc1[] = {
+  // ofst, vfto, nneg, vtt_idx, base_vtt_idx, init_seq, direct, virtual
+  {&cd_aaa1,    ABISELECT(16,12), //bcp->offset
+    6, //bcp->virtual_function_table_offset
+    4, //num_negative_vtable_entries(t, bcp)
+    2, //bcp->index_in_construction_vtbl_array
+    0, //bcp->base_subarray_index_in_construction_vtbl_array
+    1, //init_seq
+    -1, //immediately_derived
+  1, 1},
+  {&cd_bbb1,    ABISELECT(32,24), //bcp->offset
+    12, //bcp->virtual_function_table_offset
+    4, //num_negative_vtable_entries(t, bcp)
+    3, //bcp->index_in_construction_vtbl_array
+    0, //bcp->base_subarray_index_in_construction_vtbl_array
+    2, //init_seq
+    -1, //immediately_derived
+  1, 1},
+  {0}};
+extern VTBL_ENTRY _ZTI4ccc1[];
+extern void _ZN4ccc13fffEi();
+extern void _ZN4ccc13kkkEi();
+extern void ABISELECT(_ZTv0_n24_N4ccc13fffEi,_ZTv0_n12_N4ccc13fffEi)();
+extern void ABISELECT(_ZThn16_N4ccc13fffEi,_ZThn12_N4ccc13fffEi)() __attribute__((weak));
+extern void ABISELECT(_ZTcv0_n32_h16_N4ccc13kkkEi,_ZTcv0_n16_h8_N4ccc13kkkEi)();
+extern void ABISELECT(_ZTv0_n24_N4ccc13fffEi,_ZTv0_n12_N4ccc13fffEi)();
+extern void ABISELECT(_ZThn32_N4ccc13fffEi,_ZThn24_N4ccc13fffEi)() __attribute__((weak));
+extern void ABISELECT(_ZTcv0_n32_h16_N4ccc13kkkEi,_ZTcv0_n16_h8_N4ccc13kkkEi)();
+static  VTBL_ENTRY vtc_ccc1[] = {
+  ABISELECT(32,24),
+  ABISELECT(16,12),
+  0,
+  (VTBL_ENTRY)&(_ZTI4ccc1[0]),
+  (VTBL_ENTRY)&_ZN4ccc13fffEi,
+  (VTBL_ENTRY)&_ZN4ccc13kkkEi,
+  ABISELECT(-16,-12),
+  ABISELECT(-16,-12),
+  ABISELECT(-16,-12),
+  (VTBL_ENTRY)&(_ZTI4ccc1[0]),
+  (VTBL_ENTRY)&ABISELECT(_ZTv0_n24_N4ccc13fffEi,_ZTv0_n12_N4ccc13fffEi),
+  (VTBL_ENTRY)&ABISELECT(_ZTcv0_n32_h16_N4ccc13kkkEi,_ZTcv0_n16_h8_N4ccc13kkkEi),
+  ABISELECT(-32,-24),
+  ABISELECT(-32,-24),
+  ABISELECT(-32,-24),
+  (VTBL_ENTRY)&(_ZTI4ccc1[0]),
+  (VTBL_ENTRY)&ABISELECT(_ZTv0_n24_N4ccc13fffEi,_ZTv0_n12_N4ccc13fffEi),
+  (VTBL_ENTRY)&ABISELECT(_ZTcv0_n32_h16_N4ccc13kkkEi,_ZTcv0_n16_h8_N4ccc13kkkEi),
+};
+extern VTBL_ENTRY _ZTV4ccc1[];
+static  VTT_ENTRY vtt_ccc1[] = {
+  {&(_ZTV4ccc1[4]),  4,18},
+  {&(_ZTV4ccc1[10]),  10,18},
+  {&(_ZTV4ccc1[16]),  16,18},
+};
+extern VTBL_ENTRY _ZTI4ccc1[];
+extern  VTBL_ENTRY _ZTV4ccc1[];
+extern  VTBL_ENTRY * __attribute__((weak))_ZTT4ccc1[];
+static VTBL_ENTRY alt_thunk_names1[] = {
+  (VTBL_ENTRY)ABISELECT(_ZTv0_n24_N4ccc13fffEi,_ZTv0_n12_N4ccc13fffEi), // 
+  (VTBL_ENTRY)ABISELECT(_ZThn32_N4ccc13fffEi,_ZThn24_N4ccc13fffEi),
+  (VTBL_ENTRY)ABISELECT(_ZThn16_N4ccc13fffEi,_ZThn12_N4ccc13fffEi),
+  ALT_NAMES_TERMINATOR,
+ALT_NAMES_TERMINATOR};
+Class_Descriptor cd_ccc1 = {  "ccc1", // class name
+  bases_ccc1, 2,
+  &(vtc_ccc1[0]), // expected_vtbl_contents
+  &(vtt_ccc1[0]), // expected_vtt_contents
+  ABISELECT(48,36), // object size
+  NSPAIRA(_ZTI4ccc1),ABISELECT(56,32), //typeinfo_var
+  NSPAIRA(_ZTV4ccc1),18, //virtual function table var
+  4, // offset into main vftv pointed to by object[0]
+  NSPAIRA(_ZTT4ccc1),3, //virtual table table var
+  2, // n_initialized_bases
+  1, // has_virtual_bases
+  0, // has_class_type_fields
+  alt_thunk_names1,
+};
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  ddd1  : aaa1 , bbb1 {
+  int d;
+  int f;
+  virtual ::pqrs * fff(int ); // _ZN4ddd13fffEi
+  virtual ::pqrs * kkk(int ); // _ZN4ddd13kkkEi
+  ~ddd1(); // tgen
+  ddd1(); // tgen
+};
+//SIG(1 ddd1) C1{ BC2{ v1 v2 Fi[2]} BC3{ v1 v2 Fi[2]} v1 v2 Fi[2]}
+
+
+pqrs * ddd1 ::fff(int ){vfunc_called(this, "_ZN4ddd13fffEi");}
+pqrs * ddd1 ::kkk(int ){vfunc_called(this, "_ZN4ddd13kkkEi");}
+ddd1 ::~ddd1(){ note_dtor("ddd1", this);} // tgen
+ddd1 ::ddd1(){ note_ctor("ddd1", this);} // tgen
+
+static void Test_ddd1()
+{
+  extern Class_Descriptor cd_ddd1;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[ABISELECT(6,9)];
+    init_test(&cd_ddd1, buf);
+    ddd1 *dp, &lv = *(dp=new (buf) ddd1());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(40,32), "sizeof(ddd1)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(ddd1)");
+    check_base_class_offset(lv, (aaa1*), 0, "ddd1");
+    check_base_class_offset(lv, (bbb1*), ABISELECT(16,12), "ddd1");
+    check_field_offset(lv, d, ABISELECT(32,24), "ddd1.d");
+    check_field_offset(lv, f, ABISELECT(36,28), "ddd1.f");
+    test_class_info(&lv, &cd_ddd1);
+    dp->~ddd1();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vddd1(Test_ddd1, "ddd1", ABISELECT(40,32));
+
+#else // __cplusplus
+
+extern void _ZN4ddd1C1Ev();
+extern void _ZN4ddd1D1Ev();
+Name_Map name_map_ddd1[] = {
+  NSPAIR(_ZN4ddd1C1Ev),
+  NSPAIR(_ZN4ddd1D1Ev),
+  {0,0}
+};
+extern Class_Descriptor cd_aaa1;
+extern VTBL_ENTRY _ZTI4aaa1[];
+extern  VTBL_ENTRY _ZTV4aaa1[];
+extern Class_Descriptor cd_bbb1;
+extern VTBL_ENTRY _ZTI4bbb1[];
+extern  VTBL_ENTRY _ZTV4bbb1[];
+static Base_Class bases_ddd1[] = {
+  // ofst, vfto, nneg, vtt_idx, base_vtt_idx, init_seq, direct, virtual
+  {&cd_aaa1,    0, //bcp->offset
+    -1, //bcp->virtual_function_table_offset
+    2, //num_negative_vtable_entries(t, bcp)
+    0, //bcp->index_in_construction_vtbl_array
+    0, //bcp->base_subarray_index_in_construction_vtbl_array
+    1, //init_seq
+    -1, //immediately_derived
+  1, 0},
+  {&cd_bbb1,    ABISELECT(16,12), //bcp->offset
+    5, //bcp->virtual_function_table_offset
+    2, //num_negative_vtable_entries(t, bcp)
+    0, //bcp->index_in_construction_vtbl_array
+    0, //bcp->base_subarray_index_in_construction_vtbl_array
+    2, //init_seq
+    -1, //immediately_derived
+  1, 0},
+  {0}};
+extern VTBL_ENTRY _ZTI4ddd1[];
+extern void _ZN4ddd13fffEi();
+extern void ABISELECT(_ZTch0_h16_N4ddd13kkkEi,_ZTch0_h8_N4ddd13kkkEi)();
+extern void _ZN4ddd13kkkEi();
+extern void ABISELECT(_ZThn16_N4ddd13fffEi,_ZThn12_N4ddd13fffEi)();
+extern void ABISELECT(_ZTchn16_h16_N4ddd13kkkEi,_ZTchn12_h8_N4ddd13kkkEi)();
+static  VTBL_ENTRY vtc_ddd1[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4ddd1[0]),
+  (VTBL_ENTRY)&_ZN4ddd13fffEi,
+  (VTBL_ENTRY)&ABISELECT(_ZTch0_h16_N4ddd13kkkEi,_ZTch0_h8_N4ddd13kkkEi),
+  (VTBL_ENTRY)&_ZN4ddd13kkkEi,
+  ABISELECT(-16,-12),
+  (VTBL_ENTRY)&(_ZTI4ddd1[0]),
+  (VTBL_ENTRY)&ABISELECT(_ZThn16_N4ddd13fffEi,_ZThn12_N4ddd13fffEi),
+  (VTBL_ENTRY)&ABISELECT(_ZTchn16_h16_N4ddd13kkkEi,_ZTchn12_h8_N4ddd13kkkEi),
+};
+extern VTBL_ENTRY _ZTI4ddd1[];
+extern  VTBL_ENTRY _ZTV4ddd1[];
+Class_Descriptor cd_ddd1 = {  "ddd1", // class name
+  bases_ddd1, 2,
+  &(vtc_ddd1[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(40,32), // object size
+  NSPAIRA(_ZTI4ddd1),ABISELECT(56,32), //typeinfo_var
+  NSPAIRA(_ZTV4ddd1),9, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  2, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+

Propchange: test-suite/trunk/ABI-Testsuite/test/misc/T_cvta.x
------------------------------------------------------------------------------
    svn:executable = *

Added: test-suite/trunk/ABI-Testsuite/test/misc/T_deletedfunc.x
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/ABI-Testsuite/test/misc/T_deletedfunc.x?rev=214126&view=auto
==============================================================================
--- test-suite/trunk/ABI-Testsuite/test/misc/T_deletedfunc.x (added)
+++ test-suite/trunk/ABI-Testsuite/test/misc/T_deletedfunc.x Mon Jul 28 16:20:34 2014
@@ -0,0 +1,171 @@
+// This file is distributed under the University of Illinois Open Source License.
+// See LICENSE.TXT for details.
+// RUN: c_compiler -c -o %t1.o -I "common" "common/testsuite.c"
+// RUN: cxx_compiler cxx_11 cxx_rtti -c %s -I "common" -o %t2.o
+// RUN: c_compiler -c %s -I "common" -o %t3.o
+// RUN: linker -o %t2%exeext  %t1.o %t2.o %t3.o
+// RUN: runtool %t2%exeext | checker "TEST PASSED"
+#include "testsuite.h"
+#ifdef __cplusplus
+
+struct  abcd  {
+  virtual void  xar(); // _ZN4abcd3xarEv
+  virtual void  foo()=delete; // _ZN4abcd3fooEv
+  ~abcd(); // tgen
+  abcd(); // tgen
+};
+//SIG(-1 abcd) C1{ v1 v2}
+
+
+void  abcd ::xar(){vfunc_called(this, "_ZN4abcd3xarEv");}
+abcd ::~abcd(){ note_dtor("abcd", this);} // tgen
+abcd ::abcd(){ note_ctor("abcd", this);} // tgen
+
+static void Test_abcd()
+{
+  extern Class_Descriptor cd_abcd;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[2];
+    init_test(&cd_abcd, buf);
+    abcd *dp, &lv = *(dp=new (buf) abcd());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(8,4), "sizeof(abcd)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(abcd)");
+    test_class_info(&lv, &cd_abcd);
+    dp->~abcd();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vabcd(Test_abcd, "abcd", ABISELECT(8,4));
+
+#else // __cplusplus
+
+extern void _ZN4abcdC1Ev();
+extern void _ZN4abcdD1Ev();
+Name_Map name_map_abcd[] = {
+  NSPAIR(_ZN4abcdC1Ev),
+  NSPAIR(_ZN4abcdD1Ev),
+  {0,0}
+};
+extern VTBL_ENTRY _ZTI4abcd[];
+extern void _ZN4abcd3xarEv();
+extern void __cxa_deleted_virtual();
+static  VTBL_ENTRY vtc_abcd[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4abcd[0]),
+  (VTBL_ENTRY)&_ZN4abcd3xarEv,
+  (VTBL_ENTRY)&__cxa_deleted_virtual,
+};
+extern VTBL_ENTRY _ZTI4abcd[];
+extern  VTBL_ENTRY _ZTV4abcd[];
+Class_Descriptor cd_abcd = {  "abcd", // class name
+  0,0,//no base classes
+  &(vtc_abcd[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(8,4), // object size
+  NSPAIRA(_ZTI4abcd),ABISELECT(16,8), //typeinfo_var
+  NSPAIRA(_ZTV4abcd),4, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  0, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+
+#ifdef __cplusplus
+
+struct  efgh  : abcd {
+  virtual void  bar(); // _ZN4efgh3barEv
+  virtual void  foo()=delete; // _ZN4efgh3fooEv
+  virtual void  zoo(); // _ZN4efgh3zooEv
+  ~efgh(); // tgen
+  efgh(); // tgen
+};
+//SIG(1 efgh) C1{ BC2{ v4 v2} v1 v2 v3}
+
+
+void  efgh ::bar(){vfunc_called(this, "_ZN4efgh3barEv");}
+void  efgh ::zoo(){vfunc_called(this, "_ZN4efgh3zooEv");}
+efgh ::~efgh(){ note_dtor("efgh", this);} // tgen
+efgh ::efgh(){ note_ctor("efgh", this);} // tgen
+
+static void Test_efgh()
+{
+  extern Class_Descriptor cd_efgh;
+  void *lvp;
+  {
+    ABISELECT(double,int) buf[2];
+    init_test(&cd_efgh, buf);
+    efgh *dp, &lv = *(dp=new (buf) efgh());
+    lvp = (void*)&lv;
+    check2(sizeof(lv), ABISELECT(8,4), "sizeof(efgh)");
+    check2(__alignof__(lv), ABISELECT(8,4), "__alignof__(efgh)");
+    check_base_class_offset(lv, (abcd*), 0, "efgh");
+    test_class_info(&lv, &cd_efgh);
+    dp->~efgh();
+  }
+  Check_Ctor_Dtor_Calls(lvp);
+}
+static Arrange_To_Call_Me vefgh(Test_efgh, "efgh", ABISELECT(8,4));
+
+#else // __cplusplus
+
+extern void _ZN4efghC1Ev();
+extern void _ZN4efghD1Ev();
+Name_Map name_map_efgh[] = {
+  NSPAIR(_ZN4efghC1Ev),
+  NSPAIR(_ZN4efghD1Ev),
+  {0,0}
+};
+extern Class_Descriptor cd_abcd;
+extern VTBL_ENTRY _ZTI4abcd[];
+extern  VTBL_ENTRY _ZTV4abcd[];
+static Base_Class bases_efgh[] = {
+  // ofst, vfto, nneg, vtt_idx, base_vtt_idx, init_seq, direct, virtual
+  {&cd_abcd,    0, //bcp->offset
+    -1, //bcp->virtual_function_table_offset
+    2, //num_negative_vtable_entries(t, bcp)
+    0, //bcp->index_in_construction_vtbl_array
+    0, //bcp->base_subarray_index_in_construction_vtbl_array
+    1, //init_seq
+    -1, //immediately_derived
+  1, 0},
+  {0}};
+extern VTBL_ENTRY _ZTI4efgh[];
+extern void _ZN4abcd3xarEv();
+extern void __cxa_deleted_virtual();
+extern void _ZN4efgh3barEv();
+extern void _ZN4efgh3zooEv();
+static  VTBL_ENTRY vtc_efgh[] = {
+  0,
+  (VTBL_ENTRY)&(_ZTI4efgh[0]),
+  (VTBL_ENTRY)&_ZN4abcd3xarEv,
+  (VTBL_ENTRY)&__cxa_deleted_virtual,
+  (VTBL_ENTRY)&_ZN4efgh3barEv,
+  (VTBL_ENTRY)&_ZN4efgh3zooEv,
+};
+extern VTBL_ENTRY _ZTI4efgh[];
+extern  VTBL_ENTRY _ZTV4efgh[];
+Class_Descriptor cd_efgh = {  "efgh", // class name
+  bases_efgh, 1,
+  &(vtc_efgh[0]), // expected_vtbl_contents
+  0, //no vtt
+  ABISELECT(8,4), // object size
+  NSPAIRA(_ZTI4efgh),ABISELECT(24,12), //typeinfo_var
+  NSPAIRA(_ZTV4efgh),6, //virtual function table var
+  2, // offset into main vftv pointed to by object[0]
+  {0,0},0, // virtual table table var
+  1, // n_initialized_bases
+  0, // has_virtual_bases
+  0, // has_class_type_fields
+  0, // alt-thunk-names
+};
+#endif // __cplusplus
+
+//============================================================================
+

Propchange: test-suite/trunk/ABI-Testsuite/test/misc/T_deletedfunc.x
------------------------------------------------------------------------------
    svn:executable = *





More information about the llvm-commits mailing list