From 8e25688fe53649a8808d51d6f9687c9249b09a1b Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Wed, 4 Mar 2020 19:46:39 -0500 Subject: [PATCH] GCCBootstrap: Use symlinks to point to other patches, avoiding patch maintenance hell --- .../binutils_freebsd_symbol_versioning.patch | 26 +- .../gcc485_freebsd_aligned_alloc.patch | 39 +- .../patches/gcc485_header_upgrades.patch | 136 +- .../bundled/patches/gcc485_libc_name_p.patch | 150 +- .../patches/gcc485_mingw_clock_gettime.patch | 219 +- .../patches/gcc485_mingw_include.patch | 42 +- .../patches/gcc485_osx_nodeadstrip.patch | 28 +- .../gcc485_triplet_prefixed_cxx_headers.patch | 17 +- .../patches/gcc494_fake_510_musl.patch | 11 +- .../bundled/patches/gcc494_musl.patch | 615 +-- .../bundled/patches/glibc-ppc64le-01.patch | 1 + .../bundled/patches/glibc-ppc64le-02.patch | 1 + .../bundled/patches/glibc-ppc64le-03.patch | 1 + .../bundled/patches/glibc-ppc64le-04.patch | 1 + .../bundled/patches/glibc-ppc64le-05.patch | 1 + .../bundled/patches/glibc-ppc64le-06.patch | 1 + .../bundled/patches/glibc-ppc64le-07.patch | 1 + .../bundled/patches/glibc-ppc64le-08.patch | 1 + .../bundled/patches/glibc-ppc64le-09.patch | 1 + .../bundled/patches/glibc-ppc64le-10.patch | 1 + .../bundled/patches/glibc-ppc64le-11.patch | 1 + .../bundled/patches/glibc-ppc64le-12.patch | 1 + .../bundled/patches/glibc-ppc64le-13.patch | 1 + .../bundled/patches/glibc-ppc64le-14.patch | 1 + .../bundled/patches/glibc-ppc64le-15.patch | 1 + .../bundled/patches/glibc-ppc64le-16.patch | 1 + .../bundled/patches/glibc-ppc64le-17.patch | 1 + .../bundled/patches/glibc-ppc64le-18.patch | 1 + .../bundled/patches/glibc-ppc64le-19.patch | 1 + .../bundled/patches/glibc-ppc64le-20.patch | 1 + .../bundled/patches/glibc-ppc64le-21.patch | 1 + .../bundled/patches/glibc-ppc64le-22.patch | 1 + .../bundled/patches/glibc-ppc64le-23.patch | 1 + .../bundled/patches/glibc-ppc64le-24.patch | 1 + .../bundled/patches/glibc-ppc64le-25.patch | 1 + .../bundled/patches/glibc-ppc64le-26.patch | 1 + .../bundled/patches/glibc-ppc64le-27.patch | 1 + .../bundled/patches/glibc-ppc64le-28.patch | 1 + .../bundled/patches/glibc-ppc64le-29.patch | 1 + .../bundled/patches/glibc-ppc64le-30.patch | 1 + .../bundled/patches/glibc-ppc64le-31.patch | 1 + .../bundled/patches/glibc-ppc64le-32.patch | 1 + .../bundled/patches/glibc-ppc64le-33.patch | 1 + .../bundled/patches/glibc-ppc64le-34.patch | 1 + .../bundled/patches/glibc-ppc64le-35.patch | 1 + .../bundled/patches/glibc-ppc64le-36.patch | 1 + .../bundled/patches/glibc-ppc64le-37.patch | 1 + .../bundled/patches/glibc-ppc64le-38.patch | 1 + .../bundled/patches/glibc-ppc64le-39.patch | 1 + .../bundled/patches/glibc-ppc64le-40.patch | 1 + .../bundled/patches/glibc-ppc64le-41.patch | 1 + .../bundled/patches/glibc-ppc64le-42.patch | 1 + .../bundled/patches/glibc-ppc64le-43.patch | 1 + .../bundled/patches/glibc-ppc64le-44.patch | 1 + .../bundled/patches/glibc-ppc64le-45.patch | 1 + .../bundled/patches/glibc-ppc64le-46.patch | 1 + .../patches/glibc-ppc64le-47-pwr6-mtfsf.patch | 1 + .../patches/glibc-ppc64le-48-ldbl_high.patch | 1 + .../patches/glibc_aarch64_relocation.patch | 206 +- .../bundled/patches/glibc_arm_gcc_fix.patch | 83 +- .../bundled/patches/glibc_gcc_version.patch | 12 +- .../bundled/patches/glibc_i686_asm.patch | 50 +- .../bundled/patches/glibc_make_version.patch | 33 +- .../patches/glibc_musl_rejection.patch | 177 +- .../patches/glibc_musl_rejection_old.patch | 13 +- .../bundled/patches/glibc_nocommon.patch | 12 +- .../patches/glibc_powerpc64le_gcc_fix.patch | 199 +- .../patches/glibc_regexp_nocommon.patch | 20 +- .../bundled/patches/glibc_sunrpc.patch | 21 +- .../bundled/patches/libtapi_fullyaml.patch | 14 +- .../bundled/patches/libtapi_musl.patch | 3852 +---------------- .../bundled/patches/mingw_gcc710_i686.patch | 64 +- .../binutils_freebsd_symbol_versioning.patch | 26 +- .../patches/gcc485_mingw_include.patch | 42 +- .../bundled/patches/glibc-ppc64le-01.patch | 1 + .../bundled/patches/glibc-ppc64le-02.patch | 1 + .../bundled/patches/glibc-ppc64le-03.patch | 1 + .../bundled/patches/glibc-ppc64le-04.patch | 1 + .../bundled/patches/glibc-ppc64le-05.patch | 1 + .../bundled/patches/glibc-ppc64le-06.patch | 1 + .../bundled/patches/glibc-ppc64le-07.patch | 1 + .../bundled/patches/glibc-ppc64le-08.patch | 1 + .../bundled/patches/glibc-ppc64le-09.patch | 1 + .../bundled/patches/glibc-ppc64le-10.patch | 1 + .../bundled/patches/glibc-ppc64le-11.patch | 1 + .../bundled/patches/glibc-ppc64le-12.patch | 1 + .../bundled/patches/glibc-ppc64le-13.patch | 1 + .../bundled/patches/glibc-ppc64le-14.patch | 1 + .../bundled/patches/glibc-ppc64le-15.patch | 1 + .../bundled/patches/glibc-ppc64le-16.patch | 1 + .../bundled/patches/glibc-ppc64le-17.patch | 1 + .../bundled/patches/glibc-ppc64le-18.patch | 1 + .../bundled/patches/glibc-ppc64le-19.patch | 1 + .../bundled/patches/glibc-ppc64le-20.patch | 1 + .../bundled/patches/glibc-ppc64le-21.patch | 1 + .../bundled/patches/glibc-ppc64le-22.patch | 1 + .../bundled/patches/glibc-ppc64le-23.patch | 1 + .../bundled/patches/glibc-ppc64le-24.patch | 1 + .../bundled/patches/glibc-ppc64le-25.patch | 1 + .../bundled/patches/glibc-ppc64le-26.patch | 1 + .../bundled/patches/glibc-ppc64le-27.patch | 1 + .../bundled/patches/glibc-ppc64le-28.patch | 1 + .../bundled/patches/glibc-ppc64le-29.patch | 1 + .../bundled/patches/glibc-ppc64le-30.patch | 1 + .../bundled/patches/glibc-ppc64le-31.patch | 1 + .../bundled/patches/glibc-ppc64le-32.patch | 1 + .../bundled/patches/glibc-ppc64le-33.patch | 1 + .../bundled/patches/glibc-ppc64le-34.patch | 1 + .../bundled/patches/glibc-ppc64le-35.patch | 1 + .../bundled/patches/glibc-ppc64le-36.patch | 1 + .../bundled/patches/glibc-ppc64le-37.patch | 1 + .../bundled/patches/glibc-ppc64le-38.patch | 1 + .../bundled/patches/glibc-ppc64le-39.patch | 1 + .../bundled/patches/glibc-ppc64le-40.patch | 1 + .../bundled/patches/glibc-ppc64le-41.patch | 1 + .../bundled/patches/glibc-ppc64le-42.patch | 1 + .../bundled/patches/glibc-ppc64le-43.patch | 1 + .../bundled/patches/glibc-ppc64le-44.patch | 1 + .../bundled/patches/glibc-ppc64le-45.patch | 1 + .../bundled/patches/glibc-ppc64le-46.patch | 1 + .../patches/glibc-ppc64le-47-pwr6-mtfsf.patch | 1 + .../patches/glibc-ppc64le-48-ldbl_high.patch | 1 + .../patches/glibc_aarch64_relocation.patch | 206 +- .../bundled/patches/glibc_arm_gcc_fix.patch | 83 +- .../bundled/patches/glibc_gcc_version.patch | 12 +- .../bundled/patches/glibc_i686_asm.patch | 50 +- .../bundled/patches/glibc_make_version.patch | 33 +- .../patches/glibc_musl_rejection.patch | 177 +- .../patches/glibc_musl_rejection_old.patch | 13 +- .../bundled/patches/glibc_nocommon.patch | 12 +- .../patches/glibc_powerpc64le_gcc_fix.patch | 199 +- .../patches/glibc_regexp_nocommon.patch | 20 +- .../bundled/patches/glibc_sunrpc.patch | 21 +- .../bundled/patches/libtapi_fullyaml.patch | 14 +- .../bundled/patches/libtapi_musl.patch | 3852 +---------------- .../bundled/patches/mingw_gcc710_i686.patch | 64 +- .../binutils_freebsd_symbol_versioning.patch | 26 +- .../patches/gcc485_mingw_include.patch | 42 +- .../bundled/patches/glibc-ppc64le-01.patch | 1 + .../bundled/patches/glibc-ppc64le-02.patch | 1 + .../bundled/patches/glibc-ppc64le-03.patch | 1 + .../bundled/patches/glibc-ppc64le-04.patch | 1 + .../bundled/patches/glibc-ppc64le-05.patch | 1 + .../bundled/patches/glibc-ppc64le-06.patch | 1 + .../bundled/patches/glibc-ppc64le-07.patch | 1 + .../bundled/patches/glibc-ppc64le-08.patch | 1 + .../bundled/patches/glibc-ppc64le-09.patch | 1 + .../bundled/patches/glibc-ppc64le-10.patch | 1 + .../bundled/patches/glibc-ppc64le-11.patch | 1 + .../bundled/patches/glibc-ppc64le-12.patch | 1 + .../bundled/patches/glibc-ppc64le-13.patch | 1 + .../bundled/patches/glibc-ppc64le-14.patch | 1 + .../bundled/patches/glibc-ppc64le-15.patch | 1 + .../bundled/patches/glibc-ppc64le-16.patch | 1 + .../bundled/patches/glibc-ppc64le-17.patch | 1 + .../bundled/patches/glibc-ppc64le-18.patch | 1 + .../bundled/patches/glibc-ppc64le-19.patch | 1 + .../bundled/patches/glibc-ppc64le-20.patch | 1 + .../bundled/patches/glibc-ppc64le-21.patch | 1 + .../bundled/patches/glibc-ppc64le-22.patch | 1 + .../bundled/patches/glibc-ppc64le-23.patch | 1 + .../bundled/patches/glibc-ppc64le-24.patch | 1 + .../bundled/patches/glibc-ppc64le-25.patch | 1 + .../bundled/patches/glibc-ppc64le-26.patch | 1 + .../bundled/patches/glibc-ppc64le-27.patch | 1 + .../bundled/patches/glibc-ppc64le-28.patch | 1 + .../bundled/patches/glibc-ppc64le-29.patch | 1 + .../bundled/patches/glibc-ppc64le-30.patch | 1 + .../bundled/patches/glibc-ppc64le-31.patch | 1 + .../bundled/patches/glibc-ppc64le-32.patch | 1 + .../bundled/patches/glibc-ppc64le-33.patch | 1 + .../bundled/patches/glibc-ppc64le-34.patch | 1 + .../bundled/patches/glibc-ppc64le-35.patch | 1 + .../bundled/patches/glibc-ppc64le-36.patch | 1 + .../bundled/patches/glibc-ppc64le-37.patch | 1 + .../bundled/patches/glibc-ppc64le-38.patch | 1 + .../bundled/patches/glibc-ppc64le-39.patch | 1 + .../bundled/patches/glibc-ppc64le-40.patch | 1 + .../bundled/patches/glibc-ppc64le-41.patch | 1 + .../bundled/patches/glibc-ppc64le-42.patch | 1 + .../bundled/patches/glibc-ppc64le-43.patch | 1 + .../bundled/patches/glibc-ppc64le-44.patch | 1 + .../bundled/patches/glibc-ppc64le-45.patch | 1 + .../bundled/patches/glibc-ppc64le-46.patch | 1 + .../patches/glibc-ppc64le-47-pwr6-mtfsf.patch | 1 + .../patches/glibc-ppc64le-48-ldbl_high.patch | 1 + .../patches/glibc_aarch64_relocation.patch | 206 +- .../bundled/patches/glibc_arm_gcc_fix.patch | 83 +- .../bundled/patches/glibc_gcc_version.patch | 12 +- .../bundled/patches/glibc_i686_asm.patch | 50 +- .../bundled/patches/glibc_make_version.patch | 33 +- .../patches/glibc_musl_rejection.patch | 177 +- .../patches/glibc_musl_rejection_old.patch | 13 +- .../bundled/patches/glibc_nocommon.patch | 12 +- .../patches/glibc_powerpc64le_gcc_fix.patch | 199 +- .../patches/glibc_regexp_nocommon.patch | 20 +- .../bundled/patches/glibc_sunrpc.patch | 21 +- .../bundled/patches/libtapi_fullyaml.patch | 14 +- .../bundled/patches/libtapi_musl.patch | 3852 +---------------- .../bundled/patches/mingw_gcc710_i686.patch | 64 +- .../binutils_freebsd_symbol_versioning.patch | 26 +- .../patches/gcc485_mingw_include.patch | 42 +- .../bundled/patches/glibc-ppc64le-01.patch | 1 + .../bundled/patches/glibc-ppc64le-02.patch | 1 + .../bundled/patches/glibc-ppc64le-03.patch | 1 + .../bundled/patches/glibc-ppc64le-04.patch | 1 + .../bundled/patches/glibc-ppc64le-05.patch | 1 + .../bundled/patches/glibc-ppc64le-06.patch | 1 + .../bundled/patches/glibc-ppc64le-07.patch | 1 + .../bundled/patches/glibc-ppc64le-08.patch | 1 + .../bundled/patches/glibc-ppc64le-09.patch | 1 + .../bundled/patches/glibc-ppc64le-10.patch | 1 + .../bundled/patches/glibc-ppc64le-11.patch | 1 + .../bundled/patches/glibc-ppc64le-12.patch | 1 + .../bundled/patches/glibc-ppc64le-13.patch | 1 + .../bundled/patches/glibc-ppc64le-14.patch | 1 + .../bundled/patches/glibc-ppc64le-15.patch | 1 + .../bundled/patches/glibc-ppc64le-16.patch | 1 + .../bundled/patches/glibc-ppc64le-17.patch | 1 + .../bundled/patches/glibc-ppc64le-18.patch | 1 + .../bundled/patches/glibc-ppc64le-19.patch | 1 + .../bundled/patches/glibc-ppc64le-20.patch | 1 + .../bundled/patches/glibc-ppc64le-21.patch | 1 + .../bundled/patches/glibc-ppc64le-22.patch | 1 + .../bundled/patches/glibc-ppc64le-23.patch | 1 + .../bundled/patches/glibc-ppc64le-24.patch | 1 + .../bundled/patches/glibc-ppc64le-25.patch | 1 + .../bundled/patches/glibc-ppc64le-26.patch | 1 + .../bundled/patches/glibc-ppc64le-27.patch | 1 + .../bundled/patches/glibc-ppc64le-28.patch | 1 + .../bundled/patches/glibc-ppc64le-29.patch | 1 + .../bundled/patches/glibc-ppc64le-30.patch | 1 + .../bundled/patches/glibc-ppc64le-31.patch | 1 + .../bundled/patches/glibc-ppc64le-32.patch | 1 + .../bundled/patches/glibc-ppc64le-33.patch | 1 + .../bundled/patches/glibc-ppc64le-34.patch | 1 + .../bundled/patches/glibc-ppc64le-35.patch | 1 + .../bundled/patches/glibc-ppc64le-36.patch | 1 + .../bundled/patches/glibc-ppc64le-37.patch | 1 + .../bundled/patches/glibc-ppc64le-38.patch | 1 + .../bundled/patches/glibc-ppc64le-39.patch | 1 + .../bundled/patches/glibc-ppc64le-40.patch | 1 + .../bundled/patches/glibc-ppc64le-41.patch | 1 + .../bundled/patches/glibc-ppc64le-42.patch | 1 + .../bundled/patches/glibc-ppc64le-43.patch | 1 + .../bundled/patches/glibc-ppc64le-44.patch | 1 + .../bundled/patches/glibc-ppc64le-45.patch | 1 + .../bundled/patches/glibc-ppc64le-46.patch | 1 + .../patches/glibc-ppc64le-47-pwr6-mtfsf.patch | 1 + .../patches/glibc-ppc64le-48-ldbl_high.patch | 1 + .../patches/glibc_aarch64_relocation.patch | 206 +- .../bundled/patches/glibc_arm_gcc_fix.patch | 83 +- .../bundled/patches/glibc_gcc_version.patch | 12 +- .../bundled/patches/glibc_i686_asm.patch | 50 +- .../bundled/patches/glibc_make_version.patch | 33 +- .../patches/glibc_musl_rejection.patch | 177 +- .../patches/glibc_musl_rejection_old.patch | 13 +- .../bundled/patches/glibc_nocommon.patch | 12 +- .../patches/glibc_powerpc64le_gcc_fix.patch | 199 +- .../patches/glibc_regexp_nocommon.patch | 20 +- .../bundled/patches/glibc_sunrpc.patch | 21 +- .../bundled/patches/libtapi_fullyaml.patch | 14 +- .../bundled/patches/libtapi_musl.patch | 3852 +---------------- .../bundled/patches/mingw_gcc710_i686.patch | 64 +- .../binutils_freebsd_symbol_versioning.patch | 26 +- .../patches/gcc485_mingw_include.patch | 42 +- .../bundled/patches/glibc-ppc64le-01.patch | 1 + .../bundled/patches/glibc-ppc64le-02.patch | 1 + .../bundled/patches/glibc-ppc64le-03.patch | 1 + .../bundled/patches/glibc-ppc64le-04.patch | 1 + .../bundled/patches/glibc-ppc64le-05.patch | 1 + .../bundled/patches/glibc-ppc64le-06.patch | 1 + .../bundled/patches/glibc-ppc64le-07.patch | 1 + .../bundled/patches/glibc-ppc64le-08.patch | 1 + .../bundled/patches/glibc-ppc64le-09.patch | 1 + .../bundled/patches/glibc-ppc64le-10.patch | 1 + .../bundled/patches/glibc-ppc64le-11.patch | 1 + .../bundled/patches/glibc-ppc64le-12.patch | 1 + .../bundled/patches/glibc-ppc64le-13.patch | 1 + .../bundled/patches/glibc-ppc64le-14.patch | 1 + .../bundled/patches/glibc-ppc64le-15.patch | 1 + .../bundled/patches/glibc-ppc64le-16.patch | 1 + .../bundled/patches/glibc-ppc64le-17.patch | 1 + .../bundled/patches/glibc-ppc64le-18.patch | 1 + .../bundled/patches/glibc-ppc64le-19.patch | 1 + .../bundled/patches/glibc-ppc64le-20.patch | 1 + .../bundled/patches/glibc-ppc64le-21.patch | 1 + .../bundled/patches/glibc-ppc64le-22.patch | 1 + .../bundled/patches/glibc-ppc64le-23.patch | 1 + .../bundled/patches/glibc-ppc64le-24.patch | 1 + .../bundled/patches/glibc-ppc64le-25.patch | 1 + .../bundled/patches/glibc-ppc64le-26.patch | 1 + .../bundled/patches/glibc-ppc64le-27.patch | 1 + .../bundled/patches/glibc-ppc64le-28.patch | 1 + .../bundled/patches/glibc-ppc64le-29.patch | 1 + .../bundled/patches/glibc-ppc64le-30.patch | 1 + .../bundled/patches/glibc-ppc64le-31.patch | 1 + .../bundled/patches/glibc-ppc64le-32.patch | 1 + .../bundled/patches/glibc-ppc64le-33.patch | 1 + .../bundled/patches/glibc-ppc64le-34.patch | 1 + .../bundled/patches/glibc-ppc64le-35.patch | 1 + .../bundled/patches/glibc-ppc64le-36.patch | 1 + .../bundled/patches/glibc-ppc64le-37.patch | 1 + .../bundled/patches/glibc-ppc64le-38.patch | 1 + .../bundled/patches/glibc-ppc64le-39.patch | 1 + .../bundled/patches/glibc-ppc64le-40.patch | 1 + .../bundled/patches/glibc-ppc64le-41.patch | 1 + .../bundled/patches/glibc-ppc64le-42.patch | 1 + .../bundled/patches/glibc-ppc64le-43.patch | 1 + .../bundled/patches/glibc-ppc64le-44.patch | 1 + .../bundled/patches/glibc-ppc64le-45.patch | 1 + .../bundled/patches/glibc-ppc64le-46.patch | 1 + .../patches/glibc-ppc64le-47-pwr6-mtfsf.patch | 1 + .../patches/glibc-ppc64le-48-ldbl_high.patch | 1 + .../patches/glibc_aarch64_relocation.patch | 206 +- .../bundled/patches/glibc_arm_gcc_fix.patch | 83 +- .../bundled/patches/glibc_gcc_version.patch | 12 +- .../bundled/patches/glibc_i686_asm.patch | 50 +- .../bundled/patches/glibc_make_version.patch | 32 +- .../patches/glibc_musl_rejection.patch | 177 +- .../patches/glibc_musl_rejection_old.patch | 13 +- .../bundled/patches/glibc_nocommon.patch | 12 +- .../patches/glibc_powerpc64le_gcc_fix.patch | 199 +- .../patches/glibc_regexp_nocommon.patch | 20 +- .../bundled/patches/glibc_sunrpc.patch | 21 +- .../bundled/patches/libtapi_fullyaml.patch | 14 +- .../bundled/patches/libtapi_musl.patch | 3852 +---------------- .../bundled/patches/mingw_gcc710_i686.patch | 64 +- 328 files changed, 328 insertions(+), 25246 deletions(-) mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/binutils_freebsd_symbol_versioning.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_freebsd_aligned_alloc.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_header_upgrades.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_libc_name_p.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_clock_gettime.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_include.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_osx_nodeadstrip.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_fake_510_musl.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_musl.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-01.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-02.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-03.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-04.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-05.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-06.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-07.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-08.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-09.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-10.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-11.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-12.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-13.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-14.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-15.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-16.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-17.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-18.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-19.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-20.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-21.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-22.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-23.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-24.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-25.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-26.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-27.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-28.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-29.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-30.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-31.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-32.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-33.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-34.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-35.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-36.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-37.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-38.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-39.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-40.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-41.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-42.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-43.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-44.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-45.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-46.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch create mode 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-48-ldbl_high.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_aarch64_relocation.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_arm_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_gcc_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_i686_asm.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_make_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection_old.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_powerpc64le_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_regexp_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/glibc_sunrpc.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_fullyaml.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_musl.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@5/bundled/patches/mingw_gcc710_i686.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/binutils_freebsd_symbol_versioning.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/gcc485_mingw_include.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-01.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-02.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-03.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-04.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-05.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-06.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-07.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-08.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-09.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-10.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-11.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-12.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-13.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-14.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-15.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-16.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-17.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-18.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-19.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-20.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-21.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-22.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-23.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-24.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-25.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-26.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-27.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-28.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-29.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-30.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-31.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-32.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-33.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-34.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-35.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-36.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-37.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-38.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-39.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-40.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-41.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-42.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-43.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-44.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-45.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-46.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch create mode 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-48-ldbl_high.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_aarch64_relocation.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_arm_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_gcc_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_i686_asm.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_make_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection_old.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_powerpc64le_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_regexp_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/glibc_sunrpc.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_fullyaml.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_musl.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@6/bundled/patches/mingw_gcc710_i686.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/binutils_freebsd_symbol_versioning.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/gcc485_mingw_include.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-01.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-02.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-03.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-04.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-05.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-06.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-07.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-08.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-09.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-10.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-11.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-12.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-13.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-14.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-15.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-16.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-17.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-18.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-19.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-20.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-21.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-22.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-23.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-24.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-25.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-26.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-27.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-28.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-29.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-30.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-31.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-32.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-33.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-34.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-35.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-36.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-37.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-38.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-39.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-40.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-41.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-42.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-43.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-44.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-45.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-46.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch create mode 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-48-ldbl_high.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_aarch64_relocation.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_arm_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_gcc_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_i686_asm.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_make_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection_old.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_powerpc64le_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_regexp_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/glibc_sunrpc.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_fullyaml.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_musl.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@7/bundled/patches/mingw_gcc710_i686.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/binutils_freebsd_symbol_versioning.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/gcc485_mingw_include.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-01.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-02.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-03.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-04.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-05.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-06.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-07.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-08.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-09.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-10.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-11.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-12.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-13.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-14.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-15.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-16.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-17.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-18.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-19.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-20.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-21.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-22.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-23.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-24.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-25.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-26.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-27.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-28.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-29.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-30.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-31.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-32.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-33.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-34.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-35.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-36.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-37.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-38.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-39.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-40.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-41.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-42.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-43.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-44.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-45.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-46.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch create mode 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-48-ldbl_high.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_aarch64_relocation.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_arm_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_gcc_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_i686_asm.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_make_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection_old.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_powerpc64le_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_regexp_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/glibc_sunrpc.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_fullyaml.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_musl.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@8/bundled/patches/mingw_gcc710_i686.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/binutils_freebsd_symbol_versioning.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/gcc485_mingw_include.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-01.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-02.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-03.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-04.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-05.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-06.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-07.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-08.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-09.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-10.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-11.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-12.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-13.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-14.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-15.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-16.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-17.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-18.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-19.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-20.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-21.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-22.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-23.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-24.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-25.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-26.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-27.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-28.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-29.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-30.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-31.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-32.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-33.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-34.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-35.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-36.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-37.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-38.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-39.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-40.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-41.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-42.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-43.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-44.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-45.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-46.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch create mode 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-48-ldbl_high.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_aarch64_relocation.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_arm_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_gcc_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_i686_asm.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_make_version.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection_old.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_powerpc64le_gcc_fix.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_regexp_nocommon.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/glibc_sunrpc.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_fullyaml.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_musl.patch mode change 100644 => 120000 0_RootFS/GCCBootstrap@9/bundled/patches/mingw_gcc710_i686.patch diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/binutils_freebsd_symbol_versioning.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/binutils_freebsd_symbol_versioning.patch deleted file mode 100644 index 02a73504795..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/binutils_freebsd_symbol_versioning.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc -index 444aef2942..8a3858d32b 100644 ---- a/ld/scripttempl/elf.sc -+++ b/ld/scripttempl/elf.sc -@@ -637,9 +637,9 @@ cat <&6; } - $as_echo "#define HAVE_ISNANL 1" >>confdefs.h - - fi -+ -+ for ac_func in aligned_alloc posix_memalign memalign _aligned_malloc -+do : -+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -+eval as_val=\$$as_ac_var -+ if test "x$as_val" = x""yes; then : -+ cat >>confdefs.h <<_ACEOF -+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -+_ACEOF -+ -+fi -+done -+ -+ - ;; - *-hpux*) - SECTION_FLAGS='-ffunction-sections -fdata-sections' -diff --git a/libstdc++-v3/crossconfig.m4 b/libstdc++-v3/crossconfig.m4 -index 943ea676ea2..947f8b5304c 100644 ---- a/libstdc++-v3/crossconfig.m4 -+++ b/libstdc++-v3/crossconfig.m4 -@@ -98,6 +98,7 @@ case "${host}" in - AC_DEFINE(HAVE_ISINFL) - AC_DEFINE(HAVE_ISNANL) - fi -+ AC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc) - ;; - *-hpux*) - SECTION_FLAGS='-ffunction-sections -fdata-sections' diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_freebsd_aligned_alloc.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_freebsd_aligned_alloc.patch new file mode 120000 index 00000000000..5f6f23b9888 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_freebsd_aligned_alloc.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_freebsd_aligned_alloc.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_header_upgrades.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_header_upgrades.patch deleted file mode 100644 index 44d74e6803d..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_header_upgrades.patch +++ /dev/null @@ -1,135 +0,0 @@ -diff --git a/gcc/config/mips/linux.h b/gcc/config/mips/linux.h -index 9b4c68db6ee..e539422d48d 100644 ---- a/gcc/config/mips/linux.h -+++ b/gcc/config/mips/linux.h -@@ -1,5 +1,5 @@ - /* Definitions for MIPS running Linux-based GNU systems with ELF format. -- Copyright (C) 1998-2013 Free Software Foundation, Inc. -+ Copyright (C) 1998-2014 Free Software Foundation, Inc. - - This file is part of GCC. - -@@ -17,4 +17,9 @@ You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ - --#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+#define GLIBC_DYNAMIC_LINKER \ -+ "%{mnan=2008:/lib/ld-linux-mipsn8.so.1;:/lib/ld.so.1}" -+ -+#undef UCLIBC_DYNAMIC_LINKER -+#define UCLIBC_DYNAMIC_LINKER \ -+ "%{mnan=2008:/lib/ld-uClibc-mipsn8.so.0;:/lib/ld-uClibc.so.0}" -diff --git a/gcc/config/linux.h b/gcc/config/linux.h -index 2be1079b92f..d38ef81e34f 100644 ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -2,7 +2,7 @@ - MMU, using ELF at the compiler level but possibly FLT for final - linked executables and shared libraries in some no-MMU cases, and - possibly with a choice of libc implementations. -- Copyright (C) 1995-2013 Free Software Foundation, Inc. -+ Copyright (C) 1995-2014 Free Software Foundation, Inc. - Contributed by Eric Youngdale. - Modified for stabs-in-ELF by H.J. Lu (hjl@lucon.org). - -@@ -95,15 +95,35 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ - BIONIC_DYNAMIC_LINKERX32) - --/* Determine whether the entire c99 runtime -- is present in the runtime library. */ --#undef TARGET_C99_FUNCTIONS --#define TARGET_C99_FUNCTIONS (OPTION_GLIBC) -- --/* Whether we have sincos that follows the GNU extension. */ --#undef TARGET_HAS_SINCOS --#define TARGET_HAS_SINCOS (OPTION_GLIBC || OPTION_BIONIC) -- - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) -+ -+#if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ -+/* This is a *uclinux* target. We don't define below macros to normal linux -+ versions, because doing so would require *uclinux* targets to include -+ linux.c, linux-protos.h, linux.opt, etc. We could, alternatively, add -+ these files to *uclinux* targets, but that would only pollute option list -+ (add -mglibc, etc.) without adding any useful support. */ -+ -+/* Define TARGET_LIBC_HAS_FUNCTION for *uclinux* targets to -+ no_c99_libc_has_function, because uclibc does not, normally, have -+ c99 runtime. If, in special cases, uclibc does have c99 runtime, -+ this should be defined to a new hook. Also please note that for targets -+ like *-linux-uclibc that similar check will also need to be added to -+ linux_libc_has_function. */ -+# undef TARGET_LIBC_HAS_FUNCTION -+# define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function -+ -+#else /* !uClinux, i.e., normal Linux */ -+ -+/* IFUNCs are supported by glibc, but not by uClibc or Bionic. */ -+# undef TARGET_HAS_IFUNC_P -+# define TARGET_HAS_IFUNC_P linux_has_ifunc_p -+ -+/* Determine what functions are present at the runtime; -+ this includes full c99 runtime and sincos. */ -+# undef TARGET_LIBC_HAS_FUNCTION -+# define TARGET_LIBC_HAS_FUNCTION linux_libc_has_function -+ -+#endif -diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h -index a012baed284..88e5206e63a 100644 ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -1,5 +1,5 @@ - /* Machine description for AArch64 architecture. -- Copyright (C) 2009-2013 Free Software Foundation, Inc. -+ Copyright (C) 2009-2014 Free Software Foundation, Inc. - Contributed by ARM Ltd. - - This file is part of GCC. -@@ -21,7 +21,7 @@ - #ifndef GCC_AARCH64_LINUX_H - #define GCC_AARCH64_LINUX_H - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64.so.1" -+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" - - #define CPP_SPEC "%{pthread:-D_REENTRANT}" - -@@ -29,10 +29,12 @@ - %{static:-Bstatic} \ - %{shared:-shared} \ - %{symbolic:-Bsymbolic} \ -- %{rdynamic:-export-dynamic} \ -- -dynamic-linker " GNU_USER_DYNAMIC_LINKER " \ -+ %{!static: \ -+ %{rdynamic:-export-dynamic} \ -+ %{!shared:-dynamic-linker " GNU_USER_DYNAMIC_LINKER "}} \ - -X \ -- %{mbig-endian:-EB} %{mlittle-endian:-EL}" -+ %{mbig-endian:-EB} %{mlittle-endian:-EL} \ -+ -maarch64linux%{mbig-endian:b}" - - #ifdef TARGET_FIX_ERR_A53_835769_DEFAULT - #define CA53_ERR_835769_SPEC \ -@@ -42,8 +44,17 @@ - " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}" - #endif - -+#ifdef TARGET_FIX_ERR_A53_843419_DEFAULT -+#define CA53_ERR_843419_SPEC \ -+ " %{!mno-fix-cortex-a53-843419:--fix-cortex-a53-843419}" -+#else -+#define CA53_ERR_843419_SPEC \ -+ " %{mfix-cortex-a53-843419:--fix-cortex-a53-843419}" -+#endif -+ - #define LINK_SPEC LINUX_TARGET_LINK_SPEC \ -- CA53_ERR_835769_SPEC -+ CA53_ERR_835769_SPEC \ -+ CA53_ERR_843419_SPEC - - #define TARGET_OS_CPP_BUILTINS() \ - do \ diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_header_upgrades.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_header_upgrades.patch new file mode 120000 index 00000000000..dc6c48c838a --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_header_upgrades.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_header_upgrades.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_libc_name_p.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_libc_name_p.patch deleted file mode 100644 index 03768724513..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_libc_name_p.patch +++ /dev/null @@ -1,149 +0,0 @@ -From ec1cc0263f156f70693a62cf17b254a0029f4852 Mon Sep 17 00:00:00 2001 -From: edlinger -Date: Fri, 19 Feb 2016 22:13:29 +0000 -Subject: [PATCH] 2016-02-19 Jakub Jelinek - Bernd Edlinger - - * Make-lang.in: Invoke gperf with -L C++. - * cfns.gperf: Remove prototypes for hash and libc_name_p - inlines. - * cfns.h: Regenerated. - * except.c (nothrow_libfn_p): Adjust. - - -git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233572 138bc75d-0d04-0410-961f-82ee72b054a4 ---- - gcc/cp/Make-lang.in | 2 +- - gcc/cp/cfns.gperf | 10 ++-------- - gcc/cp/cfns.h | 41 ++++++++++++++--------------------------- - gcc/cp/except.c | 3 ++- - 5 files changed, 28 insertions(+), 37 deletions(-) - -diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in -index 671ce12..2286c64 100644 ---- a/gcc/cp/Make-lang.in -+++ b/gcc/cp/Make-lang.in -@@ -112,7 +112,7 @@ else - # deleting the $(srcdir)/cp/cfns.h file. - $(srcdir)/cp/cfns.h: - endif -- gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L ANSI-C \ -+ gperf -o -C -E -k '1-6,$$' -j1 -D -N 'libc_name_p' -L C++ \ - $(srcdir)/cp/cfns.gperf --output-file $(srcdir)/cp/cfns.h - - # -diff --git a/gcc/cp/cfns.gperf b/gcc/cp/cfns.gperf -index 2784edc..8d7f015 100644 ---- a/gcc/cp/cfns.gperf -+++ b/gcc/cp/cfns.gperf -@@ -1,3 +1,5 @@ -+%language=C++ -+%define class-name libc_name - %{ - /* Copyright (C) 2000-2016 Free Software Foundation, Inc. - -@@ -16,14 +18,6 @@ for more details. - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ --#ifdef __GNUC__ --__inline --#endif --static unsigned int hash (const char *, unsigned int); --#ifdef __GNUC__ --__inline --#endif --const char * libc_name_p (const char *, unsigned int); - %} - %% - # The standard C library functions, for feeding to gperf; the result is used -diff --git a/gcc/cp/cfns.h b/gcc/cp/cfns.h -index d8e02c9..9a37249 100644 ---- a/gcc/cp/cfns.h -+++ b/gcc/cp/cfns.h -@@ -1,5 +1,5 @@ --/* ANSI-C code produced by gperf version 3.0.3 */ --/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L ANSI-C cfns.gperf */ -+/* C++ code produced by gperf version 3.0.4 */ -+/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p -L C++ --output-file cfns.h cfns.gperf */ - - #if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ -@@ -28,7 +28,7 @@ - #error "gperf generated tables don't work with this execution character set. Please report a bug to ." - #endif - --#line 1 "cfns.gperf" -+#line 3 "cfns.gperf" - - /* Copyright (C) 2000-2016 Free Software Foundation, Inc. - -@@ -47,25 +47,18 @@ for more details. - You should have received a copy of the GNU General Public License - along with GCC; see the file COPYING3. If not see - . */ --#ifdef __GNUC__ --__inline --#endif --static unsigned int hash (const char *, unsigned int); --#ifdef __GNUC__ --__inline --#endif --const char * libc_name_p (const char *, unsigned int); - /* maximum key range = 391, duplicates = 0 */ - --#ifdef __GNUC__ --__inline --#else --#ifdef __cplusplus --inline --#endif --#endif --static unsigned int --hash (register const char *str, register unsigned int len) -+class libc_name -+{ -+private: -+ static inline unsigned int hash (const char *str, unsigned int len); -+public: -+ static const char *libc_name_p (const char *str, unsigned int len); -+}; -+ -+inline unsigned int -+libc_name::hash (register const char *str, register unsigned int len) - { - static const unsigned short asso_values[] = - { -@@ -122,14 +115,8 @@ hash (register const char *str, register unsigned int len) - return hval + asso_values[(unsigned char)str[len - 1]]; - } - --#ifdef __GNUC__ --__inline --#ifdef __GNUC_STDC_INLINE__ --__attribute__ ((__gnu_inline__)) --#endif --#endif - const char * --libc_name_p (register const char *str, register unsigned int len) -+libc_name::libc_name_p (register const char *str, register unsigned int len) - { - enum - { -diff --git a/gcc/cp/except.c b/gcc/cp/except.c -index c73a16b..5336710 100644 ---- a/gcc/cp/except.c -+++ b/gcc/cp/except.c -@@ -1040,7 +1040,8 @@ nothrow_libfn_p (const_tree fn) - unless the system headers are playing rename tricks, and if - they are, we don't want to be confused by them. */ - id = DECL_NAME (fn); -- return !!libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id)); -+ return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id), -+ IDENTIFIER_LENGTH (id)); - } - - /* Returns nonzero if an exception of type FROM will be caught by a --- -2.9.3 - diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_libc_name_p.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_libc_name_p.patch new file mode 120000 index 00000000000..3c33d3e2611 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_libc_name_p.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_libc_name_p.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_clock_gettime.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_clock_gettime.patch deleted file mode 100644 index e6ed97b87ee..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_clock_gettime.patch +++ /dev/null @@ -1,218 +0,0 @@ -commit 2aa662f21225bfbe0e048c9e0e014aa74aa6e3f7 -Author: Elliot Saba -Date: Tue Sep 18 21:09:04 2018 +0000 - - PR 56919 Improve SYSTEM_CLOCK intrinsic on Windows. - - frontend ChangeLog: - - 2013-04-15 Janne Blomqvist - - PR fortran/56919 - * intrinsics.texi (SYSTEM_CLOCK): Update documentation. - - libgfortran ChangeLog: - - 2013-04-15 Janne Blomqvist - - PR fortran/56919 - * intrinsics/time_1.h: Check __CYGWIN__ in addition to - __MINGW32__. - * intrinsics/system_clock.c (GF_CLOCK_MONOTONIC): Check - _POSIX_MONOTONIC_CLOCK as well. - (system_clock_4): Use GetTickCount on Windows. - (system_clock_8): Use QueryPerformanceCounter and - QueryPerformanceCounterFrequency on Windows. - - git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197968 138bc75d-0d04-0410-961f-82ee72b054a4 - -diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi -index a3b80aa779c..0d08cd17662 100644 ---- a/gcc/fortran/intrinsic.texi -+++ b/gcc/fortran/intrinsic.texi -@@ -12076,27 +12076,38 @@ and should considered in new code for future portability. - @item @emph{Description}: - Determines the @var{COUNT} of a processor clock since an unspecified - time in the past modulo @var{COUNT_MAX}, @var{COUNT_RATE} determines --the number of clock ticks per second. If the platform supports a high --resolution monotonic clock, that clock is used and can provide up to --nanosecond resolution. If a high resolution monotonic clock is not --available, the implementation falls back to a potentially lower --resolution realtime clock. -- --@var{COUNT_RATE} is system dependent and can vary depending on the kind of the --arguments. For @var{kind=4} arguments, @var{COUNT} usually represents --milliseconds, while for @var{kind=8} arguments, @var{COUNT} typically --represents micro- or nanoseconds. @var{COUNT_MAX} usually equals --@code{HUGE(COUNT_MAX)}. -- --If there is no clock, @var{COUNT} is set to @code{-HUGE(COUNT)}, and --@var{COUNT_RATE} and @var{COUNT_MAX} are set to zero. -- --When running on a platform using the GNU C library (glibc), or a --derivative thereof, the high resolution monotonic clock is available --only when linking with the @var{rt} library. This can be done --explicitly by adding the @code{-lrt} flag when linking the -+the number of clock ticks per second. If the platform supports a -+monotonic clock, that clock is used and can, depending on the platform -+clock implementation, provide up to nanosecond resolution. If a -+monotonic clock is not available, the implementation falls back to a -+realtime clock. -+ -+@var{COUNT_RATE} is system dependent and can vary depending on the -+kind of the arguments. For @var{kind=4} arguments, @var{COUNT} -+represents milliseconds, while for @var{kind=8} arguments, @var{COUNT} -+typically represents micro- or nanoseconds depending on resolution of -+the underlying platform clock. @var{COUNT_MAX} usually equals -+@code{HUGE(COUNT_MAX)}. Note that the millisecond resolution of the -+@var{kind=4} version implies that the @var{COUNT} will wrap around in -+roughly 25 days. In order to avoid issues with the wrap around and for -+more precise timing, please use the @var{kind=4} version. -+ -+If there is no clock, or querying the clock fails, @var{COUNT} is set -+to @code{-HUGE(COUNT)}, and @var{COUNT_RATE} and @var{COUNT_MAX} are -+set to zero. -+ -+When running on a platform using the GNU C library (glibc) version -+2.16 or older, or a derivative thereof, the high resolution monotonic -+clock is available only when linking with the @var{rt} library. This -+can be done explicitly by adding the @code{-lrt} flag when linking the - application, but is also done implicitly when using OpenMP. - -+On the Windows platform, the version with @var{kind=4} arguments uses -+the @code{GetTickCount} function, whereas the @var{kind=8} version -+uses @code{QueryPerformanceCounter} and -+@code{QueryPerformanceCounterFrequency}. For more information, and -+potential caveats, please see the platform documentation. -+ - @item @emph{Standard}: - Fortran 95 and later - -diff --git a/libgfortran/intrinsics/system_clock.c b/libgfortran/intrinsics/system_clock.c -index 63ea393f6a6..74a294db810 100644 ---- a/libgfortran/intrinsics/system_clock.c -+++ b/libgfortran/intrinsics/system_clock.c -@@ -29,6 +29,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #include "time_1.h" - - -+#if !defined(__MINGW32__) && !defined(__CYGWIN__) -+ - /* POSIX states that CLOCK_REALTIME must be present if clock_gettime - is available, others are optional. */ - #if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_CLOCK_GETTIME_LIBRT) -@@ -40,10 +42,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see - #endif - #endif - --/* Weakref trickery for clock_gettime(). On Glibc, clock_gettime() -- requires us to link in librt, which also pulls in libpthread. In -- order to avoid this by default, only call clock_gettime() through a -- weak reference. -+/* Weakref trickery for clock_gettime(). On Glibc <= 2.16, -+ clock_gettime() requires us to link in librt, which also pulls in -+ libpthread. In order to avoid this by default, only call -+ clock_gettime() through a weak reference. - - Some targets don't support weak undefined references; on these - GTHREAD_USE_WEAK is 0. So we need to define it to 1 on other -@@ -106,6 +108,8 @@ gf_gettime_mono (time_t * secs, long * nanosecs, long * tck) - #endif - } - -+#endif /* !__MINGW32 && !__CYGWIN__ */ -+ - extern void system_clock_4 (GFC_INTEGER_4 *, GFC_INTEGER_4 *, GFC_INTEGER_4 *); - export_proto(system_clock_4); - -@@ -116,12 +120,28 @@ export_proto(system_clock_8); - /* prefix(system_clock_4) is the INTEGER(4) version of the SYSTEM_CLOCK - intrinsic subroutine. It returns the number of clock ticks for the current - system time, the number of ticks per second, and the maximum possible value -- for COUNT. On the first call to SYSTEM_CLOCK, COUNT is set to zero. */ -+ for COUNT. */ - - void - system_clock_4(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate, - GFC_INTEGER_4 *count_max) - { -+#if defined(__MINGW32__) || defined(__CYGWIN__) -+ if (count) -+ { -+ /* Use GetTickCount here as the resolution and range is -+ sufficient for the INTEGER(kind=4) version, and -+ QueryPerformanceCounter has potential issues. */ -+ uint32_t cnt = GetTickCount (); -+ if (cnt > GFC_INTEGER_4_HUGE) -+ cnt -= GFC_INTEGER_4_HUGE - 1; -+ *count = cnt; -+ } -+ if (count_rate) -+ *count_rate = 1000; -+ if (count_max) -+ *count_max = GFC_INTEGER_4_HUGE; -+#else - GFC_INTEGER_4 cnt; - GFC_INTEGER_4 mx; - -@@ -159,6 +179,7 @@ system_clock_4(GFC_INTEGER_4 *count, GFC_INTEGER_4 *count_rate, - *count_rate = tck; - if (count_max != NULL) - *count_max = mx; -+#endif - } - - -@@ -168,6 +189,33 @@ void - system_clock_8 (GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate, - GFC_INTEGER_8 *count_max) - { -+#if defined(__MINGW32__) || defined(__CYGWIN__) -+ LARGE_INTEGER cnt; -+ LARGE_INTEGER freq; -+ int fail = 0; -+ if (count && !QueryPerformanceCounter (&cnt)) -+ fail = 1; -+ if (count_rate && !QueryPerformanceFrequency (&freq)) -+ fail = 1; -+ if (fail) -+ { -+ if (count) -+ *count = - GFC_INTEGER_8_HUGE; -+ if (count_rate) -+ *count_rate = 0; -+ if (count_max) -+ *count_max = 0; -+ } -+ else -+ { -+ if (count) -+ *count = cnt.QuadPart; -+ if (count_rate) -+ *count_rate = freq.QuadPart; -+ if (count_max) -+ *count_max = GFC_INTEGER_8_HUGE; -+ } -+#else - GFC_INTEGER_8 cnt; - GFC_INTEGER_8 mx; - -@@ -205,4 +253,5 @@ system_clock_8 (GFC_INTEGER_8 *count, GFC_INTEGER_8 *count_rate, - *count_rate = tck; - if (count_max != NULL) - *count_max = mx; -+#endif - } -diff --git a/libgfortran/intrinsics/time_1.h b/libgfortran/intrinsics/time_1.h -index f21e0ea9298..de6472c6262 100644 ---- a/libgfortran/intrinsics/time_1.h -+++ b/libgfortran/intrinsics/time_1.h -@@ -101,7 +101,7 @@ localtime_r (const time_t * timep, struct tm * result) - CPU_TIME intrinsics. Returns 0 for success or -1 if no - CPU time could be computed. */ - --#ifdef __MINGW32__ -+#if defined(__MINGW32__) || defined(__CYGWIN__) - - #define WIN32_LEAN_AND_MEAN - #include diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_clock_gettime.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_clock_gettime.patch new file mode 120000 index 00000000000..ca934b68386 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_clock_gettime.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_mingw_clock_gettime.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_include.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_include.patch deleted file mode 100644 index f60ce44456f..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_include.patch +++ /dev/null @@ -1,41 +0,0 @@ -commit ff41dadb7e0d9664eaa91271e00f4ee4e1cef4bb -Author: Elliot Saba -Date: Mon Sep 17 10:15:44 2018 +0000 - - GCC 4.8.X is too old to understand the `configure` argument `--with-native-system-header-dir=` - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index b09a763d525..afe7ec1579d 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1504,7 +1504,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) - tmake_file="${tmake_file} i386/t-mingw-w32" - ;; - esac -- native_system_header_dir=/mingw/include -+ native_system_header_dir=/include - target_gtfiles="\$(srcdir)/config/i386/winnt.c" - extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" - case ${target} in -diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h -index 1ac55441725..74641126007 100644 ---- a/gcc/config/i386/mingw32.h -+++ b/gcc/config/i386/mingw32.h -@@ -152,7 +152,7 @@ along with GCC; see the file COPYING3. If not see - - /* Override startfile prefix defaults. */ - #ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/mingw/lib/" -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" - #endif - #ifndef STANDARD_STARTFILE_PREFIX_2 - #define STANDARD_STARTFILE_PREFIX_2 "" -@@ -161,7 +161,7 @@ along with GCC; see the file COPYING3. If not see - /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR - macro contains POSIX-style path. See bug 52947. */ - #undef NATIVE_SYSTEM_HEADER_DIR --#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" -+#define NATIVE_SYSTEM_HEADER_DIR "/include" - - /* Output STRING, a string representing a filename, to FILE. - We canonicalize it to be in Unix format (backslashes are replaced diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_include.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_include.patch new file mode 120000 index 00000000000..a2b50298a2a --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_mingw_include.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_mingw_include.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_osx_nodeadstrip.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_osx_nodeadstrip.patch deleted file mode 100644 index a7e158ca364..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_osx_nodeadstrip.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 82f81877458ea372176eabb5de36329431dce99b Mon Sep 17 00:00:00 2001 -From: Iain Sandoe -Date: Sat, 21 Dec 2013 00:30:18 +0000 -Subject: [PATCH] don't try to mark local symbols as no-dead-strip - ---- - gcc/config/darwin.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c -index 40804b8..0080299 100644 ---- a/gcc/config/darwin.c -+++ b/gcc/config/darwin.c -@@ -1259,6 +1259,11 @@ darwin_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) - void - darwin_mark_decl_preserved (const char *name) - { -+ /* Actually we shouldn't mark any local symbol this way, but for now -+ this only happens with ObjC meta-data. */ -+ if (darwin_label_is_anonymous_local_objc_name (name)) -+ return; -+ - fprintf (asm_out_file, "\t.no_dead_strip "); - assemble_name (asm_out_file, name); - fputc ('\n', asm_out_file); --- -2.2.1 diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_osx_nodeadstrip.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_osx_nodeadstrip.patch new file mode 120000 index 00000000000..921c18f82c3 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_osx_nodeadstrip.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_osx_nodeadstrip.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch deleted file mode 100644 index ef8c885997b..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/gcc/configure b/gcc/configure -index f247c8a357c..c3d4ec719eb 100755 ---- a/gcc/configure -+++ b/gcc/configure -@@ -3320,9 +3320,9 @@ if test x${gcc_gxx_include_dir} = x; then - gcc_gxx_include_dir='${libsubdir}/include/c++' - else - libstdcxx_incdir='include/c++/$(version)' -- if test x$host != x$target; then -+ #if test x$host != x$target; then - libstdcxx_incdir="$target_alias/$libstdcxx_incdir" -- fi -+ #fi - gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" - fi - fi diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch new file mode 120000 index 00000000000..d369ff00200 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_triplet_prefixed_cxx_headers.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_fake_510_musl.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_fake_510_musl.patch deleted file mode 100644 index 6ca32f8bd7e..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_fake_510_musl.patch +++ /dev/null @@ -1,10 +0,0 @@ -Index: b/gcc/config/aarch64/aarch64-linux.h -=================================================================== ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -22,4 +22,4 @@ - #define GCC_AARCH64_LINUX_H - --#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" -+#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" - diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_fake_510_musl.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_fake_510_musl.patch new file mode 120000 index 00000000000..4532e16111e --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_fake_510_musl.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc494_fake_510_musl.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_musl.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_musl.patch deleted file mode 100644 index d8480dcac23..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_musl.patch +++ /dev/null @@ -1,614 +0,0 @@ -Add musl support to gcc - -This patch comes from the musl-cross project at -https://bitbucket.org/GregorR/musl-cross/src. Compared to the upstream version: - - * the config.sub modifications have been removed, because Buildroot - already overwrites all config.sub with a more recent config.sub - that has musl support. - - * change to ensure that a dummy dynamic linker path - MUSL_DYNAMIC_LINKER is defined for all architectures, - otherwise building gcc for architectures not supported by musl was - causing build failure. Bug reported upstream at - https://bitbucket.org/GregorR/musl-gcc-patches/issue/4/musl-gcc-patches-break-the-build-on. - - * change the USE_PT_GNU_EH_FRAME logic to keep the existing gcc logic - and only add the musl one as an addition, not as a replacement. Not - doing this breaks C++ exception handling with glibc, because - USE_PT_GNU_EH_FRAME doesn't get defined due to the configure script - not testing dl_iterate_phdr() on any system except Solaris. - -[Gustavo: remove upstream applied gcc/config/sh/sh.c chunk for 4.9.1] -Signed-off-by: Thomas Petazzoni ---- - -Index: b/fixincludes/mkfixinc.sh -=================================================================== ---- a/fixincludes/mkfixinc.sh -+++ b/fixincludes/mkfixinc.sh -@@ -19,7 +19,8 @@ - powerpc-*-eabi* | \ - powerpc-*-rtems* | \ - powerpcle-*-eabisim* | \ -- powerpcle-*-eabi* ) -+ powerpcle-*-eabi* | \ -+ *-musl* ) - # IF there is no include fixing, - # THEN create a no-op fixer and exit - (echo "#! /bin/sh" ; echo "exit 0" ) > ${target} -Index: b/gcc/config.gcc -=================================================================== ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -594,7 +594,7 @@ - esac - - # Common C libraries. --tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3" -+tm_defines="$tm_defines LIBC_GLIBC=1 LIBC_UCLIBC=2 LIBC_BIONIC=3 LIBC_MUSL=4" - - # 32-bit x86 processors supported by --with-arch=. Each processor - # MUST be separated by exactly one space. -@@ -719,6 +719,9 @@ - *-*-*uclibc*) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_UCLIBC" - ;; -+ *-*-*musl*) -+ tm_defines="$tm_defines DEFAULT_LIBC=LIBC_MUSL" -+ ;; - *) - tm_defines="$tm_defines DEFAULT_LIBC=LIBC_GLIBC" - ;; -@@ -2338,6 +2341,10 @@ - powerpc*-*-linux*paired*) - tm_file="${tm_file} rs6000/750cl.h" ;; - esac -+ case ${target} in -+ *-linux*-musl*) -+ enable_secureplt=yes ;; -+ esac - if test x${enable_secureplt} = xyes; then - tm_file="rs6000/secureplt.h ${tm_file}" - fi -Index: b/gcc/config/aarch64/aarch64-linux.h -=================================================================== ---- a/gcc/config/aarch64/aarch64-linux.h -+++ b/gcc/config/aarch64/aarch64-linux.h -@@ -22,6 +22,8 @@ - #define GCC_AARCH64_LINUX_H - - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}.so.1" -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64.so.1" - - #define CPP_SPEC "%{pthread:-D_REENTRANT}" - -Index: b/gcc/config/arm/linux-eabi.h -=================================================================== ---- a/gcc/config/arm/linux-eabi.h -+++ b/gcc/config/arm/linux-eabi.h -@@ -77,6 +77,23 @@ - %{mfloat-abi=soft*:" GLIBC_DYNAMIC_LINKER_SOFT_FLOAT "} \ - %{!mfloat-abi=*:" GLIBC_DYNAMIC_LINKER_DEFAULT "}" - -+/* For ARM musl currently supports four dynamic linkers: -+ - ld-musl-arm.so.1 - for the EABI-derived soft-float ABI -+ - ld-musl-armhf.so.1 - for the EABI-derived hard-float ABI -+ - ld-musl-armeb.so.1 - for the EABI-derived soft-float ABI, EB -+ - ld-musl-armebhf.so.1 - for the EABI-derived hard-float ABI, EB -+ musl does not support the legacy OABI mode. -+ All the dynamic linkers live in /lib. -+ We default to soft-float, EL. */ -+#undef MUSL_DYNAMIC_LINKER -+#if TARGET_BIG_ENDIAN_DEFAULT -+#define MUSL_DYNAMIC_LINKER_E "%{mlittle-endian:;:eb}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{mbig-endian:eb}" -+#endif -+#define MUSL_DYNAMIC_LINKER \ -+ "/lib/ld-musl-arm" MUSL_DYNAMIC_LINKER_E "%{mfloat-abi=hard:hf}.so.1" -+ - /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to - use the GNU/Linux version, not the generic BPABI version. */ - #undef LINK_SPEC -Index: b/gcc/config/i386/linux.h -=================================================================== ---- a/gcc/config/i386/linux.h -+++ b/gcc/config/i386/linux.h -@@ -21,3 +21,5 @@ - - #define GNU_USER_LINK_EMULATION "elf_i386" - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-i386.so.1" -Index: b/gcc/config/i386/linux64.h -=================================================================== ---- a/gcc/config/i386/linux64.h -+++ b/gcc/config/i386/linux64.h -@@ -30,3 +30,10 @@ - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" - #define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" - #define GLIBC_DYNAMIC_LINKERX32 "/libx32/ld-linux-x32.so.2" -+ -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-i386.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-x86_64.so.1" -+#undef MUSL_DYNAMIC_LINKERX32 -+#define MUSL_DYNAMIC_LINKERX32 "/lib/ld-musl-x32.so.1" -Index: b/gcc/config/linux.h -=================================================================== ---- a/gcc/config/linux.h -+++ b/gcc/config/linux.h -@@ -32,10 +32,12 @@ - #define OPTION_GLIBC (DEFAULT_LIBC == LIBC_GLIBC) - #define OPTION_UCLIBC (DEFAULT_LIBC == LIBC_UCLIBC) - #define OPTION_BIONIC (DEFAULT_LIBC == LIBC_BIONIC) -+#define OPTION_MUSL (DEFAULT_LIBC == LIBC_MUSL) - #else - #define OPTION_GLIBC (linux_libc == LIBC_GLIBC) - #define OPTION_UCLIBC (linux_libc == LIBC_UCLIBC) - #define OPTION_BIONIC (linux_libc == LIBC_BIONIC) -+#define OPTION_MUSL (linux_libc == LIBC_MUSL) - #endif - - #define GNU_USER_TARGET_OS_CPP_BUILTINS() \ -@@ -53,18 +55,21 @@ - uClibc or Bionic is the default C library and whether - -muclibc or -mglibc or -mbionic has been passed to change the default. */ - --#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LD1, LD2, LD3) \ -- "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:" LD1 "}}" -+#define CHOOSE_DYNAMIC_LINKER1(LIBC1, LIBC2, LIBC3, LIBC4, LD1, LD2, LD3, LD4) \ -+ "%{" LIBC2 ":" LD2 ";:%{" LIBC3 ":" LD3 ";:%{" LIBC4 ":" LD4 ";:" LD1 "}}}" - - #if DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", G, U, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mglibc", "muclibc", "mbionic", "mmusl", G, U, B, M) - #elif DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", U, G, B) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("muclibc", "mglibc", "mbionic", "mmusl", U, G, B, M) - #elif DEFAULT_LIBC == LIBC_BIONIC --#define CHOOSE_DYNAMIC_LINKER(G, U, B) \ -- CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", B, G, U) -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mbionic", "mglibc", "muclibc", "mmusl", B, G, U, M) -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, B, M) \ -+ CHOOSE_DYNAMIC_LINKER1 ("mmusl", "mglibc", "muclibc", "mbionic", M, G, U, B) - #else - #error "Unsupported DEFAULT_LIBC" - #endif /* DEFAULT_LIBC */ -@@ -82,23 +87,103 @@ - #define BIONIC_DYNAMIC_LINKER64 "/system/bin/linker64" - #define BIONIC_DYNAMIC_LINKERX32 "/system/bin/linkerx32" - -+/* Musl dynamic linker paths must be defined on a per-architecture -+ basis, for each architecture supported by Musl. However, in order -+ to let other architectures continue to build with other C -+ libraries, we provide a dummy definition of the following defines. */ -+#define MUSL_DYNAMIC_LINKER "invalid" -+#define MUSL_DYNAMIC_LINKER32 "invalid" -+#define MUSL_DYNAMIC_LINKER64 "invalid" -+#define MUSL_DYNAMIC_LINKERX32 "invalid" -+ - #define GNU_USER_DYNAMIC_LINKER \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, \ -- BIONIC_DYNAMIC_LINKER) -+ BIONIC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - #define GNU_USER_DYNAMIC_LINKER32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, \ -- BIONIC_DYNAMIC_LINKER32) -+ BIONIC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, \ -- BIONIC_DYNAMIC_LINKER64) -+ BIONIC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - #define GNU_USER_DYNAMIC_LINKERX32 \ - CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKERX32, UCLIBC_DYNAMIC_LINKERX32, \ -- BIONIC_DYNAMIC_LINKERX32) -+ BIONIC_DYNAMIC_LINKERX32, MUSL_DYNAMIC_LINKER32) - - /* Whether we have Bionic libc runtime */ - #undef TARGET_HAS_BIONIC - #define TARGET_HAS_BIONIC (OPTION_BIONIC) - -+/* musl avoids problematic includes by rearranging the include directories. -+ * Unfortunately, this is mostly duplicated from cppdefault.c */ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define INCLUDE_DEFAULTS_MUSL_GPP \ -+ { GPLUSPLUS_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, \ -+ { GPLUSPLUS_TOOL_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 1 }, \ -+ { GPLUSPLUS_BACKWARD_INCLUDE_DIR, "G++", 1, 1, \ -+ GPLUSPLUS_INCLUDE_DIR_ADD_SYSROOT, 0 }, -+ -+#ifdef LOCAL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_LOCAL \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 2 }, \ -+ { LOCAL_INCLUDE_DIR, 0, 0, 1, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_LOCAL -+#endif -+ -+#ifdef PREFIX_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ { PREFIX_INCLUDE_DIR, 0, 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_PREFIX -+#endif -+ -+#ifdef CROSS_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_CROSS \ -+ { CROSS_INCLUDE_DIR, "GCC", 0, 0, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#ifdef TOOL_INCLUDE_DIR -+#define INCLUDE_DEFAULTS_MUSL_TOOL \ -+ { TOOL_INCLUDE_DIR, "BINUTILS", 0, 1, 0, 0}, -+#else -+#define INCLUDE_DEFAULTS_MUSL_TOOL -+#endif -+ -+#ifdef NATIVE_SYSTEM_HEADER_DIR -+#define INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 2 }, \ -+ { NATIVE_SYSTEM_HEADER_DIR, 0, 0, 0, 1, 0 }, -+#else -+#define INCLUDE_DEFAULTS_MUSL_NATIVE -+#endif -+ -+#if defined (CROSS_DIRECTORY_STRUCTURE) && !defined (TARGET_SYSTEM_ROOT) -+# undef INCLUDE_DEFAULTS_MUSL_LOCAL -+# define INCLUDE_DEFAULTS_MUSL_LOCAL -+# undef INCLUDE_DEFAULTS_MUSL_NATIVE -+# define INCLUDE_DEFAULTS_MUSL_NATIVE -+#else -+# undef INCLUDE_DEFAULTS_MUSL_CROSS -+# define INCLUDE_DEFAULTS_MUSL_CROSS -+#endif -+ -+#undef INCLUDE_DEFAULTS -+#define INCLUDE_DEFAULTS \ -+ { \ -+ INCLUDE_DEFAULTS_MUSL_GPP \ -+ INCLUDE_DEFAULTS_MUSL_PREFIX \ -+ INCLUDE_DEFAULTS_MUSL_CROSS \ -+ INCLUDE_DEFAULTS_MUSL_TOOL \ -+ INCLUDE_DEFAULTS_MUSL_NATIVE \ -+ { GCC_INCLUDE_DIR, "GCC", 0, 1, 0, 0 }, \ -+ { 0, 0, 0, 0, 0, 0 } \ -+ } -+#endif -+ - #if (DEFAULT_LIBC == LIBC_UCLIBC) && defined (SINGLE_LIBC) /* uClinux */ - /* This is a *uclinux* target. We don't define below macros to normal linux - versions, because doing so would require *uclinux* targets to include -Index: b/gcc/config/linux.opt -=================================================================== ---- a/gcc/config/linux.opt -+++ b/gcc/config/linux.opt -@@ -30,3 +30,7 @@ - muclibc - Target Report RejectNegative Var(linux_libc,LIBC_UCLIBC) Negative(mbionic) - Use uClibc C library -+ -+mmusl -+Target Report RejectNegative Var(linux_libc,LIBC_MUSL) Negative(mglibc) -+Use musl C library -Index: b/gcc/config/microblaze/linux.h -=================================================================== ---- a/gcc/config/microblaze/linux.h -+++ b/gcc/config/microblaze/linux.h -@@ -28,7 +28,23 @@ - #undef TLS_NEEDS_GOT - #define TLS_NEEDS_GOT 1 - --#define DYNAMIC_LINKER "/lib/ld.so.1" -+#if TARGET_BIG_ENDIAN_DEFAULT == 0 /* LE */ -+#define MUSL_DYNAMIC_LINKER_E "%{EB:;:el}" -+#else -+#define MUSL_DYNAMIC_LINKER_E "%{EL:el}" -+#endif -+ -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-microblaze" MUSL_DYNAMIC_LINKER_E ".so.1" -+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" -+ -+#if DEFAULT_LIBC == LIBC_MUSL -+#define DYNAMIC_LINKER MUSL_DYNAMIC_LINKER -+#else -+#define DYNAMIC_LINKER GLIBC_DYNAMIC_LINKER -+#endif -+ -+ - #undef SUBTARGET_EXTRA_SPECS - #define SUBTARGET_EXTRA_SPECS \ - { "dynamic_linker", DYNAMIC_LINKER } -Index: b/gcc/config/rs6000/linux64.h -=================================================================== ---- a/gcc/config/rs6000/linux64.h -+++ b/gcc/config/rs6000/linux64.h -@@ -371,17 +371,23 @@ - #endif - #define UCLIBC_DYNAMIC_LINKER32 "/lib/ld-uClibc.so.0" - #define UCLIBC_DYNAMIC_LINKER64 "/lib/ld64-uClibc.so.0" -+#undef MUSL_DYNAMIC_LINKER32 -+#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-powerpc.so.1" -+#undef MUSL_DYNAMIC_LINKER64 -+#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-powerpc64.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" - #elif DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER32 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32, MUSL_DYNAMIC_LINKER32) - #define GNU_USER_DYNAMIC_LINKER64 \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64, MUSL_DYNAMIC_LINKER64) - - #undef DEFAULT_ASM_ENDIAN - #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN) -Index: b/gcc/config/rs6000/secureplt.h -=================================================================== ---- a/gcc/config/rs6000/secureplt.h -+++ b/gcc/config/rs6000/secureplt.h -@@ -18,3 +18,4 @@ - . */ - - #define CC1_SECURE_PLT_DEFAULT_SPEC "-msecure-plt" -+#define LINK_SECURE_PLT_DEFAULT_SPEC "--secure-plt" -Index: b/gcc/config/rs6000/sysv4.h -=================================================================== ---- a/gcc/config/rs6000/sysv4.h -+++ b/gcc/config/rs6000/sysv4.h -@@ -537,6 +537,9 @@ - #ifndef CC1_SECURE_PLT_DEFAULT_SPEC - #define CC1_SECURE_PLT_DEFAULT_SPEC "" - #endif -+#ifndef LINK_SECURE_PLT_DEFAULT_SPEC -+#define LINK_SECURE_PLT_DEFAULT_SPEC "" -+#endif - - /* Pass -G xxx to the compiler. */ - #define CC1_SPEC "%{G*} %(cc1_cpu)" \ -@@ -585,7 +588,8 @@ - - /* Override the default target of the linker. */ - #define LINK_TARGET_SPEC \ -- ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") -+ ENDIAN_SELECT("", " --oformat elf32-powerpcle", "") \ -+ "%{!mbss-plt: %{!msecure-plt: %(link_secure_plt_default)}}" - - /* Any specific OS flags. */ - #define LINK_OS_SPEC "\ -@@ -763,15 +767,18 @@ - - #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" - #define UCLIBC_DYNAMIC_LINKER "/lib/ld-uClibc.so.0" -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-powerpc.so.1" - #if DEFAULT_LIBC == LIBC_UCLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{mmusl:" M ";:" U "}}" -+#elif DEFAULT_LIBC == LIBC_MUSL -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{mglibc:" G ";:%{muclibc:" U ";:" M "}}" - #elif !defined (DEFAULT_LIBC) || DEFAULT_LIBC == LIBC_GLIBC --#define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" -+#define CHOOSE_DYNAMIC_LINKER(G, U, M) "%{muclibc:" U ";:%{mmusl:" M ";:" G "}}" - #else - #error "Unsupported DEFAULT_LIBC" - #endif - #define GNU_USER_DYNAMIC_LINKER \ -- CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER) -+ CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER, UCLIBC_DYNAMIC_LINKER, MUSL_DYNAMIC_LINKER) - - #define LINK_OS_LINUX_SPEC "-m elf32ppclinux %{!shared: %{!static: \ - %{rdynamic:-export-dynamic} \ -@@ -894,6 +901,7 @@ - { "link_os_openbsd", LINK_OS_OPENBSD_SPEC }, \ - { "link_os_default", LINK_OS_DEFAULT_SPEC }, \ - { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ -+ { "link_secure_plt_default", LINK_SECURE_PLT_DEFAULT_SPEC }, \ - { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ - { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ - { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -Index: b/gcc/config/sh/linux.h -=================================================================== ---- a/gcc/config/sh/linux.h -+++ b/gcc/config/sh/linux.h -@@ -43,7 +43,15 @@ - - #define TARGET_ASM_FILE_END file_end_indicate_exec_stack - -+#if TARGET_BIG_ENDIAN_DEFAULT /* BE */ -+#define MUSL_DYNAMIC_LINKER_E "eb" -+#else -+#define MUSL_DYNAMIC_LINKER_E -+#endif -+ - #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux.so.2" -+#undef MUSL_DYNAMIC_LINKER -+#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-sh" MUSL_DYNAMIC_LINKER_E ".so.1" - - #undef SUBTARGET_LINK_EMUL_SUFFIX - #define SUBTARGET_LINK_EMUL_SUFFIX "_linux" -Index: b/gcc/configure -=================================================================== ---- a/gcc/configure -+++ b/gcc/configure -@@ -27601,6 +27601,9 @@ - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -Index: b/gcc/configure.ac -=================================================================== ---- a/gcc/configure.ac -+++ b/gcc/configure.ac -@@ -5173,6 +5173,9 @@ - gcc_cv_target_dl_iterate_phdr=no - fi - ;; -+ *-linux-musl*) -+ gcc_cv_target_dl_iterate_phdr=yes -+ ;; - esac - GCC_TARGET_TEMPLATE([TARGET_DL_ITERATE_PHDR]) - if test x$gcc_cv_target_dl_iterate_phdr = xyes; then -Index: b/gcc/ginclude/stddef.h -=================================================================== ---- a/gcc/ginclude/stddef.h -+++ b/gcc/ginclude/stddef.h -@@ -181,6 +181,7 @@ - #ifndef _GCC_SIZE_T - #ifndef _SIZET_ - #ifndef __size_t -+#ifndef __DEFINED_size_t /* musl */ - #define __size_t__ /* BeOS */ - #define __SIZE_T__ /* Cray Unicos/Mk */ - #define _SIZE_T -@@ -197,6 +198,7 @@ - #define ___int_size_t_h - #define _GCC_SIZE_T - #define _SIZET_ -+#define __DEFINED_size_t /* musl */ - #if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) \ - || defined(__FreeBSD_kernel__) - /* __size_t is a typedef on FreeBSD 5, must not trash it. */ -@@ -214,6 +216,7 @@ - typedef long ssize_t; - #endif /* __BEOS__ */ - #endif /* !(defined (__GNUG__) && defined (size_t)) */ -+#endif /* __DEFINED_size_t */ - #endif /* __size_t */ - #endif /* _SIZET_ */ - #endif /* _GCC_SIZE_T */ -Index: b/libgcc/unwind-dw2-fde-dip.c -=================================================================== ---- a/libgcc/unwind-dw2-fde-dip.c -+++ b/libgcc/unwind-dw2-fde-dip.c -@@ -73,6 +73,13 @@ - && defined(TARGET_DL_ITERATE_PHDR) \ - && defined(__sun__) && defined(__svr4__) - # define USE_PT_GNU_EH_FRAME -+ #endif -+ -+/* For musl libc, TARGET_DL_ITERATE_PHDR gets defined by the configure -+ script. */ -+#if !defined(inhibit_libc) && defined(HAVE_LD_EH_FRAME_HDR) \ -+ && defined(TARGET_DL_ITERATE_PHDR) -+# define USE_PT_GNU_EH_FRAME - #endif - - #if defined(USE_PT_GNU_EH_FRAME) -Index: b/libgomp/config/posix/time.c -=================================================================== ---- a/libgomp/config/posix/time.c -+++ b/libgomp/config/posix/time.c -@@ -28,6 +28,8 @@ - The following implementation uses the most simple POSIX routines. - If present, POSIX 4 clocks should be used instead. */ - -+#define _POSIX_C_SOURCE 199309L /* for clocks */ -+ - #include "libgomp.h" - #include - #if TIME_WITH_SYS_TIME -Index: b/libitm/config/arm/hwcap.cc -=================================================================== ---- a/libitm/config/arm/hwcap.cc -+++ b/libitm/config/arm/hwcap.cc -@@ -40,7 +40,11 @@ - - #ifdef __linux__ - #include -+#ifdef __GLIBC__ - #include -+#else -+#include -+#endif - #include - - static void __attribute__((constructor)) -Index: b/libitm/config/linux/x86/tls.h -=================================================================== ---- a/libitm/config/linux/x86/tls.h -+++ b/libitm/config/linux/x86/tls.h -@@ -25,16 +25,19 @@ - #ifndef LIBITM_X86_TLS_H - #define LIBITM_X86_TLS_H 1 - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - /* Use slots in the TCB head rather than __thread lookups. - GLIBC has reserved words 10 through 13 for TM. */ - #define HAVE_ARCH_GTM_THREAD 1 - #define HAVE_ARCH_GTM_THREAD_DISP 1 - #endif -+#endif - - #include "config/generic/tls.h" - --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 10) -+#if defined(__GLIBC_PREREQ) -+#if __GLIBC_PREREQ(2, 10) - namespace GTM HIDDEN { - - #ifdef __x86_64__ -@@ -101,5 +104,6 @@ - - } // namespace GTM - #endif /* >= GLIBC 2.10 */ -+#endif - - #endif // LIBITM_X86_TLS_H -Index: b/libstdc++-v3/configure.host -=================================================================== ---- a/libstdc++-v3/configure.host -+++ b/libstdc++-v3/configure.host -@@ -266,6 +266,13 @@ - os_include_dir="os/bsd/freebsd" - ;; - gnu* | linux* | kfreebsd*-gnu | knetbsd*-gnu) -+ # check for musl by target -+ case "${host_os}" in -+ *-musl*) -+ os_include_dir="os/generic" -+ ;; -+ *) -+ - if [ "$uclibc" = "yes" ]; then - os_include_dir="os/uclibc" - elif [ "$bionic" = "yes" ]; then -@@ -274,6 +281,9 @@ - os_include_dir="os/gnu-linux" - fi - ;; -+ -+ esac -+ ;; - hpux*) - os_include_dir="os/hpux" - ;; diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_musl.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_musl.patch new file mode 120000 index 00000000000..f6dddd157a2 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/gcc494_musl.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc494_musl.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-01.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-01.patch new file mode 120000 index 00000000000..c750d5a8835 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-01.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-01.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-02.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-02.patch new file mode 120000 index 00000000000..c2f8ca9cddb --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-02.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-02.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-03.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-03.patch new file mode 120000 index 00000000000..7f9b18ab810 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-03.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-03.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-04.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-04.patch new file mode 120000 index 00000000000..82f535d0ef6 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-04.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-04.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-05.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-05.patch new file mode 120000 index 00000000000..629c1a71ca7 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-05.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-05.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-06.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-06.patch new file mode 120000 index 00000000000..4682d7d2638 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-06.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-06.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-07.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-07.patch new file mode 120000 index 00000000000..ec0ff4fc245 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-07.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-07.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-08.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-08.patch new file mode 120000 index 00000000000..dd3d8002d07 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-08.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-08.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-09.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-09.patch new file mode 120000 index 00000000000..6160e1ff6c9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-09.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-09.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-10.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-10.patch new file mode 120000 index 00000000000..3b0eb446435 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-10.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-10.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-11.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-11.patch new file mode 120000 index 00000000000..1a8b2b1874a --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-11.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-11.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-12.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-12.patch new file mode 120000 index 00000000000..5c61ae4d308 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-12.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-12.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-13.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-13.patch new file mode 120000 index 00000000000..9fcd14da248 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-13.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-13.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-14.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-14.patch new file mode 120000 index 00000000000..2c105860a79 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-14.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-14.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-15.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-15.patch new file mode 120000 index 00000000000..553e804d24c --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-15.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-15.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-16.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-16.patch new file mode 120000 index 00000000000..45b396e6e16 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-16.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-16.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-17.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-17.patch new file mode 120000 index 00000000000..381198312d8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-17.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-17.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-18.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-18.patch new file mode 120000 index 00000000000..75da139edca --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-18.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-18.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-19.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-19.patch new file mode 120000 index 00000000000..15b94428f84 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-19.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-19.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-20.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-20.patch new file mode 120000 index 00000000000..363da6ff21d --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-20.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-20.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-21.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-21.patch new file mode 120000 index 00000000000..d0b5d34df23 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-21.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-21.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-22.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-22.patch new file mode 120000 index 00000000000..e33401a61ec --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-22.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-22.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-23.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-23.patch new file mode 120000 index 00000000000..e17c24162a4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-23.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-23.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-24.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-24.patch new file mode 120000 index 00000000000..dabf39e7b9c --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-24.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-24.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-25.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-25.patch new file mode 120000 index 00000000000..a1013682f68 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-25.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-25.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-26.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-26.patch new file mode 120000 index 00000000000..9d6541b9b82 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-26.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-26.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-27.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-27.patch new file mode 120000 index 00000000000..b4b0172a637 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-27.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-27.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-28.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-28.patch new file mode 120000 index 00000000000..422f6eab38f --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-28.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-28.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-29.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-29.patch new file mode 120000 index 00000000000..29c53da8ea3 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-29.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-29.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-30.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-30.patch new file mode 120000 index 00000000000..6d532a56d8d --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-30.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-30.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-31.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-31.patch new file mode 120000 index 00000000000..9b06be66e43 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-31.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-31.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-32.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-32.patch new file mode 120000 index 00000000000..ed3e7f02517 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-32.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-32.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-33.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-33.patch new file mode 120000 index 00000000000..468c085f789 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-33.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-33.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-34.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-34.patch new file mode 120000 index 00000000000..58778f0e720 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-34.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-34.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-35.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-35.patch new file mode 120000 index 00000000000..07ea002e01f --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-35.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-35.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-36.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-36.patch new file mode 120000 index 00000000000..3bc5b0034c8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-36.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-36.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-37.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-37.patch new file mode 120000 index 00000000000..84f35423e52 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-37.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-37.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-38.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-38.patch new file mode 120000 index 00000000000..dc2041a6dfe --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-38.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-38.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-39.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-39.patch new file mode 120000 index 00000000000..edcdb4e0660 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-39.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-39.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-40.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-40.patch new file mode 120000 index 00000000000..d6664bac3ae --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-40.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-40.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-41.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-41.patch new file mode 120000 index 00000000000..024e01a1d93 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-41.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-41.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-42.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-42.patch new file mode 120000 index 00000000000..cc626e8bd3e --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-42.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-42.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-43.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-43.patch new file mode 120000 index 00000000000..78508bdced4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-43.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-43.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-44.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-44.patch new file mode 120000 index 00000000000..abc87cc7705 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-44.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-44.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-45.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-45.patch new file mode 120000 index 00000000000..546a75ecf8b --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-45.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-45.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-46.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-46.patch new file mode 120000 index 00000000000..651cb9e3cca --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-46.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-46.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch new file mode 120000 index 00000000000..8c086355317 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-48-ldbl_high.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-48-ldbl_high.patch new file mode 120000 index 00000000000..d6f0ec0b0f2 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc-ppc64le-48-ldbl_high.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-48-ldbl_high.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_aarch64_relocation.patch deleted file mode 100644 index bb9ce8d4e06..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_aarch64_relocation.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c -index d8cdb7e24b..5e6e70a5bf 100644 ---- a/elf/dl-sysdep.c -+++ b/elf/dl-sysdep.c -@@ -108,7 +108,7 @@ _dl_sysdep_start (void **start_argptr, - #endif - - __libc_stack_end = DL_STACK_END (start_argptr); -- DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, INTUSE(_dl_argv), _environ, -+ DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, _dl_argv, _environ, - GLRO(dl_auxv)); - - user_entry = (ElfW(Addr)) ENTRY_POINT; -diff --git a/elf/rtld.c b/elf/rtld.c -index 6dcbabc284..03209d695a 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -83,7 +83,7 @@ int _dl_argc attribute_relro attribute_hidden; - char **_dl_argv attribute_relro = NULL; - unsigned int _dl_skip_args attribute_relro attribute_hidden; - #endif --INTDEF(_dl_argv) -+rtld_hidden_data_def (_dl_argv) - - #ifndef THREAD_SET_STACK_GUARD - /* Only exported for architectures that don't store the stack guard canary -@@ -634,7 +634,7 @@ dlmopen_doit (void *a) - args->map = _dl_open (args->fname, - (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT - | __RTLD_SECURE), -- dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv), -+ dl_main, LM_ID_NEWLM, _dl_argc, _dl_argv, - __environ); - } - -@@ -952,55 +952,55 @@ dl_main (const ElfW(Phdr) *phdr, - GL(dl_rtld_map).l_name = rtld_progname; - - while (_dl_argc > 1) -- if (! strcmp (INTUSE(_dl_argv)[1], "--list")) -+ if (! strcmp (_dl_argv[1], "--list")) - { - mode = list; - GLRO(dl_lazy) = -1; /* This means do no dependency analysis. */ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--verify")) -+ else if (! strcmp (_dl_argv[1], "--verify")) - { - mode = verify; - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-cache")) -+ else if (! strcmp (_dl_argv[1], "--inhibit-cache")) - { - GLRO(dl_inhibit_cache) = 1; - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--library-path") -+ else if (! strcmp (_dl_argv[1], "--library-path") - && _dl_argc > 2) - { -- library_path = INTUSE(_dl_argv)[2]; -+ library_path = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-rpath") -+ else if (! strcmp (_dl_argv[1], "--inhibit-rpath") - && _dl_argc > 2) - { -- GLRO(dl_inhibit_rpath) = INTUSE(_dl_argv)[2]; -+ GLRO(dl_inhibit_rpath) = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--audit") && _dl_argc > 2) -+ else if (! strcmp (_dl_argv[1], "--audit") && _dl_argc > 2) - { -- process_dl_audit (INTUSE(_dl_argv)[2]); -+ process_dl_audit (_dl_argv[2]); - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } - else - break; -@@ -1034,7 +1034,7 @@ of this helper program; chances are you did not intend to run this program.\n\ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - - /* The initialization of _dl_stack_flags done below assumes the - executable's PT_GNU_STACK may have been honored by the kernel, and -@@ -1929,7 +1929,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - ElfW(Addr) loadbase; - lookup_t result; - -- result = _dl_lookup_symbol_x (INTUSE(_dl_argv)[i], main_map, -+ result = _dl_lookup_symbol_x (_dl_argv[i], main_map, - &ref, main_map->l_scope, - NULL, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); -@@ -1937,7 +1937,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - loadbase = LOOKUP_VALUE_ADDRESS (result); - - _dl_printf ("%s found at 0x%0*Zd in object at 0x%0*Zd\n", -- INTUSE(_dl_argv)[i], -+ _dl_argv[i], - (int) sizeof ref->st_value * 2, - (size_t) ref->st_value, - (int) sizeof loadbase * 2, (size_t) loadbase); -diff --git a/ports/sysdeps/aarch64/dl-machine.h b/ports/sysdeps/aarch64/dl-machine.h -index 997c860ccb..09fb09c164 100644 ---- a/ports/sysdeps/aarch64/dl-machine.h -+++ b/ports/sysdeps/aarch64/dl-machine.h -@@ -49,23 +49,10 @@ elf_machine_load_address (void) - /* To figure out the load address we use the definition that for any symbol: - dynamic_addr(symbol) = static_addr(symbol) + load_addr - -- The choice of symbol is arbitrary. The static address we obtain -- by constructing a non GOT reference to the symbol, the dynamic -- address of the symbol we compute using adrp/add to compute the -- symbol's address relative to the PC. */ -- -- ElfW(Addr) static_addr; -- ElfW(Addr) dynamic_addr; -- -- asm (" \n\ -- adrp %1, _dl_start; \n\ -- add %1, %1, #:lo12:_dl_start \n\ -- ldr %w0, 1f \n\ -- b 2f \n\ --1: .word _dl_start \n\ --2: \n\ -- " : "=r" (static_addr), "=r" (dynamic_addr)); -- return dynamic_addr - static_addr; -+ _DYNAMIC sysmbol is used here as its link-time address stored in -+ the special unrelocated first GOT entry. */ -+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; -+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic (); - } - - /* Set up the loaded object described by L so its unrelocated PLT -@@ -169,8 +156,8 @@ _dl_start_user: \n\ - cmp x0, #0 \n\ - bne 1b \n\ - // Update _dl_argv \n\ -- adrp x3, _dl_argv \n\ -- str x2, [x3, #:lo12:_dl_argv] \n\ -+ adrp x3, __GI__dl_argv \n\ -+ str x2, [x3, #:lo12:__GI__dl_argv] \n\ - .L_done_stack_adjust: \n\ - // compute envp \n\ - add x3, x2, x1, lsl #3 \n\ -diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index ffeb093887..051bb4d954 100644 ---- a/sysdeps/generic/ldsodefs.h -+++ b/sysdeps/generic/ldsodefs.h -@@ -649,6 +649,7 @@ extern char **_dl_argv - attribute_relro - #endif - ; -+rtld_hidden_proto (_dl_argv) - #ifdef IS_IN_rtld - extern unsigned int _dl_skip_args attribute_hidden - # ifndef DL_ARGV_NOT_RELRO -@@ -660,15 +661,8 @@ extern unsigned int _dl_skip_args_internal attribute_hidden - attribute_relro - # endif - ; --extern char **_dl_argv_internal attribute_hidden --# ifndef DL_ARGV_NOT_RELRO -- attribute_relro --# endif -- ; --# define rtld_progname (INTUSE(_dl_argv)[0]) --#else --# define rtld_progname _dl_argv[0] - #endif -+# define rtld_progname _dl_argv[0] - - /* Flag set at startup and cleared when the last initializer has run. */ - extern int _dl_starting_up; diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_aarch64_relocation.patch new file mode 120000 index 00000000000..23af0beaecb --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_aarch64_relocation.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_aarch64_relocation.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_arm_gcc_fix.patch deleted file mode 100644 index 4ab50ebcb5e..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_arm_gcc_fix.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/nptl/sysdeps/pthread/unwind-forcedunwind.c -+++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/sysdeps/gnu/unwind-resume.c -+++ b/sysdeps/gnu/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - --- -1.9.4 - diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_arm_gcc_fix.patch new file mode 120000 index 00000000000..13167359553 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_arm_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_arm_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_gcc_version.patch deleted file mode 100644 index 4d894fa9bb4..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_gcc_version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old 2017-07-27 20:01:59.997750069 +0000 -+++ configure 2017-07-27 20:02:54.029053809 +0000 -@@ -5189,7 +5189,7 @@ - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | 4.[0-9]* | 5.[0-9]* | 6.[0-9]* | 7.[0-9]* | 8.[0-9]* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_gcc_version.patch new file mode 120000 index 00000000000..473f7a525d9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_gcc_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_gcc_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_i686_asm.patch deleted file mode 100644 index e2f8c86ec9d..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_i686_asm.patch +++ /dev/null @@ -1,49 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-04-18 -Initial Package Version: 2.11.1 -Upstream Status: Not Submitted -Origin: http://www.eglibc.org/archives/patches/msg00073.html -Description: Fixes the following build problem with GCC-4.5.0: - -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os -./sysdeps/i386/fpu/s_frexp.S: Assembler messages: -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 - -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_i686_asm.patch new file mode 120000 index 00000000000..35f065f0d0d --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_i686_asm.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_i686_asm.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_make_version.patch deleted file mode 100644 index 1c2edd11111..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_make_version.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 30f1989e789515790343811e1d333a903ffb84a0 -Author: Elliot Saba -Date: Tue Sep 18 08:50:46 2018 +0000 - - Include `make` v4.X as valid in configure version check - -diff --git a/configure b/configure -index 8799b7de78..b8bf4e07f6 100755 ---- a/configure -+++ b/configure -@@ -4972,7 +4972,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | 4*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index d369382264..0417133a5c 100644 ---- a/configure.in -+++ b/configure.in -@@ -935,7 +935,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | 4*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_make_version.patch new file mode 120000 index 00000000000..1c6b268bfab --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_make_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_make_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection.patch deleted file mode 100644 index 49668244d52..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection.patch +++ /dev/null @@ -1,176 +0,0 @@ -commit ee14fe4c606fa577ae4375985b75ec0cb8e79fec -Author: Keno Fischer -Date: Fri Jun 22 18:03:46 2018 -0400 - - dl-load: Reject musl-linked libraries - - This prevents the glibc dynamic linker from considering shared - libraries linked against musl (similar to how it would reject - libraries for other architectures). - - See https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/297 - -diff --git a/elf/dl-load.c b/elf/dl-load.c -index 7554a99..fe9e483 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -46,6 +46,7 @@ - #include - #include - -+#include - - #include - #if BYTE_ORDER == BIG_ENDIAN -@@ -1382,6 +1383,60 @@ print_search_path (struct r_search_path_elem **list, - else - _dl_debug_printf_c ("\t\t(%s)\n", what); - } -+ -+struct known_names -+{ -+ const char *soname; -+ int flag; -+}; -+ -+static struct known_names known_libs[] = -+{ -+#ifdef SYSDEP_KNOWN_LIBRARY_NAMES -+ SYSDEP_KNOWN_LIBRARY_NAMES -+#endif -+}; -+ -+static int validate_lib(int fd, unsigned int dynamic_addr, unsigned int dynamic_size) -+{ -+ ElfW(Dyn) *dyn_entry; -+ ElfW(Dyn) *dynamic_segment = alloca(dynamic_size); -+ char fname[255]; -+ __lseek (fd, dynamic_addr, SEEK_SET); -+ if ((size_t) __libc_read (fd, (void *) dynamic_segment, dynamic_size) != dynamic_size) -+ { -+ return -2; -+ } -+ // Find the string table -+ unsigned int string_offset = 0; -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_STRTAB) { -+ string_offset = dyn_entry->d_un.d_val; -+ } -+ if (string_offset != 0) { -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_NEEDED) { -+ __lseek (fd, string_offset + dyn_entry->d_un.d_val, SEEK_SET); -+ ssize_t nchars = __libc_read (fd, (void *)fname, 254); -+ if (nchars == -1) -+ return -2; -+ fname[nchars] = 0; -+ for (int j = 0; j < sizeof (known_libs) / sizeof (known_libs [0]); ++j) { -+ if (strcmp (fname, known_libs [j].soname) == 0) -+ { -+ if (known_libs [j].flag == FLAG_ELF_MUSL) -+ return 1; -+ } -+ } -+ } -+ } -+ } -+ } -+ return 0; -+} -+ - - /* Open a file and verify it is an ELF file for this architecture. We - ignore only ELF files for other architectures. Non-ELF files and -@@ -1427,6 +1482,8 @@ open_verify (const char *name, int fd, - } expected_note = { 4, 16, 1, "GNU" }; - /* Initialize it to make the compiler happy. */ - const char *errstring = NULL; -+ unsigned int dynamic_addr = 0; -+ unsigned int dynamic_size = 0; - int errval = 0; - - #ifdef SHARED -@@ -1618,8 +1675,15 @@ open_verify (const char *name, int fd, - loader, fd))) - goto close_and_out; - -+ dynamic_addr = 0; -+ dynamic_size = 0; - /* Check .note.ABI-tag if present. */ -- for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) -+ for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) { -+ if (ph->p_type == PT_DYNAMIC) -+ { -+ dynamic_addr = ph->p_offset; -+ dynamic_size = ph->p_filesz; -+ } - if (ph->p_type == PT_NOTE && ph->p_filesz >= 32 && ph->p_align >= 4) - { - ElfW(Addr) size = ph->p_filesz; -@@ -1678,6 +1742,20 @@ open_verify (const char *name, int fd, - - break; - } -+ } -+ /* Check the dynamic section */ -+ if (dynamic_addr != 0) { -+ int err = validate_lib(fd, dynamic_addr, dynamic_size); -+ if (err == -2) { -+ errstring = N_("failed to read file"); -+ goto call_lose; -+ } -+ else if (err != 0) { -+ __close (fd); -+ __set_errno (ENOENT); -+ fd = -1; -+ } -+ } - } - - return fd; -diff --git a/elf/ldconfig.c b/elf/ldconfig.c -index fbdd814..53a1f87 100644 ---- a/elf/ldconfig.c -+++ b/elf/ldconfig.c -@@ -875,6 +875,16 @@ search_dir (const struct dir_entry *entry) - add_to_aux_cache (&lstat_buf, flag, osversion, soname); - } - -+ /* Don't try to load MUSL-dependent libraries */ -+ if ((flag & FLAG_TYPE_MASK) == FLAG_ELF_MUSL) -+ { -+ if (real_name != real_file_name) -+ free (real_name); -+ if (opt_verbose) -+ error (0, 0, _("Skipping musl-linked library %s"), file_name); -+ continue; -+ } -+ - if (soname == NULL) - soname = implicit_soname (direntry->d_name, flag); - -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index 59e20dc..13c4215 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -27,6 +27,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 -diff --git a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -index c7e9ad6..abd724e 100644 ---- a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -+++ b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -@@ -23,4 +23,5 @@ - { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, - #define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ -- { "libm.so.6", FLAG_ELF_LIBC6 }, -+ { "libm.so.6", FLAG_ELF_LIBC6 }, \ -+ { "libc.musl-x86_64.so.1", FLAG_ELF_MUSL } diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection.patch new file mode 120000 index 00000000000..81a4040c7fd --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection_old.patch deleted file mode 100644 index a400df39623..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection_old.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index fadd5ec370..cb6b6d53b7 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -26,6 +26,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection_old.patch new file mode 120000 index 00000000000..31d164c349c --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_musl_rejection_old.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection_old.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_nocommon.patch deleted file mode 100644 index 6fbd074443f..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_nocommon.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./malloc/obstack.c.old 2017-10-27 17:08:52.000000000 -0400 -+++ ./malloc/obstack.c 2017-10-27 17:09:54.000000000 -0400 -@@ -117,7 +117,7 @@ - /* A looong time ago (before 1994, anyway; we're not sure) this global variable - was used by non-GNU-C macros to avoid multiple evaluation. The GNU C - library still exports it because somebody might use it. */ --struct obstack *_obstack_compat; -+struct obstack *_obstack_compat __attribute__((nocommon)); - compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); - # endif - # endif diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_nocommon.patch new file mode 120000 index 00000000000..5b375100acb --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_powerpc64le_gcc_fix.patch deleted file mode 100644 index 8bc77f56d70..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_powerpc64le_gcc_fix.patch +++ /dev/null @@ -1,198 +0,0 @@ -From db8fed87d9741b6b3da6c2257f01d63ef2fe407c Mon Sep 17 00:00:00 2001 -From: Martin Sebor -Date: Mon, 1 Jun 2015 14:12:09 -0300 -Subject: [PATCH] powerpc: setcontext.S uses power6 mtfsf when not supported - [BZ #18116] - -The attached patch fixes a glibc build failure with gcc 5 on powerpc64le -caused by a recent change in gcc where the compiler defines the -_ARCH_PWR6 macro when processing assembly files but doesn't invoke the -assembler in the corresponding machine mode (unless it has been -explicitly configured to target POWER 6 or later). A bug had been filed -with gcc for this (65341) but was closed as won't fix. Glibc relies on -the _ARCH_PWR6 macro in a few .S files to make use of Power ISA 2.5 -instructions (specifically, the four-argument form of the mtfsf insn). -A similar problem had occurred in the past (bug 10118) but the fix that -was committed for it didn't anticipate this new problem. ---- - ChangeLog | 9 ++++++ - .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 30 ++++++++++++++---- - .../sysv/linux/powerpc/powerpc64/swapcontext.S | 36 +++++++++++++++++----- - 3 files changed, 61 insertions(+), 14 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 6d295e7..239a0e6 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,12 @@ -+2015-03-11 Martin Sebor -+ -+ [BZ #18116] -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+ (__setcontext): Use extended four-operand version of mtsf whenever -+ possible. -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+ (__novec_swapcontext): Likewise. -+ - 2015-06-01 Siddhesh Poyarekar - - * benchtests/scripts/compare_bench.py: New file. -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -index e47a57a..8a08dc4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -@@ -81,22 +81,31 @@ ENTRY(__novec_setcontext) - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 5f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -364,22 +373,31 @@ L(has_no_vec): - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 7f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -index bc02a21..2421ca4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -@@ -173,24 +173,34 @@ ENTRY(__novec_swapcontext) - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 5f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -652,24 +662,34 @@ L(has_no_vec2): - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 7f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) --- -2.9.3 - diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_powerpc64le_gcc_fix.patch new file mode 120000 index 00000000000..206ed74aa45 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_powerpc64le_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_powerpc64le_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_regexp_nocommon.patch deleted file mode 100644 index 98bd10251e3..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_regexp_nocommon.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- misc/regexp.c.old 2017-10-28 12:54:11.000000000 -0400 -+++ misc/regexp.c 2017-10-28 12:54:37.000000000 -0400 -@@ -30,13 +30,13 @@ - #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) - - /* Define the variables used for the interface. */ --char *loc1; --char *loc2; -+char *loc1 __attribute__((nocommon)); -+char *loc2 __attribute__((nocommon)); - compat_symbol (libc, loc1, loc1, GLIBC_2_0); - compat_symbol (libc, loc2, loc2, GLIBC_2_0); - - /* Although we do not support the use we define this variable as well. */ --char *locs; -+char *locs __attribute__((nocommon)); - compat_symbol (libc, locs, locs, GLIBC_2_0); - - diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_regexp_nocommon.patch new file mode 120000 index 00000000000..1a10ef2694b --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_regexp_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_regexp_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_sunrpc.patch deleted file mode 100644 index d7fdf48316d..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_sunrpc.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- sunrpc/rpc/types.h.old -+++ sunrpc/rpc/types.h -@@ -69,7 +69,7 @@ - #include - #endif - --#ifndef __u_char_defined -+#if 0 - typedef __u_char u_char; - typedef __u_short u_short; - typedef __u_int u_int; -@@ -79,7 +79,7 @@ - typedef __fsid_t fsid_t; - # define __u_char_defined - #endif --#ifndef __daddr_t_defined -+#if 0 - typedef __daddr_t daddr_t; - typedef __caddr_t caddr_t; - # define __daddr_t_defined diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_sunrpc.patch new file mode 120000 index 00000000000..9359558d4e0 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/glibc_sunrpc.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_sunrpc.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_fullyaml.patch deleted file mode 100644 index fc8b4e8e120..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_fullyaml.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -index ca62890e..6038c13b 100644 ---- a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -+++ b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -@@ -26,7 +26,7 @@ void RefactoringOptionSet::print(llvm::raw_ostream &OS) const { - } - } - --template <> struct CustomMappingTraits { -+template <> struct llvm::yaml::CustomMappingTraits { - static void inputOne(IO &YamlIn, StringRef Key, - RefactoringOptionSet &Result) { - #define HANDLE(Type) \ diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_fullyaml.patch new file mode 120000 index 00000000000..8c24845b566 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_fullyaml.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_fullyaml.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_musl.patch deleted file mode 100644 index d0b09c58c31..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_musl.patch +++ /dev/null @@ -1,3851 +0,0 @@ -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -index 7798e3c8..dc890373 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -@@ -20,7 +20,7 @@ - // One of TLI_DEFINE_ENUM/STRING are defined. - - #if defined(TLI_DEFINE_ENUM) --#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) enum_variant, -+#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) LibFunc_##enum_variant, - #define TLI_DEFINE_STRING_INTERNAL(string_repr) - #else - #define TLI_DEFINE_ENUM_INTERNAL(enum_variant) -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -index 2cba44bc..25ae5449 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -@@ -29,14 +29,12 @@ struct VecDesc { - }; - class PreservedAnalyses; - -- namespace LibFunc { -- enum Func { -+ enum LibFunc { - #define TLI_DEFINE_ENUM - #include "llvm/Analysis/TargetLibraryInfo.def" - - NumLibFuncs - }; -- } - - /// \brief Implementation of the target library information. - /// -@@ -47,20 +45,20 @@ class PreservedAnalyses; - class TargetLibraryInfoImpl { - friend class TargetLibraryInfo; - -- unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4]; -+ unsigned char AvailableArray[(NumLibFuncs+3)/4]; - llvm::DenseMap CustomNames; -- static const char *const StandardNames[LibFunc::NumLibFuncs]; -+ static const char *const StandardNames[NumLibFuncs]; - - enum AvailabilityState { - StandardName = 3, // (memset to all ones) - CustomName = 1, - Unavailable = 0 // (memset to all zeros) - }; -- void setState(LibFunc::Func F, AvailabilityState State) { -+ void setState(LibFunc F, AvailabilityState State) { - AvailableArray[F/4] &= ~(3 << 2*(F&3)); - AvailableArray[F/4] |= State << 2*(F&3); - } -- AvailabilityState getState(LibFunc::Func F) const { -+ AvailabilityState getState(LibFunc F) const { - return static_cast((AvailableArray[F/4] >> 2*(F&3)) & 3); - } - -@@ -72,7 +70,7 @@ class TargetLibraryInfoImpl { - - /// Return true if the function type FTy is valid for the library function - /// F, regardless of whether the function is available. -- bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc::Func F, -+ bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc F, - const DataLayout *DL) const; - - public: -@@ -101,28 +99,28 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const; -+ bool getLibFunc(StringRef funcName, LibFunc &F) const; - - /// Searches for a particular function name, also checking that its type is - /// valid for the library function matching that name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const; -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const; - - /// \brief Forces a function to be marked as unavailable. -- void setUnavailable(LibFunc::Func F) { -+ void setUnavailable(LibFunc F) { - setState(F, Unavailable); - } - - /// \brief Forces a function to be marked as available. -- void setAvailable(LibFunc::Func F) { -+ void setAvailable(LibFunc F) { - setState(F, StandardName); - } - - /// \brief Forces a function to be marked as available and provide an - /// alternate name that must be used. -- void setAvailableWithName(LibFunc::Func F, StringRef Name) { -+ void setAvailableWithName(LibFunc F, StringRef Name) { - if (StandardNames[F] != Name) { - setState(F, CustomName); - CustomNames[F] = Name; -@@ -203,16 +201,16 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const { -+ bool getLibFunc(StringRef funcName, LibFunc &F) const { - return Impl->getLibFunc(funcName, F); - } - -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const { -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const { - return Impl->getLibFunc(FDecl, F); - } - - /// \brief Tests whether a library function is available. -- bool has(LibFunc::Func F) const { -+ bool has(LibFunc F) const { - return Impl->getState(F) != TargetLibraryInfoImpl::Unavailable; - } - bool isFunctionVectorizable(StringRef F, unsigned VF) const { -@@ -227,37 +225,37 @@ public: - - /// \brief Tests if the function is both available and a candidate for - /// optimized code generation. -- bool hasOptimizedCodeGen(LibFunc::Func F) const { -+ bool hasOptimizedCodeGen(LibFunc F) const { - if (Impl->getState(F) == TargetLibraryInfoImpl::Unavailable) - return false; - switch (F) { - default: break; -- case LibFunc::copysign: case LibFunc::copysignf: case LibFunc::copysignl: -- case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: -- case LibFunc::sin: case LibFunc::sinf: case LibFunc::sinl: -- case LibFunc::cos: case LibFunc::cosf: case LibFunc::cosl: -- case LibFunc::sqrt: case LibFunc::sqrtf: case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -- case LibFunc::fmax: case LibFunc::fmaxf: case LibFunc::fmaxl: -- case LibFunc::fmin: case LibFunc::fminf: case LibFunc::fminl: -- case LibFunc::floor: case LibFunc::floorf: case LibFunc::floorl: -- case LibFunc::nearbyint: case LibFunc::nearbyintf: case LibFunc::nearbyintl: -- case LibFunc::ceil: case LibFunc::ceilf: case LibFunc::ceill: -- case LibFunc::rint: case LibFunc::rintf: case LibFunc::rintl: -- case LibFunc::round: case LibFunc::roundf: case LibFunc::roundl: -- case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: -- case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: -- case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: -- case LibFunc::memcmp: case LibFunc::strcmp: case LibFunc::strcpy: -- case LibFunc::stpcpy: case LibFunc::strlen: case LibFunc::strnlen: -- case LibFunc::memchr: -+ case LibFunc_copysign: case LibFunc_copysignf: case LibFunc_copysignl: -+ case LibFunc_fabs: case LibFunc_fabsf: case LibFunc_fabsl: -+ case LibFunc_sin: case LibFunc_sinf: case LibFunc_sinl: -+ case LibFunc_cos: case LibFunc_cosf: case LibFunc_cosl: -+ case LibFunc_sqrt: case LibFunc_sqrtf: case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: -+ case LibFunc_fmax: case LibFunc_fmaxf: case LibFunc_fmaxl: -+ case LibFunc_fmin: case LibFunc_fminf: case LibFunc_fminl: -+ case LibFunc_floor: case LibFunc_floorf: case LibFunc_floorl: -+ case LibFunc_nearbyint: case LibFunc_nearbyintf: case LibFunc_nearbyintl: -+ case LibFunc_ceil: case LibFunc_ceilf: case LibFunc_ceill: -+ case LibFunc_rint: case LibFunc_rintf: case LibFunc_rintl: -+ case LibFunc_round: case LibFunc_roundf: case LibFunc_roundl: -+ case LibFunc_trunc: case LibFunc_truncf: case LibFunc_truncl: -+ case LibFunc_log2: case LibFunc_log2f: case LibFunc_log2l: -+ case LibFunc_exp2: case LibFunc_exp2f: case LibFunc_exp2l: -+ case LibFunc_memcmp: case LibFunc_strcmp: case LibFunc_strcpy: -+ case LibFunc_stpcpy: case LibFunc_strlen: case LibFunc_strnlen: -+ case LibFunc_memchr: - return true; - } - return false; - } - -- StringRef getName(LibFunc::Func F) const { -+ StringRef getName(LibFunc F) const { - auto State = Impl->getState(F); - if (State == TargetLibraryInfoImpl::Unavailable) - return StringRef(); -diff --git a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -index 6ec531f8..e50c779c 100644 ---- a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -+++ b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -@@ -56,8 +56,8 @@ private: - Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B); - - // Str/Stp cpy are similar enough to be handled in the same functions. -- Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -- Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -+ Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); -+ Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); - - /// \brief Checks whether the call \p CI to a fortified libcall is foldable - /// to the non-fortified version. -diff --git a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -index ec712a31..058f1aef 100644 ---- a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -+++ b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -@@ -613,9 +613,9 @@ static bool isWriteOnlyParam(ImmutableCallSite CS, unsigned ArgIdx, - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. Note that all but the missing writeonly attribute are - // handled via InferFunctionAttr. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) -+ F == LibFunc_memset_pattern16 && TLI.has(F)) - if (ArgIdx == 0) - return true; - -diff --git a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -index ccb56631..18ce21de 100644 ---- a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -+++ b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -@@ -1501,51 +1501,51 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - switch (Name[0]) { - case 'a': -- if ((Name == "acos" && TLI->has(LibFunc::acos)) || -- (Name == "acosf" && TLI->has(LibFunc::acosf))) -+ if ((Name == "acos" && TLI->has(LibFunc_acos)) || -+ (Name == "acosf" && TLI->has(LibFunc_acosf))) - return ConstantFoldFP(acos, V, Ty); -- else if ((Name == "asin" && TLI->has(LibFunc::asin)) || -- (Name == "asinf" && TLI->has(LibFunc::asinf))) -+ else if ((Name == "asin" && TLI->has(LibFunc_asin)) || -+ (Name == "asinf" && TLI->has(LibFunc_asinf))) - return ConstantFoldFP(asin, V, Ty); -- else if ((Name == "atan" && TLI->has(LibFunc::atan)) || -- (Name == "atanf" && TLI->has(LibFunc::atanf))) -+ else if ((Name == "atan" && TLI->has(LibFunc_atan)) || -+ (Name == "atanf" && TLI->has(LibFunc_atanf))) - return ConstantFoldFP(atan, V, Ty); - break; - case 'c': -- if ((Name == "ceil" && TLI->has(LibFunc::ceil)) || -- (Name == "ceilf" && TLI->has(LibFunc::ceilf))) -+ if ((Name == "ceil" && TLI->has(LibFunc_ceil)) || -+ (Name == "ceilf" && TLI->has(LibFunc_ceilf))) - return ConstantFoldFP(ceil, V, Ty); -- else if ((Name == "cos" && TLI->has(LibFunc::cos)) || -- (Name == "cosf" && TLI->has(LibFunc::cosf))) -+ else if ((Name == "cos" && TLI->has(LibFunc_cos)) || -+ (Name == "cosf" && TLI->has(LibFunc_cosf))) - return ConstantFoldFP(cos, V, Ty); -- else if ((Name == "cosh" && TLI->has(LibFunc::cosh)) || -- (Name == "coshf" && TLI->has(LibFunc::coshf))) -+ else if ((Name == "cosh" && TLI->has(LibFunc_cosh)) || -+ (Name == "coshf" && TLI->has(LibFunc_coshf))) - return ConstantFoldFP(cosh, V, Ty); - break; - case 'e': -- if ((Name == "exp" && TLI->has(LibFunc::exp)) || -- (Name == "expf" && TLI->has(LibFunc::expf))) -+ if ((Name == "exp" && TLI->has(LibFunc_exp)) || -+ (Name == "expf" && TLI->has(LibFunc_expf))) - return ConstantFoldFP(exp, V, Ty); -- if ((Name == "exp2" && TLI->has(LibFunc::exp2)) || -- (Name == "exp2f" && TLI->has(LibFunc::exp2f))) -+ if ((Name == "exp2" && TLI->has(LibFunc_exp2)) || -+ (Name == "exp2f" && TLI->has(LibFunc_exp2f))) - // Constant fold exp2(x) as pow(2,x) in case the host doesn't have a - // C99 library. - return ConstantFoldBinaryFP(pow, 2.0, V, Ty); - break; - case 'f': -- if ((Name == "fabs" && TLI->has(LibFunc::fabs)) || -- (Name == "fabsf" && TLI->has(LibFunc::fabsf))) -+ if ((Name == "fabs" && TLI->has(LibFunc_fabs)) || -+ (Name == "fabsf" && TLI->has(LibFunc_fabsf))) - return ConstantFoldFP(fabs, V, Ty); -- else if ((Name == "floor" && TLI->has(LibFunc::floor)) || -- (Name == "floorf" && TLI->has(LibFunc::floorf))) -+ else if ((Name == "floor" && TLI->has(LibFunc_floor)) || -+ (Name == "floorf" && TLI->has(LibFunc_floorf))) - return ConstantFoldFP(floor, V, Ty); - break; - case 'l': -- if ((Name == "log" && V > 0 && TLI->has(LibFunc::log)) || -- (Name == "logf" && V > 0 && TLI->has(LibFunc::logf))) -+ if ((Name == "log" && V > 0 && TLI->has(LibFunc_log)) || -+ (Name == "logf" && V > 0 && TLI->has(LibFunc_logf))) - return ConstantFoldFP(log, V, Ty); -- else if ((Name == "log10" && V > 0 && TLI->has(LibFunc::log10)) || -- (Name == "log10f" && V > 0 && TLI->has(LibFunc::log10f))) -+ else if ((Name == "log10" && V > 0 && TLI->has(LibFunc_log10)) || -+ (Name == "log10f" && V > 0 && TLI->has(LibFunc_log10f))) - return ConstantFoldFP(log10, V, Ty); - else if (IntrinsicID == Intrinsic::sqrt && - (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())) { -@@ -1562,22 +1562,22 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - } - break; - case 's': -- if ((Name == "sin" && TLI->has(LibFunc::sin)) || -- (Name == "sinf" && TLI->has(LibFunc::sinf))) -+ if ((Name == "sin" && TLI->has(LibFunc_sin)) || -+ (Name == "sinf" && TLI->has(LibFunc_sinf))) - return ConstantFoldFP(sin, V, Ty); -- else if ((Name == "sinh" && TLI->has(LibFunc::sinh)) || -- (Name == "sinhf" && TLI->has(LibFunc::sinhf))) -+ else if ((Name == "sinh" && TLI->has(LibFunc_sinh)) || -+ (Name == "sinhf" && TLI->has(LibFunc_sinhf))) - return ConstantFoldFP(sinh, V, Ty); -- else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc::sqrt)) || -- (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc::sqrtf))) -+ else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc_sqrt)) || -+ (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc_sqrtf))) - return ConstantFoldFP(sqrt, V, Ty); - break; - case 't': -- if ((Name == "tan" && TLI->has(LibFunc::tan)) || -- (Name == "tanf" && TLI->has(LibFunc::tanf))) -+ if ((Name == "tan" && TLI->has(LibFunc_tan)) || -+ (Name == "tanf" && TLI->has(LibFunc_tanf))) - return ConstantFoldFP(tan, V, Ty); -- else if ((Name == "tanh" && TLI->has(LibFunc::tanh)) || -- (Name == "tanhf" && TLI->has(LibFunc::tanhf))) -+ else if ((Name == "tanh" && TLI->has(LibFunc_tanh)) || -+ (Name == "tanhf" && TLI->has(LibFunc_tanhf))) - return ConstantFoldFP(tanh, V, Ty); - break; - default: -@@ -1680,14 +1680,14 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - if (!TLI) - return nullptr; -- if ((Name == "pow" && TLI->has(LibFunc::pow)) || -- (Name == "powf" && TLI->has(LibFunc::powf))) -+ if ((Name == "pow" && TLI->has(LibFunc_pow)) || -+ (Name == "powf" && TLI->has(LibFunc_powf))) - return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty); -- if ((Name == "fmod" && TLI->has(LibFunc::fmod)) || -- (Name == "fmodf" && TLI->has(LibFunc::fmodf))) -+ if ((Name == "fmod" && TLI->has(LibFunc_fmod)) || -+ (Name == "fmodf" && TLI->has(LibFunc_fmodf))) - return ConstantFoldBinaryFP(fmod, Op1V, Op2V, Ty); -- if ((Name == "atan2" && TLI->has(LibFunc::atan2)) || -- (Name == "atan2f" && TLI->has(LibFunc::atan2f))) -+ if ((Name == "atan2" && TLI->has(LibFunc_atan2)) || -+ (Name == "atan2f" && TLI->has(LibFunc_atan2f))) - return ConstantFoldBinaryFP(atan2, Op1V, Op2V, Ty); - } else if (ConstantInt *Op2C = dyn_cast(Operands[1])) { - if (IntrinsicID == Intrinsic::powi && Ty->isHalfTy()) -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -index 480ab5cd..f6d83716 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -@@ -42,7 +42,7 @@ enum AllocType : uint8_t { - }; - - struct AllocFnsTy { -- LibFunc::Func Func; -+ LibFunc Func; - AllocType AllocTy; - unsigned char NumParams; - // First and Second size parameters (or -1 if unused) -@@ -52,29 +52,29 @@ struct AllocFnsTy { - // FIXME: certain users need more information. E.g., SimplifyLibCalls needs to - // know which functions are nounwind, noalias, nocapture parameters, etc. - static const AllocFnsTy AllocationFnData[] = { -- {LibFunc::malloc, MallocLike, 1, 0, -1}, -- {LibFunc::valloc, MallocLike, 1, 0, -1}, -- {LibFunc::Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -- {LibFunc::ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -- {LibFunc::Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -- {LibFunc::ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -- {LibFunc::msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -- {LibFunc::msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -- {LibFunc::msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -- {LibFunc::msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -- {LibFunc::calloc, CallocLike, 2, 0, 1}, -- {LibFunc::realloc, ReallocLike, 2, 1, -1}, -- {LibFunc::reallocf, ReallocLike, 2, 1, -1}, -- {LibFunc::strdup, StrDupLike, 1, -1, -1}, -- {LibFunc::strndup, StrDupLike, 2, 1, -1} -+ {LibFunc_malloc, MallocLike, 1, 0, -1}, -+ {LibFunc_valloc, MallocLike, 1, 0, -1}, -+ {LibFunc_Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -+ {LibFunc_ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -+ {LibFunc_Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -+ {LibFunc_ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -+ {LibFunc_msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -+ {LibFunc_msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -+ {LibFunc_msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -+ {LibFunc_msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -+ {LibFunc_calloc, CallocLike, 2, 0, 1}, -+ {LibFunc_realloc, ReallocLike, 2, 1, -1}, -+ {LibFunc_reallocf, ReallocLike, 2, 1, -1}, -+ {LibFunc_strdup, StrDupLike, 1, -1, -1}, -+ {LibFunc_strndup, StrDupLike, 2, 1, -1} - // TODO: Handle "int posix_memalign(void **, size_t, size_t)" - }; - -@@ -111,7 +111,7 @@ static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy, - - // Make sure that the function is available. - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - -@@ -295,33 +295,33 @@ const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) { - return nullptr; - - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - - unsigned ExpectedNumParams; -- if (TLIFn == LibFunc::free || -- TLIFn == LibFunc::ZdlPv || // operator delete(void*) -- TLIFn == LibFunc::ZdaPv || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_ptr32 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_ptr64 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_array_ptr32 || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_array_ptr64) // operator delete[](void*) -+ if (TLIFn == LibFunc_free || -+ TLIFn == LibFunc_ZdlPv || // operator delete(void*) -+ TLIFn == LibFunc_ZdaPv || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_ptr32 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_ptr64 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr32 || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr64) // operator delete[](void*) - ExpectedNumParams = 1; -- else if (TLIFn == LibFunc::ZdlPvj || // delete(void*, uint) -- TLIFn == LibFunc::ZdlPvm || // delete(void*, ulong) -- TLIFn == LibFunc::ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -- TLIFn == LibFunc::ZdaPvj || // delete[](void*, uint) -- TLIFn == LibFunc::ZdaPvm || // delete[](void*, ulong) -- TLIFn == LibFunc::ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr32_int || // delete(void*, uint) -- TLIFn == LibFunc::msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr32_int || // delete[](void*, uint) -- TLIFn == LibFunc::msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) -+ else if (TLIFn == LibFunc_ZdlPvj || // delete(void*, uint) -+ TLIFn == LibFunc_ZdlPvm || // delete(void*, ulong) -+ TLIFn == LibFunc_ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -+ TLIFn == LibFunc_ZdaPvj || // delete[](void*, uint) -+ TLIFn == LibFunc_ZdaPvm || // delete[](void*, ulong) -+ TLIFn == LibFunc_ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr32_int || // delete(void*, uint) -+ TLIFn == LibFunc_msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_int || // delete[](void*, uint) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) - ExpectedNumParams = 2; - else - return nullptr; -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -index a0ae72f1..9db6c499 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -@@ -142,9 +142,9 @@ MemoryLocation MemoryLocation::getForArgument(ImmutableCallSite CS, - // for memcpy/memset. This is particularly important because the - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) { -+ F == LibFunc_memset_pattern16 && TLI.has(F)) { - assert((ArgIdx == 0 || ArgIdx == 1) && - "Invalid argument index for memset_pattern16"); - if (ArgIdx == 1) -diff --git a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -index a71d090c..a34174d1 100644 ---- a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -+++ b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -@@ -25,7 +25,7 @@ static cl::opt ClVectorLibrary( - "Accelerate framework"), - clEnumValEnd)); - --const char *const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = { -+const char *const TargetLibraryInfoImpl::StandardNames[NumLibFuncs] = { - #define TLI_DEFINE_STRING - #include "llvm/Analysis/TargetLibraryInfo.def" - }; -@@ -62,9 +62,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - - if (T.getArch() == Triple::r600 || - T.getArch() == Triple::amdgcn) { -- TLI.setUnavailable(LibFunc::ldexp); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -+ TLI.setUnavailable(LibFunc_ldexp); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); - } - - // There are no library implementations of mempcy and memset for AMD gpus and -@@ -73,9 +73,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - T.getArch() == Triple::amdgcn || - T.getArch() == Triple::wasm32 || - T.getArch() == Triple::wasm64) { -- TLI.setUnavailable(LibFunc::memcpy); -- TLI.setUnavailable(LibFunc::memset); -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memcpy); -+ TLI.setUnavailable(LibFunc_memset); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - return; - } - -@@ -83,21 +83,21 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // All versions of watchOS support it. - if (T.isMacOSX()) { - if (T.isMacOSXVersionLT(10, 5)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (T.isiOS()) { - if (T.isOSVersionLT(3, 0)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (!T.isWatchOS()) { -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } - - if (!hasSinCosPiStret(T)) { -- TLI.setUnavailable(LibFunc::sinpi); -- TLI.setUnavailable(LibFunc::sinpif); -- TLI.setUnavailable(LibFunc::cospi); -- TLI.setUnavailable(LibFunc::cospif); -- TLI.setUnavailable(LibFunc::sincospi_stret); -- TLI.setUnavailable(LibFunc::sincospif_stret); -+ TLI.setUnavailable(LibFunc_sinpi); -+ TLI.setUnavailable(LibFunc_sinpif); -+ TLI.setUnavailable(LibFunc_cospi); -+ TLI.setUnavailable(LibFunc_cospif); -+ TLI.setUnavailable(LibFunc_sincospi_stret); -+ TLI.setUnavailable(LibFunc_sincospif_stret); - } - - if (T.isMacOSX() && T.getArch() == Triple::x86 && -@@ -107,177 +107,177 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // has a $UNIX2003 suffix. The two implementations are identical except - // for the return value in some edge cases. However, we don't want to - // generate code that depends on the old symbols. -- TLI.setAvailableWithName(LibFunc::fwrite, "fwrite$UNIX2003"); -- TLI.setAvailableWithName(LibFunc::fputs, "fputs$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fwrite, "fwrite$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fputs, "fputs$UNIX2003"); - } - - // iprintf and friends are only available on XCore and TCE. - if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) { -- TLI.setUnavailable(LibFunc::iprintf); -- TLI.setUnavailable(LibFunc::siprintf); -- TLI.setUnavailable(LibFunc::fiprintf); -+ TLI.setUnavailable(LibFunc_iprintf); -+ TLI.setUnavailable(LibFunc_siprintf); -+ TLI.setUnavailable(LibFunc_fiprintf); - } - - if (T.isOSWindows() && !T.isOSCygMing()) { - // Win32 does not support long double -- TLI.setUnavailable(LibFunc::acosl); -- TLI.setUnavailable(LibFunc::asinl); -- TLI.setUnavailable(LibFunc::atanl); -- TLI.setUnavailable(LibFunc::atan2l); -- TLI.setUnavailable(LibFunc::ceill); -- TLI.setUnavailable(LibFunc::copysignl); -- TLI.setUnavailable(LibFunc::cosl); -- TLI.setUnavailable(LibFunc::coshl); -- TLI.setUnavailable(LibFunc::expl); -- TLI.setUnavailable(LibFunc::fabsf); // Win32 and Win64 both lack fabsf -- TLI.setUnavailable(LibFunc::fabsl); -- TLI.setUnavailable(LibFunc::floorl); -- TLI.setUnavailable(LibFunc::fmaxl); -- TLI.setUnavailable(LibFunc::fminl); -- TLI.setUnavailable(LibFunc::fmodl); -- TLI.setUnavailable(LibFunc::frexpl); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -- TLI.setUnavailable(LibFunc::logl); -- TLI.setUnavailable(LibFunc::modfl); -- TLI.setUnavailable(LibFunc::powl); -- TLI.setUnavailable(LibFunc::sinl); -- TLI.setUnavailable(LibFunc::sinhl); -- TLI.setUnavailable(LibFunc::sqrtl); -- TLI.setUnavailable(LibFunc::tanl); -- TLI.setUnavailable(LibFunc::tanhl); -+ TLI.setUnavailable(LibFunc_acosl); -+ TLI.setUnavailable(LibFunc_asinl); -+ TLI.setUnavailable(LibFunc_atanl); -+ TLI.setUnavailable(LibFunc_atan2l); -+ TLI.setUnavailable(LibFunc_ceill); -+ TLI.setUnavailable(LibFunc_copysignl); -+ TLI.setUnavailable(LibFunc_cosl); -+ TLI.setUnavailable(LibFunc_coshl); -+ TLI.setUnavailable(LibFunc_expl); -+ TLI.setUnavailable(LibFunc_fabsf); // Win32 and Win64 both lack fabsf -+ TLI.setUnavailable(LibFunc_fabsl); -+ TLI.setUnavailable(LibFunc_floorl); -+ TLI.setUnavailable(LibFunc_fmaxl); -+ TLI.setUnavailable(LibFunc_fminl); -+ TLI.setUnavailable(LibFunc_fmodl); -+ TLI.setUnavailable(LibFunc_frexpl); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); -+ TLI.setUnavailable(LibFunc_logl); -+ TLI.setUnavailable(LibFunc_modfl); -+ TLI.setUnavailable(LibFunc_powl); -+ TLI.setUnavailable(LibFunc_sinl); -+ TLI.setUnavailable(LibFunc_sinhl); -+ TLI.setUnavailable(LibFunc_sqrtl); -+ TLI.setUnavailable(LibFunc_tanl); -+ TLI.setUnavailable(LibFunc_tanhl); - - // Win32 only has C89 math -- TLI.setUnavailable(LibFunc::acosh); -- TLI.setUnavailable(LibFunc::acoshf); -- TLI.setUnavailable(LibFunc::acoshl); -- TLI.setUnavailable(LibFunc::asinh); -- TLI.setUnavailable(LibFunc::asinhf); -- TLI.setUnavailable(LibFunc::asinhl); -- TLI.setUnavailable(LibFunc::atanh); -- TLI.setUnavailable(LibFunc::atanhf); -- TLI.setUnavailable(LibFunc::atanhl); -- TLI.setUnavailable(LibFunc::cbrt); -- TLI.setUnavailable(LibFunc::cbrtf); -- TLI.setUnavailable(LibFunc::cbrtl); -- TLI.setUnavailable(LibFunc::exp2); -- TLI.setUnavailable(LibFunc::exp2f); -- TLI.setUnavailable(LibFunc::exp2l); -- TLI.setUnavailable(LibFunc::expm1); -- TLI.setUnavailable(LibFunc::expm1f); -- TLI.setUnavailable(LibFunc::expm1l); -- TLI.setUnavailable(LibFunc::log2); -- TLI.setUnavailable(LibFunc::log2f); -- TLI.setUnavailable(LibFunc::log2l); -- TLI.setUnavailable(LibFunc::log1p); -- TLI.setUnavailable(LibFunc::log1pf); -- TLI.setUnavailable(LibFunc::log1pl); -- TLI.setUnavailable(LibFunc::logb); -- TLI.setUnavailable(LibFunc::logbf); -- TLI.setUnavailable(LibFunc::logbl); -- TLI.setUnavailable(LibFunc::nearbyint); -- TLI.setUnavailable(LibFunc::nearbyintf); -- TLI.setUnavailable(LibFunc::nearbyintl); -- TLI.setUnavailable(LibFunc::rint); -- TLI.setUnavailable(LibFunc::rintf); -- TLI.setUnavailable(LibFunc::rintl); -- TLI.setUnavailable(LibFunc::round); -- TLI.setUnavailable(LibFunc::roundf); -- TLI.setUnavailable(LibFunc::roundl); -- TLI.setUnavailable(LibFunc::trunc); -- TLI.setUnavailable(LibFunc::truncf); -- TLI.setUnavailable(LibFunc::truncl); -+ TLI.setUnavailable(LibFunc_acosh); -+ TLI.setUnavailable(LibFunc_acoshf); -+ TLI.setUnavailable(LibFunc_acoshl); -+ TLI.setUnavailable(LibFunc_asinh); -+ TLI.setUnavailable(LibFunc_asinhf); -+ TLI.setUnavailable(LibFunc_asinhl); -+ TLI.setUnavailable(LibFunc_atanh); -+ TLI.setUnavailable(LibFunc_atanhf); -+ TLI.setUnavailable(LibFunc_atanhl); -+ TLI.setUnavailable(LibFunc_cbrt); -+ TLI.setUnavailable(LibFunc_cbrtf); -+ TLI.setUnavailable(LibFunc_cbrtl); -+ TLI.setUnavailable(LibFunc_exp2); -+ TLI.setUnavailable(LibFunc_exp2f); -+ TLI.setUnavailable(LibFunc_exp2l); -+ TLI.setUnavailable(LibFunc_expm1); -+ TLI.setUnavailable(LibFunc_expm1f); -+ TLI.setUnavailable(LibFunc_expm1l); -+ TLI.setUnavailable(LibFunc_log2); -+ TLI.setUnavailable(LibFunc_log2f); -+ TLI.setUnavailable(LibFunc_log2l); -+ TLI.setUnavailable(LibFunc_log1p); -+ TLI.setUnavailable(LibFunc_log1pf); -+ TLI.setUnavailable(LibFunc_log1pl); -+ TLI.setUnavailable(LibFunc_logb); -+ TLI.setUnavailable(LibFunc_logbf); -+ TLI.setUnavailable(LibFunc_logbl); -+ TLI.setUnavailable(LibFunc_nearbyint); -+ TLI.setUnavailable(LibFunc_nearbyintf); -+ TLI.setUnavailable(LibFunc_nearbyintl); -+ TLI.setUnavailable(LibFunc_rint); -+ TLI.setUnavailable(LibFunc_rintf); -+ TLI.setUnavailable(LibFunc_rintl); -+ TLI.setUnavailable(LibFunc_round); -+ TLI.setUnavailable(LibFunc_roundf); -+ TLI.setUnavailable(LibFunc_roundl); -+ TLI.setUnavailable(LibFunc_trunc); -+ TLI.setUnavailable(LibFunc_truncf); -+ TLI.setUnavailable(LibFunc_truncl); - - // Win32 provides some C99 math with mangled names -- TLI.setAvailableWithName(LibFunc::copysign, "_copysign"); -+ TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); - - if (T.getArch() == Triple::x86) { - // Win32 on x86 implements single-precision math functions as macros -- TLI.setUnavailable(LibFunc::acosf); -- TLI.setUnavailable(LibFunc::asinf); -- TLI.setUnavailable(LibFunc::atanf); -- TLI.setUnavailable(LibFunc::atan2f); -- TLI.setUnavailable(LibFunc::ceilf); -- TLI.setUnavailable(LibFunc::copysignf); -- TLI.setUnavailable(LibFunc::cosf); -- TLI.setUnavailable(LibFunc::coshf); -- TLI.setUnavailable(LibFunc::expf); -- TLI.setUnavailable(LibFunc::floorf); -- TLI.setUnavailable(LibFunc::fminf); -- TLI.setUnavailable(LibFunc::fmaxf); -- TLI.setUnavailable(LibFunc::fmodf); -- TLI.setUnavailable(LibFunc::logf); -- TLI.setUnavailable(LibFunc::powf); -- TLI.setUnavailable(LibFunc::sinf); -- TLI.setUnavailable(LibFunc::sinhf); -- TLI.setUnavailable(LibFunc::sqrtf); -- TLI.setUnavailable(LibFunc::tanf); -- TLI.setUnavailable(LibFunc::tanhf); -+ TLI.setUnavailable(LibFunc_acosf); -+ TLI.setUnavailable(LibFunc_asinf); -+ TLI.setUnavailable(LibFunc_atanf); -+ TLI.setUnavailable(LibFunc_atan2f); -+ TLI.setUnavailable(LibFunc_ceilf); -+ TLI.setUnavailable(LibFunc_copysignf); -+ TLI.setUnavailable(LibFunc_cosf); -+ TLI.setUnavailable(LibFunc_coshf); -+ TLI.setUnavailable(LibFunc_expf); -+ TLI.setUnavailable(LibFunc_floorf); -+ TLI.setUnavailable(LibFunc_fminf); -+ TLI.setUnavailable(LibFunc_fmaxf); -+ TLI.setUnavailable(LibFunc_fmodf); -+ TLI.setUnavailable(LibFunc_logf); -+ TLI.setUnavailable(LibFunc_powf); -+ TLI.setUnavailable(LibFunc_sinf); -+ TLI.setUnavailable(LibFunc_sinhf); -+ TLI.setUnavailable(LibFunc_sqrtf); -+ TLI.setUnavailable(LibFunc_tanf); -+ TLI.setUnavailable(LibFunc_tanhf); - } - - // Win32 does *not* provide provide these functions, but they are - // generally available on POSIX-compliant systems: -- TLI.setUnavailable(LibFunc::access); -- TLI.setUnavailable(LibFunc::bcmp); -- TLI.setUnavailable(LibFunc::bcopy); -- TLI.setUnavailable(LibFunc::bzero); -- TLI.setUnavailable(LibFunc::chmod); -- TLI.setUnavailable(LibFunc::chown); -- TLI.setUnavailable(LibFunc::closedir); -- TLI.setUnavailable(LibFunc::ctermid); -- TLI.setUnavailable(LibFunc::fdopen); -- TLI.setUnavailable(LibFunc::ffs); -- TLI.setUnavailable(LibFunc::fileno); -- TLI.setUnavailable(LibFunc::flockfile); -- TLI.setUnavailable(LibFunc::fseeko); -- TLI.setUnavailable(LibFunc::fstat); -- TLI.setUnavailable(LibFunc::fstatvfs); -- TLI.setUnavailable(LibFunc::ftello); -- TLI.setUnavailable(LibFunc::ftrylockfile); -- TLI.setUnavailable(LibFunc::funlockfile); -- TLI.setUnavailable(LibFunc::getc_unlocked); -- TLI.setUnavailable(LibFunc::getitimer); -- TLI.setUnavailable(LibFunc::getlogin_r); -- TLI.setUnavailable(LibFunc::getpwnam); -- TLI.setUnavailable(LibFunc::gettimeofday); -- TLI.setUnavailable(LibFunc::htonl); -- TLI.setUnavailable(LibFunc::htons); -- TLI.setUnavailable(LibFunc::lchown); -- TLI.setUnavailable(LibFunc::lstat); -- TLI.setUnavailable(LibFunc::memccpy); -- TLI.setUnavailable(LibFunc::mkdir); -- TLI.setUnavailable(LibFunc::ntohl); -- TLI.setUnavailable(LibFunc::ntohs); -- TLI.setUnavailable(LibFunc::open); -- TLI.setUnavailable(LibFunc::opendir); -- TLI.setUnavailable(LibFunc::pclose); -- TLI.setUnavailable(LibFunc::popen); -- TLI.setUnavailable(LibFunc::pread); -- TLI.setUnavailable(LibFunc::pwrite); -- TLI.setUnavailable(LibFunc::read); -- TLI.setUnavailable(LibFunc::readlink); -- TLI.setUnavailable(LibFunc::realpath); -- TLI.setUnavailable(LibFunc::rmdir); -- TLI.setUnavailable(LibFunc::setitimer); -- TLI.setUnavailable(LibFunc::stat); -- TLI.setUnavailable(LibFunc::statvfs); -- TLI.setUnavailable(LibFunc::stpcpy); -- TLI.setUnavailable(LibFunc::stpncpy); -- TLI.setUnavailable(LibFunc::strcasecmp); -- TLI.setUnavailable(LibFunc::strncasecmp); -- TLI.setUnavailable(LibFunc::times); -- TLI.setUnavailable(LibFunc::uname); -- TLI.setUnavailable(LibFunc::unlink); -- TLI.setUnavailable(LibFunc::unsetenv); -- TLI.setUnavailable(LibFunc::utime); -- TLI.setUnavailable(LibFunc::utimes); -- TLI.setUnavailable(LibFunc::write); -+ TLI.setUnavailable(LibFunc_access); -+ TLI.setUnavailable(LibFunc_bcmp); -+ TLI.setUnavailable(LibFunc_bcopy); -+ TLI.setUnavailable(LibFunc_bzero); -+ TLI.setUnavailable(LibFunc_chmod); -+ TLI.setUnavailable(LibFunc_chown); -+ TLI.setUnavailable(LibFunc_closedir); -+ TLI.setUnavailable(LibFunc_ctermid); -+ TLI.setUnavailable(LibFunc_fdopen); -+ TLI.setUnavailable(LibFunc_ffs); -+ TLI.setUnavailable(LibFunc_fileno); -+ TLI.setUnavailable(LibFunc_flockfile); -+ TLI.setUnavailable(LibFunc_fseeko); -+ TLI.setUnavailable(LibFunc_fstat); -+ TLI.setUnavailable(LibFunc_fstatvfs); -+ TLI.setUnavailable(LibFunc_ftello); -+ TLI.setUnavailable(LibFunc_ftrylockfile); -+ TLI.setUnavailable(LibFunc_funlockfile); -+ TLI.setUnavailable(LibFunc_getc_unlocked); -+ TLI.setUnavailable(LibFunc_getitimer); -+ TLI.setUnavailable(LibFunc_getlogin_r); -+ TLI.setUnavailable(LibFunc_getpwnam); -+ TLI.setUnavailable(LibFunc_gettimeofday); -+ TLI.setUnavailable(LibFunc_htonl); -+ TLI.setUnavailable(LibFunc_htons); -+ TLI.setUnavailable(LibFunc_lchown); -+ TLI.setUnavailable(LibFunc_lstat); -+ TLI.setUnavailable(LibFunc_memccpy); -+ TLI.setUnavailable(LibFunc_mkdir); -+ TLI.setUnavailable(LibFunc_ntohl); -+ TLI.setUnavailable(LibFunc_ntohs); -+ TLI.setUnavailable(LibFunc_open); -+ TLI.setUnavailable(LibFunc_opendir); -+ TLI.setUnavailable(LibFunc_pclose); -+ TLI.setUnavailable(LibFunc_popen); -+ TLI.setUnavailable(LibFunc_pread); -+ TLI.setUnavailable(LibFunc_pwrite); -+ TLI.setUnavailable(LibFunc_read); -+ TLI.setUnavailable(LibFunc_readlink); -+ TLI.setUnavailable(LibFunc_realpath); -+ TLI.setUnavailable(LibFunc_rmdir); -+ TLI.setUnavailable(LibFunc_setitimer); -+ TLI.setUnavailable(LibFunc_stat); -+ TLI.setUnavailable(LibFunc_statvfs); -+ TLI.setUnavailable(LibFunc_stpcpy); -+ TLI.setUnavailable(LibFunc_stpncpy); -+ TLI.setUnavailable(LibFunc_strcasecmp); -+ TLI.setUnavailable(LibFunc_strncasecmp); -+ TLI.setUnavailable(LibFunc_times); -+ TLI.setUnavailable(LibFunc_uname); -+ TLI.setUnavailable(LibFunc_unlink); -+ TLI.setUnavailable(LibFunc_unsetenv); -+ TLI.setUnavailable(LibFunc_utime); -+ TLI.setUnavailable(LibFunc_utimes); -+ TLI.setUnavailable(LibFunc_write); - - // Win32 does *not* provide provide these functions, but they are - // specified by C99: -- TLI.setUnavailable(LibFunc::atoll); -- TLI.setUnavailable(LibFunc::frexpf); -- TLI.setUnavailable(LibFunc::llabs); -+ TLI.setUnavailable(LibFunc_atoll); -+ TLI.setUnavailable(LibFunc_frexpf); -+ TLI.setUnavailable(LibFunc_llabs); - } - - switch (T.getOS()) { -@@ -287,28 +287,28 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // for Intel processors (both OS X and iOS simulator) was incorrect for - // some values until OS X 10.11 and iOS 9.0. exp10l is not available on - // OS X or iOS. -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (T.isMacOSXVersionLT(10, 11)) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::IOS: - case Triple::TvOS: - case Triple::WatchOS: -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (!T.isWatchOS() && (T.isOSVersionLT(7, 0) || - (T.isOSVersionLT(9, 0) && - (T.getArch() == Triple::x86 || - T.getArch() == Triple::x86_64)))) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::Linux: -@@ -319,9 +319,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // - // Fall through to disable all of them. - default: -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); -+ TLI.setUnavailable(LibFunc_exp10l); - } - - // ffsl is available on at least Darwin, Mac OS X, iOS, FreeBSD, and -@@ -339,7 +339,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsl); -+ TLI.setUnavailable(LibFunc_ffsl); - } - - // ffsll is available on at least FreeBSD and Linux (GLIBC): -@@ -355,7 +355,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsll); -+ TLI.setUnavailable(LibFunc_ffsll); - } - - // The following functions are available on at least FreeBSD: -@@ -363,30 +363,30 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // http://svn.freebsd.org/base/head/lib/libc/string/flsl.c - // http://svn.freebsd.org/base/head/lib/libc/string/flsll.c - if (!T.isOSFreeBSD()) { -- TLI.setUnavailable(LibFunc::fls); -- TLI.setUnavailable(LibFunc::flsl); -- TLI.setUnavailable(LibFunc::flsll); -+ TLI.setUnavailable(LibFunc_fls); -+ TLI.setUnavailable(LibFunc_flsl); -+ TLI.setUnavailable(LibFunc_flsll); - } - - // The following functions are available on at least Linux: - if (!T.isOSLinux()) { -- TLI.setUnavailable(LibFunc::dunder_strdup); -- TLI.setUnavailable(LibFunc::dunder_strtok_r); -- TLI.setUnavailable(LibFunc::dunder_isoc99_scanf); -- TLI.setUnavailable(LibFunc::dunder_isoc99_sscanf); -- TLI.setUnavailable(LibFunc::under_IO_getc); -- TLI.setUnavailable(LibFunc::under_IO_putc); -- TLI.setUnavailable(LibFunc::memalign); -- TLI.setUnavailable(LibFunc::fopen64); -- TLI.setUnavailable(LibFunc::fseeko64); -- TLI.setUnavailable(LibFunc::fstat64); -- TLI.setUnavailable(LibFunc::fstatvfs64); -- TLI.setUnavailable(LibFunc::ftello64); -- TLI.setUnavailable(LibFunc::lstat64); -- TLI.setUnavailable(LibFunc::open64); -- TLI.setUnavailable(LibFunc::stat64); -- TLI.setUnavailable(LibFunc::statvfs64); -- TLI.setUnavailable(LibFunc::tmpfile64); -+ TLI.setUnavailable(LibFunc_dunder_strdup); -+ TLI.setUnavailable(LibFunc_dunder_strtok_r); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_scanf); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf); -+ TLI.setUnavailable(LibFunc_under_IO_getc); -+ TLI.setUnavailable(LibFunc_under_IO_putc); -+ TLI.setUnavailable(LibFunc_memalign); -+ TLI.setUnavailable(LibFunc_fopen64); -+ TLI.setUnavailable(LibFunc_fseeko64); -+ TLI.setUnavailable(LibFunc_fstat64); -+ TLI.setUnavailable(LibFunc_fstatvfs64); -+ TLI.setUnavailable(LibFunc_ftello64); -+ TLI.setUnavailable(LibFunc_lstat64); -+ TLI.setUnavailable(LibFunc_open64); -+ TLI.setUnavailable(LibFunc_stat64); -+ TLI.setUnavailable(LibFunc_statvfs64); -+ TLI.setUnavailable(LibFunc_tmpfile64); - } - - TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary); -@@ -446,9 +446,9 @@ static StringRef sanitizeFunctionName(StringRef funcName) { - } - - bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const char *const *Start = &StandardNames[0]; -- const char *const *End = &StandardNames[LibFunc::NumLibFuncs]; -+ const char *const *End = &StandardNames[NumLibFuncs]; - - funcName = sanitizeFunctionName(funcName); - if (funcName.empty()) -@@ -459,14 +459,14 @@ bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, - return std::strncmp(LHS, RHS.data(), RHS.size()) < 0; - }); - if (I != End && *I == funcName) { -- F = (LibFunc::Func)(I - Start); -+ F = (LibFunc)(I - Start); - return true; - } - return false; - } - - bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, -- LibFunc::Func F, -+ LibFunc F, - const DataLayout *DL) const { - LLVMContext &Ctx = FTy.getContext(); - Type *PCharTy = Type::getInt8PtrTy(Ctx); -@@ -477,489 +477,489 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - unsigned NumParams = FTy.getNumParams(); - - switch (F) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1)->isIntegerTy()); - -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return ((NumParams == 2 || NumParams == 3) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::strcat: -+ case LibFunc_strcat: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType()); - -- case LibFunc::strncat: -+ case LibFunc_strncat: - return (NumParams == 3 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType() && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strcpy_chk: -- case LibFunc::stpcpy_chk: -+ case LibFunc_strcpy_chk: -+ case LibFunc_stpcpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: - return (NumParams == 2 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy); - -- case LibFunc::strncpy_chk: -- case LibFunc::stpncpy_chk: -+ case LibFunc_strncpy_chk: -+ case LibFunc_stpncpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return (NumParams == 2 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strspn: -- case LibFunc::strcspn: -+ case LibFunc_strspn: -+ case LibFunc_strcspn: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strcoll: -- case LibFunc::strcasecmp: -- case LibFunc::strncasecmp: -+ case LibFunc_strcoll: -+ case LibFunc_strcasecmp: -+ case LibFunc_strncasecmp: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strstr: -+ case LibFunc_strstr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::scanf: -+ case LibFunc_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::system: -+ case LibFunc_system: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::malloc: -+ case LibFunc_malloc: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy()); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getReturnType()->isIntegerTy(32)); - -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy(32) && - FTy.getParamType(2)->isIntegerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::memcpy_chk: -- case LibFunc::memmove_chk: -+ case LibFunc_memcpy_chk: -+ case LibFunc_memmove_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memcpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memmove: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memset: -+ case LibFunc_memset: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memccpy: -+ case LibFunc_memccpy: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::memalign: -+ case LibFunc_memalign: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::realloc: -+ case LibFunc_realloc: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::read: -+ case LibFunc_read: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::rewind: -+ case LibFunc_rewind: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rename: -+ case LibFunc_rename: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::readlink: -+ case LibFunc_readlink: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::write: -+ case LibFunc_write: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bzero: -+ case LibFunc_bzero: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::calloc: -+ case LibFunc_calloc: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy()); - -- case LibFunc::atof: -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atoll: -- case LibFunc::ferror: -- case LibFunc::getenv: -- case LibFunc::getpwnam: -- case LibFunc::pclose: -- case LibFunc::perror: -- case LibFunc::printf: -- case LibFunc::puts: -- case LibFunc::uname: -- case LibFunc::under_IO_getc: -- case LibFunc::unlink: -- case LibFunc::unsetenv: -+ case LibFunc_atof: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atoll: -+ case LibFunc_ferror: -+ case LibFunc_getenv: -+ case LibFunc_getpwnam: -+ case LibFunc_pclose: -+ case LibFunc_perror: -+ case LibFunc_printf: -+ case LibFunc_puts: -+ case LibFunc_uname: -+ case LibFunc_under_IO_getc: -+ case LibFunc_unlink: -+ case LibFunc_unsetenv: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::chmod: -- case LibFunc::chown: -- case LibFunc::clearerr: -- case LibFunc::closedir: -- case LibFunc::ctermid: -- case LibFunc::fclose: -- case LibFunc::feof: -- case LibFunc::fflush: -- case LibFunc::fgetc: -- case LibFunc::fileno: -- case LibFunc::flockfile: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::fseeko64: -- case LibFunc::fseeko: -- case LibFunc::fsetpos: -- case LibFunc::ftell: -- case LibFunc::ftello64: -- case LibFunc::ftello: -- case LibFunc::ftrylockfile: -- case LibFunc::funlockfile: -- case LibFunc::getc: -- case LibFunc::getc_unlocked: -- case LibFunc::getlogin_r: -- case LibFunc::mkdir: -- case LibFunc::mktime: -- case LibFunc::times: -+ case LibFunc_chmod: -+ case LibFunc_chown: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: -+ case LibFunc_ctermid: -+ case LibFunc_fclose: -+ case LibFunc_feof: -+ case LibFunc_fflush: -+ case LibFunc_fgetc: -+ case LibFunc_fileno: -+ case LibFunc_flockfile: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_fseeko64: -+ case LibFunc_fseeko: -+ case LibFunc_fsetpos: -+ case LibFunc_ftell: -+ case LibFunc_ftello64: -+ case LibFunc_ftello: -+ case LibFunc_ftrylockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_getc: -+ case LibFunc_getc_unlocked: -+ case LibFunc_getlogin_r: -+ case LibFunc_mkdir: -+ case LibFunc_mktime: -+ case LibFunc_times: - return (NumParams != 0 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::access: -+ case LibFunc_access: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::fopen: -+ case LibFunc_fopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgets: -+ case LibFunc_fgets: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::fread: -+ case LibFunc_fread: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return (NumParams == 4 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::gets: -- case LibFunc::getchar: -- case LibFunc::getitimer: -+ case LibFunc_gets: -+ case LibFunc_getchar: -+ case LibFunc_getitimer: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::putc: -+ case LibFunc_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::pread: -- case LibFunc::pwrite: -+ case LibFunc_pread: -+ case LibFunc_pwrite: - return (NumParams == 4 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::popen: -+ case LibFunc_popen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::valloc: -+ case LibFunc_valloc: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::open: -+ case LibFunc_open: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::opendir: -+ case LibFunc_opendir: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -- case LibFunc::lstat: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: -+ case LibFunc_lstat: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::lchown: -+ case LibFunc_lchown: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::qsort: -+ case LibFunc_qsort: - return (NumParams == 4 && FTy.getParamType(3)->isPointerTy()); -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::open64: -+ case LibFunc_open64: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::Znwj: // new(unsigned int); -- case LibFunc::Znwm: // new(unsigned long); -- case LibFunc::Znaj: // new[](unsigned int); -- case LibFunc::Znam: // new[](unsigned long); -- case LibFunc::msvc_new_int: // new(unsigned int); -- case LibFunc::msvc_new_longlong: // new(unsigned long long); -- case LibFunc::msvc_new_array_int: // new[](unsigned int); -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long); -+ case LibFunc_Znwj: // new(unsigned int); -+ case LibFunc_Znwm: // new(unsigned long); -+ case LibFunc_Znaj: // new[](unsigned int); -+ case LibFunc_Znam: // new[](unsigned long); -+ case LibFunc_msvc_new_int: // new(unsigned int); -+ case LibFunc_msvc_new_longlong: // new(unsigned long long); -+ case LibFunc_msvc_new_array_int: // new[](unsigned int); -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long); - return (NumParams == 1); - -- case LibFunc::memset_pattern16: -+ case LibFunc_memset_pattern16: - return (!FTy.isVarArg() && NumParams == 3 && - isa(FTy.getParamType(0)) && - isa(FTy.getParamType(1)) && - isa(FTy.getParamType(2))); - -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - return (NumParams == 1 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return (NumParams == 2 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getReturnType() == FTy.getParamType(1)); - -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -- case LibFunc::isdigit: -- case LibFunc::isascii: -- case LibFunc::toascii: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: -+ case LibFunc_isdigit: -+ case LibFunc_isascii: -+ case LibFunc_toascii: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isIntegerTy()); - -- case LibFunc::fls: -- case LibFunc::flsl: -- case LibFunc::flsll: -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_fls: -+ case LibFunc_flsl: -+ case LibFunc_flsll: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::cxa_atexit: -+ case LibFunc_cxa_atexit: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); - -- case LibFunc::sinpi: -- case LibFunc::cospi: -+ case LibFunc_sinpi: -+ case LibFunc_cospi: - return (NumParams == 1 && FTy.getReturnType()->isDoubleTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::sinpif: -- case LibFunc::cospif: -+ case LibFunc_sinpif: -+ case LibFunc_cospif: - return (NumParams == 1 && FTy.getReturnType()->isFloatTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -@@ -971,7 +971,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - } - - bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const DataLayout *DL = - FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; - return getLibFunc(FDecl.getName(), F) && -diff --git a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -index b3bc885c..945acb8b 100644 ---- a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -+++ b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -@@ -135,7 +135,7 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - if (!TLI) - return Intrinsic::not_intrinsic; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = CI->getCalledFunction(); - // We're going to make assumptions on the semantics of the functions, check - // that the target knows that it's available in this environment and it does -@@ -148,77 +148,77 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - switch (Func) { - default: - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - return checkUnaryFloatSignature(*CI, Intrinsic::sin); -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - return checkUnaryFloatSignature(*CI, Intrinsic::cos); -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: - return checkUnaryFloatSignature(*CI, Intrinsic::exp); -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - return checkUnaryFloatSignature(*CI, Intrinsic::exp2); -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: - return checkUnaryFloatSignature(*CI, Intrinsic::log); -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: - return checkUnaryFloatSignature(*CI, Intrinsic::log10); -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - return checkUnaryFloatSignature(*CI, Intrinsic::log2); -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - return checkUnaryFloatSignature(*CI, Intrinsic::fabs); -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - return checkBinaryFloatSignature(*CI, Intrinsic::minnum); -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - return checkBinaryFloatSignature(*CI, Intrinsic::maxnum); -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - return checkBinaryFloatSignature(*CI, Intrinsic::copysign); -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - return checkUnaryFloatSignature(*CI, Intrinsic::floor); -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - return checkUnaryFloatSignature(*CI, Intrinsic::ceil); -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - return checkUnaryFloatSignature(*CI, Intrinsic::trunc); -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - return checkUnaryFloatSignature(*CI, Intrinsic::rint); -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - return checkUnaryFloatSignature(*CI, Intrinsic::nearbyint); -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - return checkUnaryFloatSignature(*CI, Intrinsic::round); -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return checkBinaryFloatSignature(*CI, Intrinsic::pow); - } - -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -index a8d4d296..da81eabd 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -@@ -1379,7 +1379,7 @@ bool FastISel::selectInstruction(const Instruction *I) { - - if (const auto *Call = dyn_cast(I)) { - const Function *F = Call->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - - // As a special case, don't handle calls to builtin library functions that - // may be translated directly to target instructions. -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -index 7f64d7b4..44800eca 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -@@ -6125,15 +6125,15 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - - // Check for well-known libc/libm calls. If the function is internal, it - // can't be a library call. -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { - switch (Func) { - default: break; -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - if (I.getNumArgOperands() == 2 && // Basic sanity checks. - I.getArgOperand(0)->getType()->isFloatingPointTy() && - I.getType() == I.getArgOperand(0)->getType() && -@@ -6146,118 +6146,118 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - return; - } - break; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - if (visitUnaryFloatCall(I, ISD::FABS)) - return; - break; -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - if (visitBinaryFloatCall(I, ISD::FMINNUM)) - return; - break; -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - if (visitBinaryFloatCall(I, ISD::FMAXNUM)) - return; - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - if (visitUnaryFloatCall(I, ISD::FSIN)) - return; - break; -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - if (visitUnaryFloatCall(I, ISD::FCOS)) - return; - break; -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: -- case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: -+ case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: - if (visitUnaryFloatCall(I, ISD::FSQRT)) - return; - break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - if (visitUnaryFloatCall(I, ISD::FFLOOR)) - return; - break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - if (visitUnaryFloatCall(I, ISD::FNEARBYINT)) - return; - break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - if (visitUnaryFloatCall(I, ISD::FCEIL)) - return; - break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - if (visitUnaryFloatCall(I, ISD::FRINT)) - return; - break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - if (visitUnaryFloatCall(I, ISD::FROUND)) - return; - break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - if (visitUnaryFloatCall(I, ISD::FTRUNC)) - return; - break; -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - if (visitUnaryFloatCall(I, ISD::FLOG2)) - return; - break; -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - if (visitUnaryFloatCall(I, ISD::FEXP2)) - return; - break; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - if (visitMemCmpCall(I)) - return; - break; -- case LibFunc::memchr: -+ case LibFunc_memchr: - if (visitMemChrCall(I)) - return; - break; -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - if (visitStrCpyCall(I, false)) - return; - break; -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - if (visitStrCpyCall(I, true)) - return; - break; -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - if (visitStrCmpCall(I)) - return; - break; -- case LibFunc::strlen: -+ case LibFunc_strlen: - if (visitStrLenCall(I)) - return; - break; -- case LibFunc::strnlen: -+ case LibFunc_strnlen: - if (visitStrNLenCall(I)) - return; - break; -diff --git a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -index bed784a5..5110cddd 100644 ---- a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -+++ b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -@@ -63,9 +63,9 @@ private: - - // TargetLibraryInfo has info on C runtime library calls on the current - // target. -- for (unsigned I = 0, E = static_cast(LibFunc::NumLibFuncs); -+ for (unsigned I = 0, E = static_cast(NumLibFuncs); - I != E; ++I) { -- LibFunc::Func F = static_cast(I); -+ LibFunc F = static_cast(I); - if (TLI.has(F)) - Libcalls.insert(TLI.getName(F)); - } -diff --git a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -index b6ac4d54..10f1f20e 100644 ---- a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -+++ b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -@@ -313,7 +313,7 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - // (i.e. soft float or atomics). If adapting for targets that do, - // additional care is required here. - -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && LibInfo && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { -@@ -327,42 +327,42 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - - switch (Func) { - default: return true; -- case LibFunc::copysign: -- case LibFunc::copysignf: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: - continue; // ISD::FCOPYSIGN is never a library call. -- case LibFunc::copysignl: -+ case LibFunc_copysignl: - return true; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - continue; // ISD::FABS is never a library call. -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - Opcode = ISD::FSQRT; break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - Opcode = ISD::FFLOOR; break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - Opcode = ISD::FNEARBYINT; break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - Opcode = ISD::FCEIL; break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - Opcode = ISD::FRINT; break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - Opcode = ISD::FROUND; break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - Opcode = ISD::FTRUNC; break; - } - -diff --git a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -index 29d2c99f..f258f38a 100644 ---- a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -+++ b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -@@ -3067,7 +3067,7 @@ bool GlobalOpt::OptimizeGlobalAliases(Module &M) { - } - - static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { -- LibFunc::Func F = LibFunc::cxa_atexit; -+ LibFunc F = LibFunc_cxa_atexit; - if (!TLI->has(F)) - return nullptr; - -@@ -3076,7 +3076,7 @@ static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { - return nullptr; - - // Make sure that the function has the correct prototype. -- if (!TLI->getLibFunc(*Fn, F) || F != LibFunc::cxa_atexit) -+ if (!TLI->getLibFunc(*Fn, F) || F != LibFunc_cxa_atexit) - return nullptr; - - return Fn; -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -index 36ad0a5f..2a644844 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -@@ -176,20 +176,20 @@ static bool hasMemoryWrite(Instruction *I, const TargetLibraryInfo &TLI) { - } - if (auto CS = CallSite(I)) { - if (Function *F = CS.getCalledFunction()) { -- if (TLI.has(LibFunc::strcpy) && -- F->getName() == TLI.getName(LibFunc::strcpy)) { -+ if (TLI.has(LibFunc_strcpy) && -+ F->getName() == TLI.getName(LibFunc_strcpy)) { - return true; - } -- if (TLI.has(LibFunc::strncpy) && -- F->getName() == TLI.getName(LibFunc::strncpy)) { -+ if (TLI.has(LibFunc_strncpy) && -+ F->getName() == TLI.getName(LibFunc_strncpy)) { - return true; - } -- if (TLI.has(LibFunc::strcat) && -- F->getName() == TLI.getName(LibFunc::strcat)) { -+ if (TLI.has(LibFunc_strcat) && -+ F->getName() == TLI.getName(LibFunc_strcat)) { - return true; - } -- if (TLI.has(LibFunc::strncat) && -- F->getName() == TLI.getName(LibFunc::strncat)) { -+ if (TLI.has(LibFunc_strncat) && -+ F->getName() == TLI.getName(LibFunc_strncat)) { - return true; - } - } -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -index fa87b5b1..e13fd802 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -@@ -210,9 +210,9 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L, LPPassManager &LPM) { - *CurLoop->getHeader()->getParent()); - DL = &CurLoop->getHeader()->getModule()->getDataLayout(); - -- HasMemset = TLI->has(LibFunc::memset); -- HasMemsetPattern = TLI->has(LibFunc::memset_pattern16); -- HasMemcpy = TLI->has(LibFunc::memcpy); -+ HasMemset = TLI->has(LibFunc_memset); -+ HasMemsetPattern = TLI->has(LibFunc_memset_pattern16); -+ HasMemcpy = TLI->has(LibFunc_memcpy); - - if (HasMemset || HasMemsetPattern || HasMemcpy) - if (SE->hasLoopInvariantBackedgeTakenCount(L)) -@@ -489,7 +489,7 @@ bool LoopIdiomRecognize::processLoopMemSet(MemSetInst *MSI, - return false; - - // If we're not allowed to hack on memset, we fail. -- if (!TLI->has(LibFunc::memset)) -+ if (!TLI->has(LibFunc_memset)) - return false; - - Value *Pointer = MSI->getDest(); -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -index 6b43b0f7..d4fd8ce4 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -@@ -1144,7 +1144,7 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) { - bool MemCpyOpt::processMemMove(MemMoveInst *M) { - AliasAnalysis &AA = getAnalysis().getAAResults(); - -- if (!TLI->has(LibFunc::memmove)) -+ if (!TLI->has(LibFunc_memmove)) - return false; - - // See if the pointers alias. -@@ -1290,7 +1290,7 @@ bool MemCpyOpt::runOnFunction(Function &F) { - // If we don't have at least memset and memcpy, there is little point of doing - // anything here. These are required by a freestanding implementation, so if - // even they are disabled, there is no point in trying hard. -- if (!TLI->has(LibFunc::memset) || !TLI->has(LibFunc::memcpy)) -+ if (!TLI->has(LibFunc_memset) || !TLI->has(LibFunc_memcpy)) - return false; - - while (1) { -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -index 9f26f788..aa08538a 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -@@ -77,14 +77,14 @@ bool PartiallyInlineLibCalls::runOnFunction(Function &F) { - - // Skip if function either has local linkage or is not a known library - // function. -- LibFunc::Func LibFunc; -+ LibFunc LF; - if (CalledFunc->hasLocalLinkage() || !CalledFunc->hasName() || -- !TLI->getLibFunc(CalledFunc->getName(), LibFunc)) -+ !TLI->getLibFunc(CalledFunc->getName(), LF)) - continue; - -- switch (LibFunc) { -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -+ switch (LF) { -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: - if (TTI->haveFastSqrt(Call->getType()) && - optimizeSQRT(Call, CalledFunc, *CurrBB, BB)) - break; -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -index 85d0299d..5b6dbdfd 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -@@ -107,254 +107,254 @@ static bool setNonNull(Function &F, unsigned n) { - } - - bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { -- LibFunc::Func TheLibFunc; -+ LibFunc TheLibFunc; - if (!(TLI.getLibFunc(F, TheLibFunc) && TLI.has(TheLibFunc))) - return false; - - bool Changed = false; - switch (TheLibFunc) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -- case LibFunc::strcat: -- case LibFunc::strncat: -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: -+ case LibFunc_strcat: -+ case LibFunc_strncat: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strcmp: // 0,1 -- case LibFunc::strspn: // 0,1 -- case LibFunc::strncmp: // 0,1 -- case LibFunc::strcspn: // 0,1 -- case LibFunc::strcoll: // 0,1 -- case LibFunc::strcasecmp: // 0,1 -- case LibFunc::strncasecmp: // -+ case LibFunc_strcmp: // 0,1 -+ case LibFunc_strspn: // 0,1 -+ case LibFunc_strncmp: // 0,1 -+ case LibFunc_strcspn: // 0,1 -+ case LibFunc_strcoll: // 0,1 -+ case LibFunc_strcasecmp: // 0,1 -+ case LibFunc_strncasecmp: // - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strstr: -- case LibFunc::strpbrk: -+ case LibFunc_strstr: -+ case LibFunc_strpbrk: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::scanf: -+ case LibFunc_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::system: -+ case LibFunc_system: - // May throw; "system" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::malloc: -+ case LibFunc_malloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memcpy: -- case LibFunc::memccpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memccpy: -+ case LibFunc_memmove: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::memalign: -+ case LibFunc_memalign: - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::mkdir: -+ case LibFunc_mkdir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::mktime: -+ case LibFunc_mktime: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::realloc: -+ case LibFunc_realloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::read: -+ case LibFunc_read: - // May throw; "read" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::rewind: -+ case LibFunc_rewind: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::rename: -+ case LibFunc_rename: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::readlink: -+ case LibFunc_readlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::write: -+ case LibFunc_write: - // May throw; "write" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::bzero: -+ case LibFunc_bzero: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::calloc: -+ case LibFunc_calloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::chmod: -- case LibFunc::chown: -+ case LibFunc_chmod: -+ case LibFunc_chown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ctermid: -- case LibFunc::clearerr: -- case LibFunc::closedir: -+ case LibFunc_ctermid: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atof: -- case LibFunc::atoll: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atof: -+ case LibFunc_atoll: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::access: -+ case LibFunc_access: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fopen: -+ case LibFunc_fopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -362,150 +362,150 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::feof: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::ftell: -- case LibFunc::fgetc: -- case LibFunc::fseeko: -- case LibFunc::ftello: -- case LibFunc::fileno: -- case LibFunc::fflush: -- case LibFunc::fclose: -- case LibFunc::fsetpos: -- case LibFunc::flockfile: -- case LibFunc::funlockfile: -- case LibFunc::ftrylockfile: -+ case LibFunc_feof: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_ftell: -+ case LibFunc_fgetc: -+ case LibFunc_fseeko: -+ case LibFunc_ftello: -+ case LibFunc_fileno: -+ case LibFunc_fflush: -+ case LibFunc_fclose: -+ case LibFunc_fsetpos: -+ case LibFunc_flockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_ftrylockfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::ferror: -+ case LibFunc_ferror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F); - return Changed; -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::fgets: -+ case LibFunc_fgets: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 3); - return Changed; -- case LibFunc::fread: -+ case LibFunc_fread: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - // FIXME: readonly #1? - return Changed; -- case LibFunc::fputs: -+ case LibFunc_fputs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getc: -- case LibFunc::getlogin_r: -- case LibFunc::getc_unlocked: -+ case LibFunc_getc: -+ case LibFunc_getlogin_r: -+ case LibFunc_getc_unlocked: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::getenv: -+ case LibFunc_getenv: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::gets: -- case LibFunc::getchar: -+ case LibFunc_gets: -+ case LibFunc_getchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::getitimer: -+ case LibFunc_getitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getpwnam: -+ case LibFunc_getpwnam: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::uname: -+ case LibFunc_uname: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::unlink: -+ case LibFunc_unlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::unsetenv: -+ case LibFunc_unsetenv: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putc: -+ case LibFunc_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::puts: -- case LibFunc::printf: -- case LibFunc::perror: -+ case LibFunc_puts: -+ case LibFunc_printf: -+ case LibFunc_perror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::pread: -+ case LibFunc_pread: - // May throw; "pread" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::pwrite: -+ case LibFunc_pwrite: - // May throw; "pwrite" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putchar: -+ case LibFunc_putchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::popen: -+ case LibFunc_popen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -513,132 +513,132 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::pclose: -+ case LibFunc_pclose: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::valloc: -+ case LibFunc_valloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::open: -+ case LibFunc_open: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::opendir: -+ case LibFunc_opendir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::times: -+ case LibFunc_times: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAccessMemory(F); - return Changed; -- case LibFunc::lstat: -+ case LibFunc_lstat: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::lchown: -+ case LibFunc_lchown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::qsort: -+ case LibFunc_qsort: - // May throw; places call through function pointer. - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::under_IO_getc: -+ case LibFunc_under_IO_getc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -646,26 +646,26 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fseeko64: -- case LibFunc::ftello64: -+ case LibFunc_fseeko64: -+ case LibFunc_ftello64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::open64: -+ case LibFunc_open64: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - // Currently some platforms have the restrict keyword on the arguments to - // gettimeofday. To be conservative, do not add noalias to gettimeofday's - // arguments. -@@ -673,22 +673,22 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::Znwj: // new(unsigned int) -- case LibFunc::Znwm: // new(unsigned long) -- case LibFunc::Znaj: // new[](unsigned int) -- case LibFunc::Znam: // new[](unsigned long) -- case LibFunc::msvc_new_int: // new(unsigned int) -- case LibFunc::msvc_new_longlong: // new(unsigned long long) -- case LibFunc::msvc_new_array_int: // new[](unsigned int) -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long) -+ case LibFunc_Znwj: // new(unsigned int) -+ case LibFunc_Znwm: // new(unsigned long) -+ case LibFunc_Znaj: // new[](unsigned int) -+ case LibFunc_Znam: // new[](unsigned long) -+ case LibFunc_msvc_new_int: // new(unsigned int) -+ case LibFunc_msvc_new_longlong: // new(unsigned long long) -+ case LibFunc_msvc_new_array_int: // new[](unsigned int) -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long) - // Operator new always returns a nonnull noalias pointer - Changed |= setNonNull(F, AttributeSet::ReturnIndex); - Changed |= setDoesNotAlias(F, AttributeSet::ReturnIndex); - return Changed; - //TODO: add LibFunc entries for: -- //case LibFunc::memset_pattern4: -- //case LibFunc::memset_pattern8: -- case LibFunc::memset_pattern16: -+ //case LibFunc_memset_pattern4: -+ //case LibFunc_memset_pattern8: -+ case LibFunc_memset_pattern16: - Changed |= setOnlyAccessesArgMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); -@@ -711,7 +711,7 @@ Value *llvm::castToCStr(Value *V, IRBuilder<> &B) { - - Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strlen)) -+ if (!TLI->has(LibFunc_strlen)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -728,7 +728,7 @@ Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - - Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strchr)) -+ if (!TLI->has(LibFunc_strchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -746,7 +746,7 @@ Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - - Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strncmp)) -+ if (!TLI->has(LibFunc_strncmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -766,7 +766,7 @@ Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - - Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strcpy)) -+ if (!TLI->has(LibFunc_strcpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -782,7 +782,7 @@ Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - - Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strncpy)) -+ if (!TLI->has(LibFunc_strncpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -800,7 +800,7 @@ Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcpy_chk)) -+ if (!TLI->has(LibFunc_memcpy_chk)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -822,7 +822,7 @@ Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - - Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memchr)) -+ if (!TLI->has(LibFunc_memchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -841,7 +841,7 @@ Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - - Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcmp)) -+ if (!TLI->has(LibFunc_memcmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -909,7 +909,7 @@ Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name, - - Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::putchar)) -+ if (!TLI->has(LibFunc_putchar)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -929,7 +929,7 @@ Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - - Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::puts)) -+ if (!TLI->has(LibFunc_puts)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -944,7 +944,7 @@ Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - - Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputc)) -+ if (!TLI->has(LibFunc_fputc)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -963,11 +963,11 @@ Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - - Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputs)) -+ if (!TLI->has(LibFunc_fputs)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -- StringRef FPutsName = TLI->getName(LibFunc::fputs); -+ StringRef FPutsName = TLI->getName(LibFunc_fputs); - Constant *F = M->getOrInsertFunction( - FPutsName, B.getInt32Ty(), B.getInt8PtrTy(), File->getType(), nullptr); - if (File->getType()->isPointerTy()) -@@ -981,12 +981,12 @@ Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - - Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fwrite)) -+ if (!TLI->has(LibFunc_fwrite)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); - LLVMContext &Context = B.GetInsertBlock()->getContext(); -- StringRef FWriteName = TLI->getName(LibFunc::fwrite); -+ StringRef FWriteName = TLI->getName(LibFunc_fwrite); - Constant *F = M->getOrInsertFunction( - FWriteName, DL.getIntPtrType(Context), B.getInt8PtrTy(), - DL.getIntPtrType(Context), DL.getIntPtrType(Context), File->getType(), -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -index 7bdc00c7..ec7937fc 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -@@ -308,7 +308,7 @@ bool llvm::obfuscateModule(Module &M, const TargetMachine *TM, Obfuscator &obfs, - TargetLibraryInfoImpl TLII(Triple(M.getTargetTriple())); - TargetLibraryInfo TLI(TLII); - auto isLibName = [&TLI](StringRef &S) { -- LibFunc::Func F; -+ LibFunc F; - return TLI.getLibFunc(S, F); - }; - -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -index fecded3c..b3238cbb 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -@@ -52,9 +52,9 @@ static cl::opt - // Helper Functions - //===----------------------------------------------------------------------===// - --static bool ignoreCallingConv(LibFunc::Func Func) { -- return Func == LibFunc::abs || Func == LibFunc::labs || -- Func == LibFunc::llabs || Func == LibFunc::strlen; -+static bool ignoreCallingConv(LibFunc Func) { -+ return Func == LibFunc_abs || Func == LibFunc_labs || -+ Func == LibFunc_llabs || Func == LibFunc_strlen; - } - - /// Return true if it only matters that the value is equal or not-equal to zero. -@@ -92,8 +92,8 @@ static bool callHasFloatingPointArgument(const CallInst *CI) { - /// \brief Check whether the overloaded unary floating point function - /// corresponding to \a Ty is available. - static bool hasUnaryFloatFn(const TargetLibraryInfo *TLI, Type *Ty, -- LibFunc::Func DoubleFn, LibFunc::Func FloatFn, -- LibFunc::Func LongDoubleFn) { -+ LibFunc DoubleFn, LibFunc FloatFn, -+ LibFunc LongDoubleFn) { - switch (Ty->getTypeID()) { - case Type::FloatTyID: - return TLI->has(FloatFn); -@@ -896,15 +896,15 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return Op1C; - // pow(2.0, x) -> exp2(x) - if (Op1C->isExactlyValue(2.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f, -- LibFunc::exp2l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp2), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp2, LibFunc_exp2f, -+ LibFunc_exp2l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp2), B, - Callee->getAttributes()); - // pow(10.0, x) -> exp10(x) - if (Op1C->isExactlyValue(10.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f, -- LibFunc::exp10l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp10, LibFunc_exp10f, -+ LibFunc_exp10l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp10), B, - Callee->getAttributes()); - } - -@@ -916,10 +916,10 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - // pow(exp(x), y) = pow(inf, 0.001) = inf, whereas exp(x*y) = exp(1). - auto *OpC = dyn_cast(Op1); - if (OpC && OpC->hasUnsafeAlgebra() && CI->hasUnsafeAlgebra()) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *OpCCallee = OpC->getCalledFunction(); - if (OpCCallee && TLI->getLibFunc(OpCCallee->getName(), Func) && -- TLI->has(Func) && (Func == LibFunc::exp || Func == LibFunc::exp2)) { -+ TLI->has(Func) && (Func == LibFunc_exp || Func == LibFunc_exp2)) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); - Value *FMul = B.CreateFMul(OpC->getArgOperand(0), Op2, "mul"); -@@ -936,16 +936,16 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return ConstantFP::get(CI->getType(), 1.0); - - if (Op2C->isExactlyValue(0.5) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::sqrt, LibFunc::sqrtf, -- LibFunc::sqrtl) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::fabs, LibFunc::fabsf, -- LibFunc::fabsl)) { -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_sqrt, LibFunc_sqrtf, -+ LibFunc_sqrtl) && -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_fabs, LibFunc_fabsf, -+ LibFunc_fabsl)) { - - // In -ffast-math, pow(x, 0.5) -> sqrt(x). - if (CI->hasUnsafeAlgebra()) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); -- return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B, -+ return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc_sqrt), B, - Callee->getAttributes()); - } - -@@ -1018,11 +1018,11 @@ Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilder<> &B) { - Value *Op = CI->getArgOperand(0); - // Turn exp2(sitofp(x)) -> ldexp(1.0, sext(x)) if sizeof(x) <= 32 - // Turn exp2(uitofp(x)) -> ldexp(1.0, zext(x)) if sizeof(x) < 32 -- LibFunc::Func LdExp = LibFunc::ldexpl; -+ LibFunc LdExp = LibFunc_ldexpl; - if (Op->getType()->isFloatTy()) -- LdExp = LibFunc::ldexpf; -+ LdExp = LibFunc_ldexpf; - else if (Op->getType()->isDoubleTy()) -- LdExp = LibFunc::ldexp; -+ LdExp = LibFunc_ldexp; - - if (TLI->has(LdExp)) { - Value *LdExpArg = nullptr; -@@ -1153,17 +1153,17 @@ Value *LibCallSimplifier::optimizeLog(CallInst *CI, IRBuilder<> &B) { - FMF.setUnsafeAlgebra(); - B.setFastMathFlags(FMF); - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && ((TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- Func == LibFunc::pow) || F->getIntrinsicID() == Intrinsic::pow)) -+ Func == LibFunc_pow) || F->getIntrinsicID() == Intrinsic::pow)) - return B.CreateFMul(OpC->getArgOperand(1), - emitUnaryFloatFnCall(OpC->getOperand(0), Callee->getName(), B, - Callee->getAttributes()), "mul"); - - // log(exp2(y)) -> y*log(2) - if (F && Name == "log" && TLI->getLibFunc(F->getName(), Func) && -- TLI->has(Func) && Func == LibFunc::exp2) -+ TLI->has(Func) && Func == LibFunc_exp2) - return B.CreateFMul( - OpC->getArgOperand(0), - emitUnaryFloatFnCall(ConstantFP::get(CI->getType(), 2.0), -@@ -1176,7 +1176,7 @@ Value *LibCallSimplifier::optimizeSqrt(CallInst *CI, IRBuilder<> &B) { - Function *Callee = CI->getCalledFunction(); - - Value *Ret = nullptr; -- if (TLI->has(LibFunc::sqrtf) && (Callee->getName() == "sqrt" || -+ if (TLI->has(LibFunc_sqrtf) && (Callee->getName() == "sqrt" || - Callee->getIntrinsicID() == Intrinsic::sqrt)) - Ret = optimizeUnaryDoubleFP(CI, B, true); - -@@ -1275,12 +1275,12 @@ Value *LibCallSimplifier::optimizeTan(CallInst *CI, IRBuilder<> &B) { - // tan(atan(x)) -> x - // tanf(atanf(x)) -> x - // tanl(atanl(x)) -> x -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- ((Func == LibFunc::atan && Callee->getName() == "tan") || -- (Func == LibFunc::atanf && Callee->getName() == "tanf") || -- (Func == LibFunc::atanl && Callee->getName() == "tanl"))) -+ ((Func == LibFunc_atan && Callee->getName() == "tan") || -+ (Func == LibFunc_atanf && Callee->getName() == "tanf") || -+ (Func == LibFunc_atanl && Callee->getName() == "tanl"))) - Ret = OpC->getArgOperand(0); - return Ret; - } -@@ -1348,24 +1348,24 @@ LibCallSimplifier::classifyArgUse(Value *Val, Function *F, bool IsFloat, - return; - - Function *Callee = CI->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - if (!Callee || !TLI->getLibFunc(*Callee, Func) || !TLI->has(Func) || - !isTrigLibCall(CI)) - return; - - if (IsFloat) { -- if (Func == LibFunc::sinpif) -+ if (Func == LibFunc_sinpif) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospif) -+ else if (Func == LibFunc_cospif) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospif_stret) -+ else if (Func == LibFunc_sincospif_stret) - SinCosCalls.push_back(CI); - } else { -- if (Func == LibFunc::sinpi) -+ if (Func == LibFunc_sinpi) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospi) -+ else if (Func == LibFunc_cospi) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospi_stret) -+ else if (Func == LibFunc_sincospi_stret) - SinCosCalls.push_back(CI); - } - } -@@ -1595,7 +1595,7 @@ Value *LibCallSimplifier::optimizePrintF(CallInst *CI, IRBuilder<> &B) { - - // printf(format, ...) -> iprintf(format, ...) if no floating point - // arguments. -- if (TLI->has(LibFunc::iprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_iprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *IPrintFFn = - M->getOrInsertFunction("iprintf", FT, Callee->getAttributes()); -@@ -1676,7 +1676,7 @@ Value *LibCallSimplifier::optimizeSPrintF(CallInst *CI, IRBuilder<> &B) { - - // sprintf(str, format, ...) -> siprintf(str, format, ...) if no floating - // point arguments. -- if (TLI->has(LibFunc::siprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_siprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *SIPrintFFn = - M->getOrInsertFunction("siprintf", FT, Callee->getAttributes()); -@@ -1746,7 +1746,7 @@ Value *LibCallSimplifier::optimizeFPrintF(CallInst *CI, IRBuilder<> &B) { - - // fprintf(stream, format, ...) -> fiprintf(stream, format, ...) if no - // floating point arguments. -- if (TLI->has(LibFunc::fiprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_fiprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *FIPrintFFn = - M->getOrInsertFunction("fiprintf", FT, Callee->getAttributes()); -@@ -1820,7 +1820,7 @@ Value *LibCallSimplifier::optimizePuts(CallInst *CI, IRBuilder<> &B) { - } - - bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { -- LibFunc::Func Func; -+ LibFunc Func; - SmallString<20> FloatFuncName = FuncName; - FloatFuncName += 'f'; - if (TLI->getLibFunc(FloatFuncName, Func)) -@@ -1830,7 +1830,7 @@ bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { - - Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - IRBuilder<> &Builder) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - // Check for string/memory library functions. - if (TLI->getLibFunc(*Callee, Func) && TLI->has(Func)) { -@@ -1839,51 +1839,51 @@ Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - CI->getCallingConv() == llvm::CallingConv::C) && - "Optimizing string/memory libcall would change the calling convention"); - switch (Func) { -- case LibFunc::strcat: -+ case LibFunc_strcat: - return optimizeStrCat(CI, Builder); -- case LibFunc::strncat: -+ case LibFunc_strncat: - return optimizeStrNCat(CI, Builder); -- case LibFunc::strchr: -+ case LibFunc_strchr: - return optimizeStrChr(CI, Builder); -- case LibFunc::strrchr: -+ case LibFunc_strrchr: - return optimizeStrRChr(CI, Builder); -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return optimizeStrCmp(CI, Builder); -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return optimizeStrNCmp(CI, Builder); -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - return optimizeStrCpy(CI, Builder); -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - return optimizeStpCpy(CI, Builder); -- case LibFunc::strncpy: -+ case LibFunc_strncpy: - return optimizeStrNCpy(CI, Builder); -- case LibFunc::strlen: -+ case LibFunc_strlen: - return optimizeStrLen(CI, Builder); -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return optimizeStrPBrk(CI, Builder); -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return optimizeStrTo(CI, Builder); -- case LibFunc::strspn: -+ case LibFunc_strspn: - return optimizeStrSpn(CI, Builder); -- case LibFunc::strcspn: -+ case LibFunc_strcspn: - return optimizeStrCSpn(CI, Builder); -- case LibFunc::strstr: -+ case LibFunc_strstr: - return optimizeStrStr(CI, Builder); -- case LibFunc::memchr: -+ case LibFunc_memchr: - return optimizeMemChr(CI, Builder); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return optimizeMemCmp(CI, Builder); -- case LibFunc::memcpy: -+ case LibFunc_memcpy: - return optimizeMemCpy(CI, Builder); -- case LibFunc::memmove: -+ case LibFunc_memmove: - return optimizeMemMove(CI, Builder); -- case LibFunc::memset: -+ case LibFunc_memset: - return optimizeMemSet(CI, Builder); - default: - break; -@@ -1896,7 +1896,7 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (CI->isNoBuiltin()) - return nullptr; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - StringRef FuncName = Callee->getName(); - -@@ -1957,110 +1957,110 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (Value *V = optimizeStringMemoryLibCall(CI, Builder)) - return V; - switch (Func) { -- case LibFunc::cosf: -- case LibFunc::cos: -- case LibFunc::cosl: -+ case LibFunc_cosf: -+ case LibFunc_cos: -+ case LibFunc_cosl: - return optimizeCos(CI, Builder); -- case LibFunc::sinpif: -- case LibFunc::sinpi: -- case LibFunc::cospif: -- case LibFunc::cospi: -+ case LibFunc_sinpif: -+ case LibFunc_sinpi: -+ case LibFunc_cospif: -+ case LibFunc_cospi: - return optimizeSinCosPi(CI, Builder); -- case LibFunc::powf: -- case LibFunc::pow: -- case LibFunc::powl: -+ case LibFunc_powf: -+ case LibFunc_pow: -+ case LibFunc_powl: - return optimizePow(CI, Builder); -- case LibFunc::exp2l: -- case LibFunc::exp2: -- case LibFunc::exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: - return optimizeExp2(CI, Builder); -- case LibFunc::fabsf: -- case LibFunc::fabs: -- case LibFunc::fabsl: -+ case LibFunc_fabsf: -+ case LibFunc_fabs: -+ case LibFunc_fabsl: - return optimizeFabs(CI, Builder); -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -- case LibFunc::sqrtl: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtl: - return optimizeSqrt(CI, Builder); -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: - return optimizeFFS(CI, Builder); -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return optimizeAbs(CI, Builder); -- case LibFunc::isdigit: -+ case LibFunc_isdigit: - return optimizeIsDigit(CI, Builder); -- case LibFunc::isascii: -+ case LibFunc_isascii: - return optimizeIsAscii(CI, Builder); -- case LibFunc::toascii: -+ case LibFunc_toascii: - return optimizeToAscii(CI, Builder); -- case LibFunc::printf: -+ case LibFunc_printf: - return optimizePrintF(CI, Builder); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return optimizeSPrintF(CI, Builder); -- case LibFunc::fprintf: -+ case LibFunc_fprintf: - return optimizeFPrintF(CI, Builder); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return optimizeFWrite(CI, Builder); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return optimizeFPuts(CI, Builder); -- case LibFunc::log: -- case LibFunc::log10: -- case LibFunc::log1p: -- case LibFunc::log2: -- case LibFunc::logb: -+ case LibFunc_log: -+ case LibFunc_log10: -+ case LibFunc_log1p: -+ case LibFunc_log2: -+ case LibFunc_logb: - return optimizeLog(CI, Builder); -- case LibFunc::puts: -+ case LibFunc_puts: - return optimizePuts(CI, Builder); -- case LibFunc::tan: -- case LibFunc::tanf: -- case LibFunc::tanl: -+ case LibFunc_tan: -+ case LibFunc_tanf: -+ case LibFunc_tanl: - return optimizeTan(CI, Builder); -- case LibFunc::perror: -+ case LibFunc_perror: - return optimizeErrorReporting(CI, Builder); -- case LibFunc::vfprintf: -- case LibFunc::fiprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_fiprintf: - return optimizeErrorReporting(CI, Builder, 0); -- case LibFunc::fputc: -+ case LibFunc_fputc: - return optimizeErrorReporting(CI, Builder, 1); -- case LibFunc::ceil: -- case LibFunc::floor: -- case LibFunc::rint: -- case LibFunc::round: -- case LibFunc::nearbyint: -- case LibFunc::trunc: -+ case LibFunc_ceil: -+ case LibFunc_floor: -+ case LibFunc_rint: -+ case LibFunc_round: -+ case LibFunc_nearbyint: -+ case LibFunc_trunc: - if (hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, false); - return nullptr; -- case LibFunc::acos: -- case LibFunc::acosh: -- case LibFunc::asin: -- case LibFunc::asinh: -- case LibFunc::atan: -- case LibFunc::atanh: -- case LibFunc::cbrt: -- case LibFunc::cosh: -- case LibFunc::exp: -- case LibFunc::exp10: -- case LibFunc::expm1: -- case LibFunc::sin: -- case LibFunc::sinh: -- case LibFunc::tanh: -+ case LibFunc_acos: -+ case LibFunc_acosh: -+ case LibFunc_asin: -+ case LibFunc_asinh: -+ case LibFunc_atan: -+ case LibFunc_atanh: -+ case LibFunc_cbrt: -+ case LibFunc_cosh: -+ case LibFunc_exp: -+ case LibFunc_exp10: -+ case LibFunc_expm1: -+ case LibFunc_sin: -+ case LibFunc_sinh: -+ case LibFunc_tanh: - if (UnsafeFPShrink && hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, true); - return nullptr; -- case LibFunc::copysign: -+ case LibFunc_copysign: - if (hasFloatVersion(FuncName)) - return optimizeBinaryDoubleFP(CI, Builder); - return nullptr; -- case LibFunc::fminf: -- case LibFunc::fmin: -- case LibFunc::fminl: -- case LibFunc::fmaxf: -- case LibFunc::fmax: -- case LibFunc::fmaxl: -+ case LibFunc_fminf: -+ case LibFunc_fmin: -+ case LibFunc_fminl: -+ case LibFunc_fmaxf: -+ case LibFunc_fmax: -+ case LibFunc_fmaxl: - return optimizeFMinFMax(CI, Builder); - default: - return nullptr; -@@ -2184,7 +2184,7 @@ Value *FortifiedLibCallSimplifier::optimizeMemSetChk(CallInst *CI, - - Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - const DataLayout &DL = CI->getModule()->getDataLayout(); -@@ -2192,7 +2192,7 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - *ObjSize = CI->getArgOperand(2); - - // __stpcpy_chk(x,x,...) -> x+strlen(x) -- if (Func == LibFunc::stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { -+ if (Func == LibFunc_stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { - Value *StrLen = emitStrLen(Src, B, DL, TLI); - return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr; - } -@@ -2218,14 +2218,14 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - Value *Ret = emitMemCpyChk(Dst, Src, LenV, ObjSize, B, DL, TLI); - // If the function was an __stpcpy_chk, and we were able to fold it into - // a __memcpy_chk, we still need to return the correct end pointer. -- if (Ret && Func == LibFunc::stpcpy_chk) -+ if (Ret && Func == LibFunc_stpcpy_chk) - return B.CreateGEP(B.getInt8Ty(), Dst, ConstantInt::get(SizeTTy, Len - 1)); - return Ret; - } - - Value *FortifiedLibCallSimplifier::optimizeStrpNCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - if (isFortifiedCallFoldable(CI, 3, 2, false)) { -@@ -2250,7 +2250,7 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - // - // PR23093. - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - - SmallVector OpBundles; -@@ -2268,17 +2268,17 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - return nullptr; - - switch (Func) { -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - return optimizeMemCpyChk(CI, Builder); -- case LibFunc::memmove_chk: -+ case LibFunc_memmove_chk: - return optimizeMemMoveChk(CI, Builder); -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - return optimizeMemSetChk(CI, Builder); -- case LibFunc::stpcpy_chk: -- case LibFunc::strcpy_chk: -+ case LibFunc_stpcpy_chk: -+ case LibFunc_strcpy_chk: - return optimizeStrpCpyChk(CI, Builder, Func); -- case LibFunc::stpncpy_chk: -- case LibFunc::strncpy_chk: -+ case LibFunc_stpncpy_chk: -+ case LibFunc_strncpy_chk: - return optimizeStrpNCpyChk(CI, Builder, Func); - default: - break; diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_musl.patch new file mode 120000 index 00000000000..435ae951cdc --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/libtapi_musl.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_musl.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/mingw_gcc710_i686.patch deleted file mode 100644 index 954f6ce3d60..00000000000 --- a/0_RootFS/GCCBootstrap@5/bundled/patches/mingw_gcc710_i686.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 431ac2a912708546cd7271332e9331399e66bc62 Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Wed, 3 May 2017 15:52:32 +0800 -Subject: [PATCH] winpthreads/src/dll_math.c: Implement `__divmoddi4()' for GCC - 7. - -GCC targeting i686 _may_ generate an external call to the function in -question when divding a 64-bit (DIMode) integer with another one. -Since we are linking against a fake libgcc, we have to implement it too. - -Signed-off-by: Liu Hao ---- - .../winpthreads/src/libgcc/dll_math.c | 27 ++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -index e09b481..aeec068 100644 ---- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -@@ -120,6 +120,7 @@ u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); - u_quad_t __udivdi3(u_quad_t a, u_quad_t b); - u_quad_t __umoddi3(u_quad_t a, u_quad_t b); - int __ucmpdi2(u_quad_t a, u_quad_t b); -+quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); - - #endif /* !_LIBKERN_QUAD_H_ */ - -@@ -546,6 +547,32 @@ __umoddi3(a, b) - (void)__qdivrem(a, b, &r); - return (r); - } -+ -+/* -+ * Divide two signed quads. -+ * This function is new in GCC 7. -+ */ -+quad_t -+__divmoddi4(a, b, rem) -+ quad_t a, b, *rem; -+{ -+ u_quad_t ua, ub, uq, ur; -+ int negq, negr; -+ -+ if (a < 0) -+ ua = -(u_quad_t)a, negq = 1, negr = 1; -+ else -+ ua = a, negq = 0, negr = 0; -+ if (b < 0) -+ ub = -(u_quad_t)b, negq ^= 1; -+ else -+ ub = b; -+ uq = __qdivrem(ua, ub, &ur); -+ if (rem) -+ *rem = (negr ? -ur : ur); -+ return (negq ? -uq : uq); -+} -+ - #else - static int __attribute__((unused)) dummy; - #endif /*deined (_X86_) && !defined (__x86_64__)*/ --- -2.7.4 - diff --git a/0_RootFS/GCCBootstrap@5/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@5/bundled/patches/mingw_gcc710_i686.patch new file mode 120000 index 00000000000..94de400d805 --- /dev/null +++ b/0_RootFS/GCCBootstrap@5/bundled/patches/mingw_gcc710_i686.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/mingw_gcc710_i686.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/binutils_freebsd_symbol_versioning.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/binutils_freebsd_symbol_versioning.patch deleted file mode 100644 index 02a73504795..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/binutils_freebsd_symbol_versioning.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc -index 444aef2942..8a3858d32b 100644 ---- a/ld/scripttempl/elf.sc -+++ b/ld/scripttempl/elf.sc -@@ -637,9 +637,9 @@ cat < -Date: Mon Sep 17 10:15:44 2018 +0000 - - GCC 4.8.X is too old to understand the `configure` argument `--with-native-system-header-dir=` - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index b09a763d525..afe7ec1579d 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1504,7 +1504,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) - tmake_file="${tmake_file} i386/t-mingw-w32" - ;; - esac -- native_system_header_dir=/mingw/include -+ native_system_header_dir=/include - target_gtfiles="\$(srcdir)/config/i386/winnt.c" - extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" - case ${target} in -diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h -index 1ac55441725..74641126007 100644 ---- a/gcc/config/i386/mingw32.h -+++ b/gcc/config/i386/mingw32.h -@@ -152,7 +152,7 @@ along with GCC; see the file COPYING3. If not see - - /* Override startfile prefix defaults. */ - #ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/mingw/lib/" -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" - #endif - #ifndef STANDARD_STARTFILE_PREFIX_2 - #define STANDARD_STARTFILE_PREFIX_2 "" -@@ -161,7 +161,7 @@ along with GCC; see the file COPYING3. If not see - /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR - macro contains POSIX-style path. See bug 52947. */ - #undef NATIVE_SYSTEM_HEADER_DIR --#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" -+#define NATIVE_SYSTEM_HEADER_DIR "/include" - - /* Output STRING, a string representing a filename, to FILE. - We canonicalize it to be in Unix format (backslashes are replaced diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/gcc485_mingw_include.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/gcc485_mingw_include.patch new file mode 120000 index 00000000000..a2b50298a2a --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/gcc485_mingw_include.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_mingw_include.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-01.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-01.patch new file mode 120000 index 00000000000..c750d5a8835 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-01.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-01.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-02.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-02.patch new file mode 120000 index 00000000000..c2f8ca9cddb --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-02.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-02.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-03.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-03.patch new file mode 120000 index 00000000000..7f9b18ab810 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-03.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-03.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-04.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-04.patch new file mode 120000 index 00000000000..82f535d0ef6 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-04.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-04.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-05.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-05.patch new file mode 120000 index 00000000000..629c1a71ca7 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-05.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-05.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-06.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-06.patch new file mode 120000 index 00000000000..4682d7d2638 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-06.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-06.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-07.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-07.patch new file mode 120000 index 00000000000..ec0ff4fc245 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-07.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-07.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-08.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-08.patch new file mode 120000 index 00000000000..dd3d8002d07 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-08.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-08.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-09.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-09.patch new file mode 120000 index 00000000000..6160e1ff6c9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-09.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-09.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-10.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-10.patch new file mode 120000 index 00000000000..3b0eb446435 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-10.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-10.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-11.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-11.patch new file mode 120000 index 00000000000..1a8b2b1874a --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-11.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-11.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-12.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-12.patch new file mode 120000 index 00000000000..5c61ae4d308 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-12.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-12.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-13.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-13.patch new file mode 120000 index 00000000000..9fcd14da248 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-13.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-13.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-14.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-14.patch new file mode 120000 index 00000000000..2c105860a79 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-14.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-14.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-15.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-15.patch new file mode 120000 index 00000000000..553e804d24c --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-15.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-15.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-16.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-16.patch new file mode 120000 index 00000000000..45b396e6e16 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-16.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-16.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-17.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-17.patch new file mode 120000 index 00000000000..381198312d8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-17.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-17.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-18.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-18.patch new file mode 120000 index 00000000000..75da139edca --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-18.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-18.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-19.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-19.patch new file mode 120000 index 00000000000..15b94428f84 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-19.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-19.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-20.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-20.patch new file mode 120000 index 00000000000..363da6ff21d --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-20.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-20.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-21.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-21.patch new file mode 120000 index 00000000000..d0b5d34df23 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-21.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-21.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-22.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-22.patch new file mode 120000 index 00000000000..e33401a61ec --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-22.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-22.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-23.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-23.patch new file mode 120000 index 00000000000..e17c24162a4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-23.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-23.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-24.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-24.patch new file mode 120000 index 00000000000..dabf39e7b9c --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-24.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-24.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-25.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-25.patch new file mode 120000 index 00000000000..a1013682f68 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-25.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-25.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-26.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-26.patch new file mode 120000 index 00000000000..9d6541b9b82 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-26.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-26.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-27.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-27.patch new file mode 120000 index 00000000000..b4b0172a637 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-27.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-27.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-28.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-28.patch new file mode 120000 index 00000000000..422f6eab38f --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-28.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-28.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-29.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-29.patch new file mode 120000 index 00000000000..29c53da8ea3 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-29.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-29.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-30.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-30.patch new file mode 120000 index 00000000000..6d532a56d8d --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-30.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-30.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-31.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-31.patch new file mode 120000 index 00000000000..9b06be66e43 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-31.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-31.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-32.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-32.patch new file mode 120000 index 00000000000..ed3e7f02517 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-32.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-32.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-33.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-33.patch new file mode 120000 index 00000000000..468c085f789 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-33.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-33.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-34.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-34.patch new file mode 120000 index 00000000000..58778f0e720 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-34.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-34.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-35.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-35.patch new file mode 120000 index 00000000000..07ea002e01f --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-35.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-35.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-36.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-36.patch new file mode 120000 index 00000000000..3bc5b0034c8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-36.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-36.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-37.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-37.patch new file mode 120000 index 00000000000..84f35423e52 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-37.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-37.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-38.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-38.patch new file mode 120000 index 00000000000..dc2041a6dfe --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-38.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-38.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-39.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-39.patch new file mode 120000 index 00000000000..edcdb4e0660 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-39.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-39.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-40.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-40.patch new file mode 120000 index 00000000000..d6664bac3ae --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-40.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-40.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-41.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-41.patch new file mode 120000 index 00000000000..024e01a1d93 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-41.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-41.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-42.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-42.patch new file mode 120000 index 00000000000..cc626e8bd3e --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-42.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-42.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-43.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-43.patch new file mode 120000 index 00000000000..78508bdced4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-43.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-43.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-44.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-44.patch new file mode 120000 index 00000000000..abc87cc7705 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-44.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-44.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-45.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-45.patch new file mode 120000 index 00000000000..546a75ecf8b --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-45.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-45.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-46.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-46.patch new file mode 120000 index 00000000000..651cb9e3cca --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-46.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-46.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch new file mode 120000 index 00000000000..8c086355317 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-48-ldbl_high.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-48-ldbl_high.patch new file mode 120000 index 00000000000..d6f0ec0b0f2 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc-ppc64le-48-ldbl_high.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-48-ldbl_high.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_aarch64_relocation.patch deleted file mode 100644 index bb9ce8d4e06..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_aarch64_relocation.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c -index d8cdb7e24b..5e6e70a5bf 100644 ---- a/elf/dl-sysdep.c -+++ b/elf/dl-sysdep.c -@@ -108,7 +108,7 @@ _dl_sysdep_start (void **start_argptr, - #endif - - __libc_stack_end = DL_STACK_END (start_argptr); -- DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, INTUSE(_dl_argv), _environ, -+ DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, _dl_argv, _environ, - GLRO(dl_auxv)); - - user_entry = (ElfW(Addr)) ENTRY_POINT; -diff --git a/elf/rtld.c b/elf/rtld.c -index 6dcbabc284..03209d695a 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -83,7 +83,7 @@ int _dl_argc attribute_relro attribute_hidden; - char **_dl_argv attribute_relro = NULL; - unsigned int _dl_skip_args attribute_relro attribute_hidden; - #endif --INTDEF(_dl_argv) -+rtld_hidden_data_def (_dl_argv) - - #ifndef THREAD_SET_STACK_GUARD - /* Only exported for architectures that don't store the stack guard canary -@@ -634,7 +634,7 @@ dlmopen_doit (void *a) - args->map = _dl_open (args->fname, - (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT - | __RTLD_SECURE), -- dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv), -+ dl_main, LM_ID_NEWLM, _dl_argc, _dl_argv, - __environ); - } - -@@ -952,55 +952,55 @@ dl_main (const ElfW(Phdr) *phdr, - GL(dl_rtld_map).l_name = rtld_progname; - - while (_dl_argc > 1) -- if (! strcmp (INTUSE(_dl_argv)[1], "--list")) -+ if (! strcmp (_dl_argv[1], "--list")) - { - mode = list; - GLRO(dl_lazy) = -1; /* This means do no dependency analysis. */ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--verify")) -+ else if (! strcmp (_dl_argv[1], "--verify")) - { - mode = verify; - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-cache")) -+ else if (! strcmp (_dl_argv[1], "--inhibit-cache")) - { - GLRO(dl_inhibit_cache) = 1; - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--library-path") -+ else if (! strcmp (_dl_argv[1], "--library-path") - && _dl_argc > 2) - { -- library_path = INTUSE(_dl_argv)[2]; -+ library_path = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-rpath") -+ else if (! strcmp (_dl_argv[1], "--inhibit-rpath") - && _dl_argc > 2) - { -- GLRO(dl_inhibit_rpath) = INTUSE(_dl_argv)[2]; -+ GLRO(dl_inhibit_rpath) = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--audit") && _dl_argc > 2) -+ else if (! strcmp (_dl_argv[1], "--audit") && _dl_argc > 2) - { -- process_dl_audit (INTUSE(_dl_argv)[2]); -+ process_dl_audit (_dl_argv[2]); - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } - else - break; -@@ -1034,7 +1034,7 @@ of this helper program; chances are you did not intend to run this program.\n\ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - - /* The initialization of _dl_stack_flags done below assumes the - executable's PT_GNU_STACK may have been honored by the kernel, and -@@ -1929,7 +1929,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - ElfW(Addr) loadbase; - lookup_t result; - -- result = _dl_lookup_symbol_x (INTUSE(_dl_argv)[i], main_map, -+ result = _dl_lookup_symbol_x (_dl_argv[i], main_map, - &ref, main_map->l_scope, - NULL, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); -@@ -1937,7 +1937,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - loadbase = LOOKUP_VALUE_ADDRESS (result); - - _dl_printf ("%s found at 0x%0*Zd in object at 0x%0*Zd\n", -- INTUSE(_dl_argv)[i], -+ _dl_argv[i], - (int) sizeof ref->st_value * 2, - (size_t) ref->st_value, - (int) sizeof loadbase * 2, (size_t) loadbase); -diff --git a/ports/sysdeps/aarch64/dl-machine.h b/ports/sysdeps/aarch64/dl-machine.h -index 997c860ccb..09fb09c164 100644 ---- a/ports/sysdeps/aarch64/dl-machine.h -+++ b/ports/sysdeps/aarch64/dl-machine.h -@@ -49,23 +49,10 @@ elf_machine_load_address (void) - /* To figure out the load address we use the definition that for any symbol: - dynamic_addr(symbol) = static_addr(symbol) + load_addr - -- The choice of symbol is arbitrary. The static address we obtain -- by constructing a non GOT reference to the symbol, the dynamic -- address of the symbol we compute using adrp/add to compute the -- symbol's address relative to the PC. */ -- -- ElfW(Addr) static_addr; -- ElfW(Addr) dynamic_addr; -- -- asm (" \n\ -- adrp %1, _dl_start; \n\ -- add %1, %1, #:lo12:_dl_start \n\ -- ldr %w0, 1f \n\ -- b 2f \n\ --1: .word _dl_start \n\ --2: \n\ -- " : "=r" (static_addr), "=r" (dynamic_addr)); -- return dynamic_addr - static_addr; -+ _DYNAMIC sysmbol is used here as its link-time address stored in -+ the special unrelocated first GOT entry. */ -+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; -+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic (); - } - - /* Set up the loaded object described by L so its unrelocated PLT -@@ -169,8 +156,8 @@ _dl_start_user: \n\ - cmp x0, #0 \n\ - bne 1b \n\ - // Update _dl_argv \n\ -- adrp x3, _dl_argv \n\ -- str x2, [x3, #:lo12:_dl_argv] \n\ -+ adrp x3, __GI__dl_argv \n\ -+ str x2, [x3, #:lo12:__GI__dl_argv] \n\ - .L_done_stack_adjust: \n\ - // compute envp \n\ - add x3, x2, x1, lsl #3 \n\ -diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index ffeb093887..051bb4d954 100644 ---- a/sysdeps/generic/ldsodefs.h -+++ b/sysdeps/generic/ldsodefs.h -@@ -649,6 +649,7 @@ extern char **_dl_argv - attribute_relro - #endif - ; -+rtld_hidden_proto (_dl_argv) - #ifdef IS_IN_rtld - extern unsigned int _dl_skip_args attribute_hidden - # ifndef DL_ARGV_NOT_RELRO -@@ -660,15 +661,8 @@ extern unsigned int _dl_skip_args_internal attribute_hidden - attribute_relro - # endif - ; --extern char **_dl_argv_internal attribute_hidden --# ifndef DL_ARGV_NOT_RELRO -- attribute_relro --# endif -- ; --# define rtld_progname (INTUSE(_dl_argv)[0]) --#else --# define rtld_progname _dl_argv[0] - #endif -+# define rtld_progname _dl_argv[0] - - /* Flag set at startup and cleared when the last initializer has run. */ - extern int _dl_starting_up; diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_aarch64_relocation.patch new file mode 120000 index 00000000000..23af0beaecb --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_aarch64_relocation.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_aarch64_relocation.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_arm_gcc_fix.patch deleted file mode 100644 index 4ab50ebcb5e..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_arm_gcc_fix.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/nptl/sysdeps/pthread/unwind-forcedunwind.c -+++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/sysdeps/gnu/unwind-resume.c -+++ b/sysdeps/gnu/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - --- -1.9.4 - diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_arm_gcc_fix.patch new file mode 120000 index 00000000000..13167359553 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_arm_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_arm_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_gcc_version.patch deleted file mode 100644 index 4d894fa9bb4..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_gcc_version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old 2017-07-27 20:01:59.997750069 +0000 -+++ configure 2017-07-27 20:02:54.029053809 +0000 -@@ -5189,7 +5189,7 @@ - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | 4.[0-9]* | 5.[0-9]* | 6.[0-9]* | 7.[0-9]* | 8.[0-9]* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_gcc_version.patch new file mode 120000 index 00000000000..473f7a525d9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_gcc_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_gcc_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_i686_asm.patch deleted file mode 100644 index e2f8c86ec9d..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_i686_asm.patch +++ /dev/null @@ -1,49 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-04-18 -Initial Package Version: 2.11.1 -Upstream Status: Not Submitted -Origin: http://www.eglibc.org/archives/patches/msg00073.html -Description: Fixes the following build problem with GCC-4.5.0: - -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os -./sysdeps/i386/fpu/s_frexp.S: Assembler messages: -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 - -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_i686_asm.patch new file mode 120000 index 00000000000..35f065f0d0d --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_i686_asm.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_i686_asm.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_make_version.patch deleted file mode 100644 index 1c2edd11111..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_make_version.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 30f1989e789515790343811e1d333a903ffb84a0 -Author: Elliot Saba -Date: Tue Sep 18 08:50:46 2018 +0000 - - Include `make` v4.X as valid in configure version check - -diff --git a/configure b/configure -index 8799b7de78..b8bf4e07f6 100755 ---- a/configure -+++ b/configure -@@ -4972,7 +4972,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | 4*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index d369382264..0417133a5c 100644 ---- a/configure.in -+++ b/configure.in -@@ -935,7 +935,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | 4*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_make_version.patch new file mode 120000 index 00000000000..1c6b268bfab --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_make_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_make_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection.patch deleted file mode 100644 index 49668244d52..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection.patch +++ /dev/null @@ -1,176 +0,0 @@ -commit ee14fe4c606fa577ae4375985b75ec0cb8e79fec -Author: Keno Fischer -Date: Fri Jun 22 18:03:46 2018 -0400 - - dl-load: Reject musl-linked libraries - - This prevents the glibc dynamic linker from considering shared - libraries linked against musl (similar to how it would reject - libraries for other architectures). - - See https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/297 - -diff --git a/elf/dl-load.c b/elf/dl-load.c -index 7554a99..fe9e483 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -46,6 +46,7 @@ - #include - #include - -+#include - - #include - #if BYTE_ORDER == BIG_ENDIAN -@@ -1382,6 +1383,60 @@ print_search_path (struct r_search_path_elem **list, - else - _dl_debug_printf_c ("\t\t(%s)\n", what); - } -+ -+struct known_names -+{ -+ const char *soname; -+ int flag; -+}; -+ -+static struct known_names known_libs[] = -+{ -+#ifdef SYSDEP_KNOWN_LIBRARY_NAMES -+ SYSDEP_KNOWN_LIBRARY_NAMES -+#endif -+}; -+ -+static int validate_lib(int fd, unsigned int dynamic_addr, unsigned int dynamic_size) -+{ -+ ElfW(Dyn) *dyn_entry; -+ ElfW(Dyn) *dynamic_segment = alloca(dynamic_size); -+ char fname[255]; -+ __lseek (fd, dynamic_addr, SEEK_SET); -+ if ((size_t) __libc_read (fd, (void *) dynamic_segment, dynamic_size) != dynamic_size) -+ { -+ return -2; -+ } -+ // Find the string table -+ unsigned int string_offset = 0; -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_STRTAB) { -+ string_offset = dyn_entry->d_un.d_val; -+ } -+ if (string_offset != 0) { -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_NEEDED) { -+ __lseek (fd, string_offset + dyn_entry->d_un.d_val, SEEK_SET); -+ ssize_t nchars = __libc_read (fd, (void *)fname, 254); -+ if (nchars == -1) -+ return -2; -+ fname[nchars] = 0; -+ for (int j = 0; j < sizeof (known_libs) / sizeof (known_libs [0]); ++j) { -+ if (strcmp (fname, known_libs [j].soname) == 0) -+ { -+ if (known_libs [j].flag == FLAG_ELF_MUSL) -+ return 1; -+ } -+ } -+ } -+ } -+ } -+ } -+ return 0; -+} -+ - - /* Open a file and verify it is an ELF file for this architecture. We - ignore only ELF files for other architectures. Non-ELF files and -@@ -1427,6 +1482,8 @@ open_verify (const char *name, int fd, - } expected_note = { 4, 16, 1, "GNU" }; - /* Initialize it to make the compiler happy. */ - const char *errstring = NULL; -+ unsigned int dynamic_addr = 0; -+ unsigned int dynamic_size = 0; - int errval = 0; - - #ifdef SHARED -@@ -1618,8 +1675,15 @@ open_verify (const char *name, int fd, - loader, fd))) - goto close_and_out; - -+ dynamic_addr = 0; -+ dynamic_size = 0; - /* Check .note.ABI-tag if present. */ -- for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) -+ for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) { -+ if (ph->p_type == PT_DYNAMIC) -+ { -+ dynamic_addr = ph->p_offset; -+ dynamic_size = ph->p_filesz; -+ } - if (ph->p_type == PT_NOTE && ph->p_filesz >= 32 && ph->p_align >= 4) - { - ElfW(Addr) size = ph->p_filesz; -@@ -1678,6 +1742,20 @@ open_verify (const char *name, int fd, - - break; - } -+ } -+ /* Check the dynamic section */ -+ if (dynamic_addr != 0) { -+ int err = validate_lib(fd, dynamic_addr, dynamic_size); -+ if (err == -2) { -+ errstring = N_("failed to read file"); -+ goto call_lose; -+ } -+ else if (err != 0) { -+ __close (fd); -+ __set_errno (ENOENT); -+ fd = -1; -+ } -+ } - } - - return fd; -diff --git a/elf/ldconfig.c b/elf/ldconfig.c -index fbdd814..53a1f87 100644 ---- a/elf/ldconfig.c -+++ b/elf/ldconfig.c -@@ -875,6 +875,16 @@ search_dir (const struct dir_entry *entry) - add_to_aux_cache (&lstat_buf, flag, osversion, soname); - } - -+ /* Don't try to load MUSL-dependent libraries */ -+ if ((flag & FLAG_TYPE_MASK) == FLAG_ELF_MUSL) -+ { -+ if (real_name != real_file_name) -+ free (real_name); -+ if (opt_verbose) -+ error (0, 0, _("Skipping musl-linked library %s"), file_name); -+ continue; -+ } -+ - if (soname == NULL) - soname = implicit_soname (direntry->d_name, flag); - -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index 59e20dc..13c4215 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -27,6 +27,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 -diff --git a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -index c7e9ad6..abd724e 100644 ---- a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -+++ b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -@@ -23,4 +23,5 @@ - { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, - #define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ -- { "libm.so.6", FLAG_ELF_LIBC6 }, -+ { "libm.so.6", FLAG_ELF_LIBC6 }, \ -+ { "libc.musl-x86_64.so.1", FLAG_ELF_MUSL } diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection.patch new file mode 120000 index 00000000000..81a4040c7fd --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection_old.patch deleted file mode 100644 index a400df39623..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection_old.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index fadd5ec370..cb6b6d53b7 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -26,6 +26,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection_old.patch new file mode 120000 index 00000000000..31d164c349c --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_musl_rejection_old.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection_old.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_nocommon.patch deleted file mode 100644 index 6fbd074443f..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_nocommon.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./malloc/obstack.c.old 2017-10-27 17:08:52.000000000 -0400 -+++ ./malloc/obstack.c 2017-10-27 17:09:54.000000000 -0400 -@@ -117,7 +117,7 @@ - /* A looong time ago (before 1994, anyway; we're not sure) this global variable - was used by non-GNU-C macros to avoid multiple evaluation. The GNU C - library still exports it because somebody might use it. */ --struct obstack *_obstack_compat; -+struct obstack *_obstack_compat __attribute__((nocommon)); - compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); - # endif - # endif diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_nocommon.patch new file mode 120000 index 00000000000..5b375100acb --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_powerpc64le_gcc_fix.patch deleted file mode 100644 index 8bc77f56d70..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_powerpc64le_gcc_fix.patch +++ /dev/null @@ -1,198 +0,0 @@ -From db8fed87d9741b6b3da6c2257f01d63ef2fe407c Mon Sep 17 00:00:00 2001 -From: Martin Sebor -Date: Mon, 1 Jun 2015 14:12:09 -0300 -Subject: [PATCH] powerpc: setcontext.S uses power6 mtfsf when not supported - [BZ #18116] - -The attached patch fixes a glibc build failure with gcc 5 on powerpc64le -caused by a recent change in gcc where the compiler defines the -_ARCH_PWR6 macro when processing assembly files but doesn't invoke the -assembler in the corresponding machine mode (unless it has been -explicitly configured to target POWER 6 or later). A bug had been filed -with gcc for this (65341) but was closed as won't fix. Glibc relies on -the _ARCH_PWR6 macro in a few .S files to make use of Power ISA 2.5 -instructions (specifically, the four-argument form of the mtfsf insn). -A similar problem had occurred in the past (bug 10118) but the fix that -was committed for it didn't anticipate this new problem. ---- - ChangeLog | 9 ++++++ - .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 30 ++++++++++++++---- - .../sysv/linux/powerpc/powerpc64/swapcontext.S | 36 +++++++++++++++++----- - 3 files changed, 61 insertions(+), 14 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 6d295e7..239a0e6 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,12 @@ -+2015-03-11 Martin Sebor -+ -+ [BZ #18116] -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+ (__setcontext): Use extended four-operand version of mtsf whenever -+ possible. -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+ (__novec_swapcontext): Likewise. -+ - 2015-06-01 Siddhesh Poyarekar - - * benchtests/scripts/compare_bench.py: New file. -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -index e47a57a..8a08dc4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -@@ -81,22 +81,31 @@ ENTRY(__novec_setcontext) - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 5f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -364,22 +373,31 @@ L(has_no_vec): - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 7f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -index bc02a21..2421ca4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -@@ -173,24 +173,34 @@ ENTRY(__novec_swapcontext) - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 5f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -652,24 +662,34 @@ L(has_no_vec2): - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 7f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) --- -2.9.3 - diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_powerpc64le_gcc_fix.patch new file mode 120000 index 00000000000..206ed74aa45 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_powerpc64le_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_powerpc64le_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_regexp_nocommon.patch deleted file mode 100644 index 98bd10251e3..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_regexp_nocommon.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- misc/regexp.c.old 2017-10-28 12:54:11.000000000 -0400 -+++ misc/regexp.c 2017-10-28 12:54:37.000000000 -0400 -@@ -30,13 +30,13 @@ - #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) - - /* Define the variables used for the interface. */ --char *loc1; --char *loc2; -+char *loc1 __attribute__((nocommon)); -+char *loc2 __attribute__((nocommon)); - compat_symbol (libc, loc1, loc1, GLIBC_2_0); - compat_symbol (libc, loc2, loc2, GLIBC_2_0); - - /* Although we do not support the use we define this variable as well. */ --char *locs; -+char *locs __attribute__((nocommon)); - compat_symbol (libc, locs, locs, GLIBC_2_0); - - diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_regexp_nocommon.patch new file mode 120000 index 00000000000..1a10ef2694b --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_regexp_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_regexp_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_sunrpc.patch deleted file mode 100644 index d7fdf48316d..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_sunrpc.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- sunrpc/rpc/types.h.old -+++ sunrpc/rpc/types.h -@@ -69,7 +69,7 @@ - #include - #endif - --#ifndef __u_char_defined -+#if 0 - typedef __u_char u_char; - typedef __u_short u_short; - typedef __u_int u_int; -@@ -79,7 +79,7 @@ - typedef __fsid_t fsid_t; - # define __u_char_defined - #endif --#ifndef __daddr_t_defined -+#if 0 - typedef __daddr_t daddr_t; - typedef __caddr_t caddr_t; - # define __daddr_t_defined diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_sunrpc.patch new file mode 120000 index 00000000000..9359558d4e0 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/glibc_sunrpc.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_sunrpc.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_fullyaml.patch deleted file mode 100644 index fc8b4e8e120..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_fullyaml.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -index ca62890e..6038c13b 100644 ---- a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -+++ b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -@@ -26,7 +26,7 @@ void RefactoringOptionSet::print(llvm::raw_ostream &OS) const { - } - } - --template <> struct CustomMappingTraits { -+template <> struct llvm::yaml::CustomMappingTraits { - static void inputOne(IO &YamlIn, StringRef Key, - RefactoringOptionSet &Result) { - #define HANDLE(Type) \ diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_fullyaml.patch new file mode 120000 index 00000000000..8c24845b566 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_fullyaml.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_fullyaml.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_musl.patch deleted file mode 100644 index d0b09c58c31..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_musl.patch +++ /dev/null @@ -1,3851 +0,0 @@ -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -index 7798e3c8..dc890373 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -@@ -20,7 +20,7 @@ - // One of TLI_DEFINE_ENUM/STRING are defined. - - #if defined(TLI_DEFINE_ENUM) --#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) enum_variant, -+#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) LibFunc_##enum_variant, - #define TLI_DEFINE_STRING_INTERNAL(string_repr) - #else - #define TLI_DEFINE_ENUM_INTERNAL(enum_variant) -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -index 2cba44bc..25ae5449 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -@@ -29,14 +29,12 @@ struct VecDesc { - }; - class PreservedAnalyses; - -- namespace LibFunc { -- enum Func { -+ enum LibFunc { - #define TLI_DEFINE_ENUM - #include "llvm/Analysis/TargetLibraryInfo.def" - - NumLibFuncs - }; -- } - - /// \brief Implementation of the target library information. - /// -@@ -47,20 +45,20 @@ class PreservedAnalyses; - class TargetLibraryInfoImpl { - friend class TargetLibraryInfo; - -- unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4]; -+ unsigned char AvailableArray[(NumLibFuncs+3)/4]; - llvm::DenseMap CustomNames; -- static const char *const StandardNames[LibFunc::NumLibFuncs]; -+ static const char *const StandardNames[NumLibFuncs]; - - enum AvailabilityState { - StandardName = 3, // (memset to all ones) - CustomName = 1, - Unavailable = 0 // (memset to all zeros) - }; -- void setState(LibFunc::Func F, AvailabilityState State) { -+ void setState(LibFunc F, AvailabilityState State) { - AvailableArray[F/4] &= ~(3 << 2*(F&3)); - AvailableArray[F/4] |= State << 2*(F&3); - } -- AvailabilityState getState(LibFunc::Func F) const { -+ AvailabilityState getState(LibFunc F) const { - return static_cast((AvailableArray[F/4] >> 2*(F&3)) & 3); - } - -@@ -72,7 +70,7 @@ class TargetLibraryInfoImpl { - - /// Return true if the function type FTy is valid for the library function - /// F, regardless of whether the function is available. -- bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc::Func F, -+ bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc F, - const DataLayout *DL) const; - - public: -@@ -101,28 +99,28 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const; -+ bool getLibFunc(StringRef funcName, LibFunc &F) const; - - /// Searches for a particular function name, also checking that its type is - /// valid for the library function matching that name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const; -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const; - - /// \brief Forces a function to be marked as unavailable. -- void setUnavailable(LibFunc::Func F) { -+ void setUnavailable(LibFunc F) { - setState(F, Unavailable); - } - - /// \brief Forces a function to be marked as available. -- void setAvailable(LibFunc::Func F) { -+ void setAvailable(LibFunc F) { - setState(F, StandardName); - } - - /// \brief Forces a function to be marked as available and provide an - /// alternate name that must be used. -- void setAvailableWithName(LibFunc::Func F, StringRef Name) { -+ void setAvailableWithName(LibFunc F, StringRef Name) { - if (StandardNames[F] != Name) { - setState(F, CustomName); - CustomNames[F] = Name; -@@ -203,16 +201,16 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const { -+ bool getLibFunc(StringRef funcName, LibFunc &F) const { - return Impl->getLibFunc(funcName, F); - } - -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const { -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const { - return Impl->getLibFunc(FDecl, F); - } - - /// \brief Tests whether a library function is available. -- bool has(LibFunc::Func F) const { -+ bool has(LibFunc F) const { - return Impl->getState(F) != TargetLibraryInfoImpl::Unavailable; - } - bool isFunctionVectorizable(StringRef F, unsigned VF) const { -@@ -227,37 +225,37 @@ public: - - /// \brief Tests if the function is both available and a candidate for - /// optimized code generation. -- bool hasOptimizedCodeGen(LibFunc::Func F) const { -+ bool hasOptimizedCodeGen(LibFunc F) const { - if (Impl->getState(F) == TargetLibraryInfoImpl::Unavailable) - return false; - switch (F) { - default: break; -- case LibFunc::copysign: case LibFunc::copysignf: case LibFunc::copysignl: -- case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: -- case LibFunc::sin: case LibFunc::sinf: case LibFunc::sinl: -- case LibFunc::cos: case LibFunc::cosf: case LibFunc::cosl: -- case LibFunc::sqrt: case LibFunc::sqrtf: case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -- case LibFunc::fmax: case LibFunc::fmaxf: case LibFunc::fmaxl: -- case LibFunc::fmin: case LibFunc::fminf: case LibFunc::fminl: -- case LibFunc::floor: case LibFunc::floorf: case LibFunc::floorl: -- case LibFunc::nearbyint: case LibFunc::nearbyintf: case LibFunc::nearbyintl: -- case LibFunc::ceil: case LibFunc::ceilf: case LibFunc::ceill: -- case LibFunc::rint: case LibFunc::rintf: case LibFunc::rintl: -- case LibFunc::round: case LibFunc::roundf: case LibFunc::roundl: -- case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: -- case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: -- case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: -- case LibFunc::memcmp: case LibFunc::strcmp: case LibFunc::strcpy: -- case LibFunc::stpcpy: case LibFunc::strlen: case LibFunc::strnlen: -- case LibFunc::memchr: -+ case LibFunc_copysign: case LibFunc_copysignf: case LibFunc_copysignl: -+ case LibFunc_fabs: case LibFunc_fabsf: case LibFunc_fabsl: -+ case LibFunc_sin: case LibFunc_sinf: case LibFunc_sinl: -+ case LibFunc_cos: case LibFunc_cosf: case LibFunc_cosl: -+ case LibFunc_sqrt: case LibFunc_sqrtf: case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: -+ case LibFunc_fmax: case LibFunc_fmaxf: case LibFunc_fmaxl: -+ case LibFunc_fmin: case LibFunc_fminf: case LibFunc_fminl: -+ case LibFunc_floor: case LibFunc_floorf: case LibFunc_floorl: -+ case LibFunc_nearbyint: case LibFunc_nearbyintf: case LibFunc_nearbyintl: -+ case LibFunc_ceil: case LibFunc_ceilf: case LibFunc_ceill: -+ case LibFunc_rint: case LibFunc_rintf: case LibFunc_rintl: -+ case LibFunc_round: case LibFunc_roundf: case LibFunc_roundl: -+ case LibFunc_trunc: case LibFunc_truncf: case LibFunc_truncl: -+ case LibFunc_log2: case LibFunc_log2f: case LibFunc_log2l: -+ case LibFunc_exp2: case LibFunc_exp2f: case LibFunc_exp2l: -+ case LibFunc_memcmp: case LibFunc_strcmp: case LibFunc_strcpy: -+ case LibFunc_stpcpy: case LibFunc_strlen: case LibFunc_strnlen: -+ case LibFunc_memchr: - return true; - } - return false; - } - -- StringRef getName(LibFunc::Func F) const { -+ StringRef getName(LibFunc F) const { - auto State = Impl->getState(F); - if (State == TargetLibraryInfoImpl::Unavailable) - return StringRef(); -diff --git a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -index 6ec531f8..e50c779c 100644 ---- a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -+++ b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -@@ -56,8 +56,8 @@ private: - Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B); - - // Str/Stp cpy are similar enough to be handled in the same functions. -- Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -- Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -+ Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); -+ Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); - - /// \brief Checks whether the call \p CI to a fortified libcall is foldable - /// to the non-fortified version. -diff --git a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -index ec712a31..058f1aef 100644 ---- a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -+++ b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -@@ -613,9 +613,9 @@ static bool isWriteOnlyParam(ImmutableCallSite CS, unsigned ArgIdx, - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. Note that all but the missing writeonly attribute are - // handled via InferFunctionAttr. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) -+ F == LibFunc_memset_pattern16 && TLI.has(F)) - if (ArgIdx == 0) - return true; - -diff --git a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -index ccb56631..18ce21de 100644 ---- a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -+++ b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -@@ -1501,51 +1501,51 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - switch (Name[0]) { - case 'a': -- if ((Name == "acos" && TLI->has(LibFunc::acos)) || -- (Name == "acosf" && TLI->has(LibFunc::acosf))) -+ if ((Name == "acos" && TLI->has(LibFunc_acos)) || -+ (Name == "acosf" && TLI->has(LibFunc_acosf))) - return ConstantFoldFP(acos, V, Ty); -- else if ((Name == "asin" && TLI->has(LibFunc::asin)) || -- (Name == "asinf" && TLI->has(LibFunc::asinf))) -+ else if ((Name == "asin" && TLI->has(LibFunc_asin)) || -+ (Name == "asinf" && TLI->has(LibFunc_asinf))) - return ConstantFoldFP(asin, V, Ty); -- else if ((Name == "atan" && TLI->has(LibFunc::atan)) || -- (Name == "atanf" && TLI->has(LibFunc::atanf))) -+ else if ((Name == "atan" && TLI->has(LibFunc_atan)) || -+ (Name == "atanf" && TLI->has(LibFunc_atanf))) - return ConstantFoldFP(atan, V, Ty); - break; - case 'c': -- if ((Name == "ceil" && TLI->has(LibFunc::ceil)) || -- (Name == "ceilf" && TLI->has(LibFunc::ceilf))) -+ if ((Name == "ceil" && TLI->has(LibFunc_ceil)) || -+ (Name == "ceilf" && TLI->has(LibFunc_ceilf))) - return ConstantFoldFP(ceil, V, Ty); -- else if ((Name == "cos" && TLI->has(LibFunc::cos)) || -- (Name == "cosf" && TLI->has(LibFunc::cosf))) -+ else if ((Name == "cos" && TLI->has(LibFunc_cos)) || -+ (Name == "cosf" && TLI->has(LibFunc_cosf))) - return ConstantFoldFP(cos, V, Ty); -- else if ((Name == "cosh" && TLI->has(LibFunc::cosh)) || -- (Name == "coshf" && TLI->has(LibFunc::coshf))) -+ else if ((Name == "cosh" && TLI->has(LibFunc_cosh)) || -+ (Name == "coshf" && TLI->has(LibFunc_coshf))) - return ConstantFoldFP(cosh, V, Ty); - break; - case 'e': -- if ((Name == "exp" && TLI->has(LibFunc::exp)) || -- (Name == "expf" && TLI->has(LibFunc::expf))) -+ if ((Name == "exp" && TLI->has(LibFunc_exp)) || -+ (Name == "expf" && TLI->has(LibFunc_expf))) - return ConstantFoldFP(exp, V, Ty); -- if ((Name == "exp2" && TLI->has(LibFunc::exp2)) || -- (Name == "exp2f" && TLI->has(LibFunc::exp2f))) -+ if ((Name == "exp2" && TLI->has(LibFunc_exp2)) || -+ (Name == "exp2f" && TLI->has(LibFunc_exp2f))) - // Constant fold exp2(x) as pow(2,x) in case the host doesn't have a - // C99 library. - return ConstantFoldBinaryFP(pow, 2.0, V, Ty); - break; - case 'f': -- if ((Name == "fabs" && TLI->has(LibFunc::fabs)) || -- (Name == "fabsf" && TLI->has(LibFunc::fabsf))) -+ if ((Name == "fabs" && TLI->has(LibFunc_fabs)) || -+ (Name == "fabsf" && TLI->has(LibFunc_fabsf))) - return ConstantFoldFP(fabs, V, Ty); -- else if ((Name == "floor" && TLI->has(LibFunc::floor)) || -- (Name == "floorf" && TLI->has(LibFunc::floorf))) -+ else if ((Name == "floor" && TLI->has(LibFunc_floor)) || -+ (Name == "floorf" && TLI->has(LibFunc_floorf))) - return ConstantFoldFP(floor, V, Ty); - break; - case 'l': -- if ((Name == "log" && V > 0 && TLI->has(LibFunc::log)) || -- (Name == "logf" && V > 0 && TLI->has(LibFunc::logf))) -+ if ((Name == "log" && V > 0 && TLI->has(LibFunc_log)) || -+ (Name == "logf" && V > 0 && TLI->has(LibFunc_logf))) - return ConstantFoldFP(log, V, Ty); -- else if ((Name == "log10" && V > 0 && TLI->has(LibFunc::log10)) || -- (Name == "log10f" && V > 0 && TLI->has(LibFunc::log10f))) -+ else if ((Name == "log10" && V > 0 && TLI->has(LibFunc_log10)) || -+ (Name == "log10f" && V > 0 && TLI->has(LibFunc_log10f))) - return ConstantFoldFP(log10, V, Ty); - else if (IntrinsicID == Intrinsic::sqrt && - (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())) { -@@ -1562,22 +1562,22 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - } - break; - case 's': -- if ((Name == "sin" && TLI->has(LibFunc::sin)) || -- (Name == "sinf" && TLI->has(LibFunc::sinf))) -+ if ((Name == "sin" && TLI->has(LibFunc_sin)) || -+ (Name == "sinf" && TLI->has(LibFunc_sinf))) - return ConstantFoldFP(sin, V, Ty); -- else if ((Name == "sinh" && TLI->has(LibFunc::sinh)) || -- (Name == "sinhf" && TLI->has(LibFunc::sinhf))) -+ else if ((Name == "sinh" && TLI->has(LibFunc_sinh)) || -+ (Name == "sinhf" && TLI->has(LibFunc_sinhf))) - return ConstantFoldFP(sinh, V, Ty); -- else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc::sqrt)) || -- (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc::sqrtf))) -+ else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc_sqrt)) || -+ (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc_sqrtf))) - return ConstantFoldFP(sqrt, V, Ty); - break; - case 't': -- if ((Name == "tan" && TLI->has(LibFunc::tan)) || -- (Name == "tanf" && TLI->has(LibFunc::tanf))) -+ if ((Name == "tan" && TLI->has(LibFunc_tan)) || -+ (Name == "tanf" && TLI->has(LibFunc_tanf))) - return ConstantFoldFP(tan, V, Ty); -- else if ((Name == "tanh" && TLI->has(LibFunc::tanh)) || -- (Name == "tanhf" && TLI->has(LibFunc::tanhf))) -+ else if ((Name == "tanh" && TLI->has(LibFunc_tanh)) || -+ (Name == "tanhf" && TLI->has(LibFunc_tanhf))) - return ConstantFoldFP(tanh, V, Ty); - break; - default: -@@ -1680,14 +1680,14 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - if (!TLI) - return nullptr; -- if ((Name == "pow" && TLI->has(LibFunc::pow)) || -- (Name == "powf" && TLI->has(LibFunc::powf))) -+ if ((Name == "pow" && TLI->has(LibFunc_pow)) || -+ (Name == "powf" && TLI->has(LibFunc_powf))) - return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty); -- if ((Name == "fmod" && TLI->has(LibFunc::fmod)) || -- (Name == "fmodf" && TLI->has(LibFunc::fmodf))) -+ if ((Name == "fmod" && TLI->has(LibFunc_fmod)) || -+ (Name == "fmodf" && TLI->has(LibFunc_fmodf))) - return ConstantFoldBinaryFP(fmod, Op1V, Op2V, Ty); -- if ((Name == "atan2" && TLI->has(LibFunc::atan2)) || -- (Name == "atan2f" && TLI->has(LibFunc::atan2f))) -+ if ((Name == "atan2" && TLI->has(LibFunc_atan2)) || -+ (Name == "atan2f" && TLI->has(LibFunc_atan2f))) - return ConstantFoldBinaryFP(atan2, Op1V, Op2V, Ty); - } else if (ConstantInt *Op2C = dyn_cast(Operands[1])) { - if (IntrinsicID == Intrinsic::powi && Ty->isHalfTy()) -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -index 480ab5cd..f6d83716 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -@@ -42,7 +42,7 @@ enum AllocType : uint8_t { - }; - - struct AllocFnsTy { -- LibFunc::Func Func; -+ LibFunc Func; - AllocType AllocTy; - unsigned char NumParams; - // First and Second size parameters (or -1 if unused) -@@ -52,29 +52,29 @@ struct AllocFnsTy { - // FIXME: certain users need more information. E.g., SimplifyLibCalls needs to - // know which functions are nounwind, noalias, nocapture parameters, etc. - static const AllocFnsTy AllocationFnData[] = { -- {LibFunc::malloc, MallocLike, 1, 0, -1}, -- {LibFunc::valloc, MallocLike, 1, 0, -1}, -- {LibFunc::Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -- {LibFunc::ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -- {LibFunc::Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -- {LibFunc::ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -- {LibFunc::msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -- {LibFunc::msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -- {LibFunc::msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -- {LibFunc::msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -- {LibFunc::calloc, CallocLike, 2, 0, 1}, -- {LibFunc::realloc, ReallocLike, 2, 1, -1}, -- {LibFunc::reallocf, ReallocLike, 2, 1, -1}, -- {LibFunc::strdup, StrDupLike, 1, -1, -1}, -- {LibFunc::strndup, StrDupLike, 2, 1, -1} -+ {LibFunc_malloc, MallocLike, 1, 0, -1}, -+ {LibFunc_valloc, MallocLike, 1, 0, -1}, -+ {LibFunc_Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -+ {LibFunc_ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -+ {LibFunc_Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -+ {LibFunc_ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -+ {LibFunc_msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -+ {LibFunc_msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -+ {LibFunc_msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -+ {LibFunc_msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -+ {LibFunc_calloc, CallocLike, 2, 0, 1}, -+ {LibFunc_realloc, ReallocLike, 2, 1, -1}, -+ {LibFunc_reallocf, ReallocLike, 2, 1, -1}, -+ {LibFunc_strdup, StrDupLike, 1, -1, -1}, -+ {LibFunc_strndup, StrDupLike, 2, 1, -1} - // TODO: Handle "int posix_memalign(void **, size_t, size_t)" - }; - -@@ -111,7 +111,7 @@ static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy, - - // Make sure that the function is available. - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - -@@ -295,33 +295,33 @@ const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) { - return nullptr; - - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - - unsigned ExpectedNumParams; -- if (TLIFn == LibFunc::free || -- TLIFn == LibFunc::ZdlPv || // operator delete(void*) -- TLIFn == LibFunc::ZdaPv || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_ptr32 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_ptr64 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_array_ptr32 || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_array_ptr64) // operator delete[](void*) -+ if (TLIFn == LibFunc_free || -+ TLIFn == LibFunc_ZdlPv || // operator delete(void*) -+ TLIFn == LibFunc_ZdaPv || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_ptr32 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_ptr64 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr32 || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr64) // operator delete[](void*) - ExpectedNumParams = 1; -- else if (TLIFn == LibFunc::ZdlPvj || // delete(void*, uint) -- TLIFn == LibFunc::ZdlPvm || // delete(void*, ulong) -- TLIFn == LibFunc::ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -- TLIFn == LibFunc::ZdaPvj || // delete[](void*, uint) -- TLIFn == LibFunc::ZdaPvm || // delete[](void*, ulong) -- TLIFn == LibFunc::ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr32_int || // delete(void*, uint) -- TLIFn == LibFunc::msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr32_int || // delete[](void*, uint) -- TLIFn == LibFunc::msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) -+ else if (TLIFn == LibFunc_ZdlPvj || // delete(void*, uint) -+ TLIFn == LibFunc_ZdlPvm || // delete(void*, ulong) -+ TLIFn == LibFunc_ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -+ TLIFn == LibFunc_ZdaPvj || // delete[](void*, uint) -+ TLIFn == LibFunc_ZdaPvm || // delete[](void*, ulong) -+ TLIFn == LibFunc_ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr32_int || // delete(void*, uint) -+ TLIFn == LibFunc_msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_int || // delete[](void*, uint) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) - ExpectedNumParams = 2; - else - return nullptr; -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -index a0ae72f1..9db6c499 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -@@ -142,9 +142,9 @@ MemoryLocation MemoryLocation::getForArgument(ImmutableCallSite CS, - // for memcpy/memset. This is particularly important because the - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) { -+ F == LibFunc_memset_pattern16 && TLI.has(F)) { - assert((ArgIdx == 0 || ArgIdx == 1) && - "Invalid argument index for memset_pattern16"); - if (ArgIdx == 1) -diff --git a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -index a71d090c..a34174d1 100644 ---- a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -+++ b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -@@ -25,7 +25,7 @@ static cl::opt ClVectorLibrary( - "Accelerate framework"), - clEnumValEnd)); - --const char *const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = { -+const char *const TargetLibraryInfoImpl::StandardNames[NumLibFuncs] = { - #define TLI_DEFINE_STRING - #include "llvm/Analysis/TargetLibraryInfo.def" - }; -@@ -62,9 +62,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - - if (T.getArch() == Triple::r600 || - T.getArch() == Triple::amdgcn) { -- TLI.setUnavailable(LibFunc::ldexp); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -+ TLI.setUnavailable(LibFunc_ldexp); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); - } - - // There are no library implementations of mempcy and memset for AMD gpus and -@@ -73,9 +73,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - T.getArch() == Triple::amdgcn || - T.getArch() == Triple::wasm32 || - T.getArch() == Triple::wasm64) { -- TLI.setUnavailable(LibFunc::memcpy); -- TLI.setUnavailable(LibFunc::memset); -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memcpy); -+ TLI.setUnavailable(LibFunc_memset); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - return; - } - -@@ -83,21 +83,21 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // All versions of watchOS support it. - if (T.isMacOSX()) { - if (T.isMacOSXVersionLT(10, 5)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (T.isiOS()) { - if (T.isOSVersionLT(3, 0)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (!T.isWatchOS()) { -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } - - if (!hasSinCosPiStret(T)) { -- TLI.setUnavailable(LibFunc::sinpi); -- TLI.setUnavailable(LibFunc::sinpif); -- TLI.setUnavailable(LibFunc::cospi); -- TLI.setUnavailable(LibFunc::cospif); -- TLI.setUnavailable(LibFunc::sincospi_stret); -- TLI.setUnavailable(LibFunc::sincospif_stret); -+ TLI.setUnavailable(LibFunc_sinpi); -+ TLI.setUnavailable(LibFunc_sinpif); -+ TLI.setUnavailable(LibFunc_cospi); -+ TLI.setUnavailable(LibFunc_cospif); -+ TLI.setUnavailable(LibFunc_sincospi_stret); -+ TLI.setUnavailable(LibFunc_sincospif_stret); - } - - if (T.isMacOSX() && T.getArch() == Triple::x86 && -@@ -107,177 +107,177 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // has a $UNIX2003 suffix. The two implementations are identical except - // for the return value in some edge cases. However, we don't want to - // generate code that depends on the old symbols. -- TLI.setAvailableWithName(LibFunc::fwrite, "fwrite$UNIX2003"); -- TLI.setAvailableWithName(LibFunc::fputs, "fputs$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fwrite, "fwrite$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fputs, "fputs$UNIX2003"); - } - - // iprintf and friends are only available on XCore and TCE. - if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) { -- TLI.setUnavailable(LibFunc::iprintf); -- TLI.setUnavailable(LibFunc::siprintf); -- TLI.setUnavailable(LibFunc::fiprintf); -+ TLI.setUnavailable(LibFunc_iprintf); -+ TLI.setUnavailable(LibFunc_siprintf); -+ TLI.setUnavailable(LibFunc_fiprintf); - } - - if (T.isOSWindows() && !T.isOSCygMing()) { - // Win32 does not support long double -- TLI.setUnavailable(LibFunc::acosl); -- TLI.setUnavailable(LibFunc::asinl); -- TLI.setUnavailable(LibFunc::atanl); -- TLI.setUnavailable(LibFunc::atan2l); -- TLI.setUnavailable(LibFunc::ceill); -- TLI.setUnavailable(LibFunc::copysignl); -- TLI.setUnavailable(LibFunc::cosl); -- TLI.setUnavailable(LibFunc::coshl); -- TLI.setUnavailable(LibFunc::expl); -- TLI.setUnavailable(LibFunc::fabsf); // Win32 and Win64 both lack fabsf -- TLI.setUnavailable(LibFunc::fabsl); -- TLI.setUnavailable(LibFunc::floorl); -- TLI.setUnavailable(LibFunc::fmaxl); -- TLI.setUnavailable(LibFunc::fminl); -- TLI.setUnavailable(LibFunc::fmodl); -- TLI.setUnavailable(LibFunc::frexpl); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -- TLI.setUnavailable(LibFunc::logl); -- TLI.setUnavailable(LibFunc::modfl); -- TLI.setUnavailable(LibFunc::powl); -- TLI.setUnavailable(LibFunc::sinl); -- TLI.setUnavailable(LibFunc::sinhl); -- TLI.setUnavailable(LibFunc::sqrtl); -- TLI.setUnavailable(LibFunc::tanl); -- TLI.setUnavailable(LibFunc::tanhl); -+ TLI.setUnavailable(LibFunc_acosl); -+ TLI.setUnavailable(LibFunc_asinl); -+ TLI.setUnavailable(LibFunc_atanl); -+ TLI.setUnavailable(LibFunc_atan2l); -+ TLI.setUnavailable(LibFunc_ceill); -+ TLI.setUnavailable(LibFunc_copysignl); -+ TLI.setUnavailable(LibFunc_cosl); -+ TLI.setUnavailable(LibFunc_coshl); -+ TLI.setUnavailable(LibFunc_expl); -+ TLI.setUnavailable(LibFunc_fabsf); // Win32 and Win64 both lack fabsf -+ TLI.setUnavailable(LibFunc_fabsl); -+ TLI.setUnavailable(LibFunc_floorl); -+ TLI.setUnavailable(LibFunc_fmaxl); -+ TLI.setUnavailable(LibFunc_fminl); -+ TLI.setUnavailable(LibFunc_fmodl); -+ TLI.setUnavailable(LibFunc_frexpl); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); -+ TLI.setUnavailable(LibFunc_logl); -+ TLI.setUnavailable(LibFunc_modfl); -+ TLI.setUnavailable(LibFunc_powl); -+ TLI.setUnavailable(LibFunc_sinl); -+ TLI.setUnavailable(LibFunc_sinhl); -+ TLI.setUnavailable(LibFunc_sqrtl); -+ TLI.setUnavailable(LibFunc_tanl); -+ TLI.setUnavailable(LibFunc_tanhl); - - // Win32 only has C89 math -- TLI.setUnavailable(LibFunc::acosh); -- TLI.setUnavailable(LibFunc::acoshf); -- TLI.setUnavailable(LibFunc::acoshl); -- TLI.setUnavailable(LibFunc::asinh); -- TLI.setUnavailable(LibFunc::asinhf); -- TLI.setUnavailable(LibFunc::asinhl); -- TLI.setUnavailable(LibFunc::atanh); -- TLI.setUnavailable(LibFunc::atanhf); -- TLI.setUnavailable(LibFunc::atanhl); -- TLI.setUnavailable(LibFunc::cbrt); -- TLI.setUnavailable(LibFunc::cbrtf); -- TLI.setUnavailable(LibFunc::cbrtl); -- TLI.setUnavailable(LibFunc::exp2); -- TLI.setUnavailable(LibFunc::exp2f); -- TLI.setUnavailable(LibFunc::exp2l); -- TLI.setUnavailable(LibFunc::expm1); -- TLI.setUnavailable(LibFunc::expm1f); -- TLI.setUnavailable(LibFunc::expm1l); -- TLI.setUnavailable(LibFunc::log2); -- TLI.setUnavailable(LibFunc::log2f); -- TLI.setUnavailable(LibFunc::log2l); -- TLI.setUnavailable(LibFunc::log1p); -- TLI.setUnavailable(LibFunc::log1pf); -- TLI.setUnavailable(LibFunc::log1pl); -- TLI.setUnavailable(LibFunc::logb); -- TLI.setUnavailable(LibFunc::logbf); -- TLI.setUnavailable(LibFunc::logbl); -- TLI.setUnavailable(LibFunc::nearbyint); -- TLI.setUnavailable(LibFunc::nearbyintf); -- TLI.setUnavailable(LibFunc::nearbyintl); -- TLI.setUnavailable(LibFunc::rint); -- TLI.setUnavailable(LibFunc::rintf); -- TLI.setUnavailable(LibFunc::rintl); -- TLI.setUnavailable(LibFunc::round); -- TLI.setUnavailable(LibFunc::roundf); -- TLI.setUnavailable(LibFunc::roundl); -- TLI.setUnavailable(LibFunc::trunc); -- TLI.setUnavailable(LibFunc::truncf); -- TLI.setUnavailable(LibFunc::truncl); -+ TLI.setUnavailable(LibFunc_acosh); -+ TLI.setUnavailable(LibFunc_acoshf); -+ TLI.setUnavailable(LibFunc_acoshl); -+ TLI.setUnavailable(LibFunc_asinh); -+ TLI.setUnavailable(LibFunc_asinhf); -+ TLI.setUnavailable(LibFunc_asinhl); -+ TLI.setUnavailable(LibFunc_atanh); -+ TLI.setUnavailable(LibFunc_atanhf); -+ TLI.setUnavailable(LibFunc_atanhl); -+ TLI.setUnavailable(LibFunc_cbrt); -+ TLI.setUnavailable(LibFunc_cbrtf); -+ TLI.setUnavailable(LibFunc_cbrtl); -+ TLI.setUnavailable(LibFunc_exp2); -+ TLI.setUnavailable(LibFunc_exp2f); -+ TLI.setUnavailable(LibFunc_exp2l); -+ TLI.setUnavailable(LibFunc_expm1); -+ TLI.setUnavailable(LibFunc_expm1f); -+ TLI.setUnavailable(LibFunc_expm1l); -+ TLI.setUnavailable(LibFunc_log2); -+ TLI.setUnavailable(LibFunc_log2f); -+ TLI.setUnavailable(LibFunc_log2l); -+ TLI.setUnavailable(LibFunc_log1p); -+ TLI.setUnavailable(LibFunc_log1pf); -+ TLI.setUnavailable(LibFunc_log1pl); -+ TLI.setUnavailable(LibFunc_logb); -+ TLI.setUnavailable(LibFunc_logbf); -+ TLI.setUnavailable(LibFunc_logbl); -+ TLI.setUnavailable(LibFunc_nearbyint); -+ TLI.setUnavailable(LibFunc_nearbyintf); -+ TLI.setUnavailable(LibFunc_nearbyintl); -+ TLI.setUnavailable(LibFunc_rint); -+ TLI.setUnavailable(LibFunc_rintf); -+ TLI.setUnavailable(LibFunc_rintl); -+ TLI.setUnavailable(LibFunc_round); -+ TLI.setUnavailable(LibFunc_roundf); -+ TLI.setUnavailable(LibFunc_roundl); -+ TLI.setUnavailable(LibFunc_trunc); -+ TLI.setUnavailable(LibFunc_truncf); -+ TLI.setUnavailable(LibFunc_truncl); - - // Win32 provides some C99 math with mangled names -- TLI.setAvailableWithName(LibFunc::copysign, "_copysign"); -+ TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); - - if (T.getArch() == Triple::x86) { - // Win32 on x86 implements single-precision math functions as macros -- TLI.setUnavailable(LibFunc::acosf); -- TLI.setUnavailable(LibFunc::asinf); -- TLI.setUnavailable(LibFunc::atanf); -- TLI.setUnavailable(LibFunc::atan2f); -- TLI.setUnavailable(LibFunc::ceilf); -- TLI.setUnavailable(LibFunc::copysignf); -- TLI.setUnavailable(LibFunc::cosf); -- TLI.setUnavailable(LibFunc::coshf); -- TLI.setUnavailable(LibFunc::expf); -- TLI.setUnavailable(LibFunc::floorf); -- TLI.setUnavailable(LibFunc::fminf); -- TLI.setUnavailable(LibFunc::fmaxf); -- TLI.setUnavailable(LibFunc::fmodf); -- TLI.setUnavailable(LibFunc::logf); -- TLI.setUnavailable(LibFunc::powf); -- TLI.setUnavailable(LibFunc::sinf); -- TLI.setUnavailable(LibFunc::sinhf); -- TLI.setUnavailable(LibFunc::sqrtf); -- TLI.setUnavailable(LibFunc::tanf); -- TLI.setUnavailable(LibFunc::tanhf); -+ TLI.setUnavailable(LibFunc_acosf); -+ TLI.setUnavailable(LibFunc_asinf); -+ TLI.setUnavailable(LibFunc_atanf); -+ TLI.setUnavailable(LibFunc_atan2f); -+ TLI.setUnavailable(LibFunc_ceilf); -+ TLI.setUnavailable(LibFunc_copysignf); -+ TLI.setUnavailable(LibFunc_cosf); -+ TLI.setUnavailable(LibFunc_coshf); -+ TLI.setUnavailable(LibFunc_expf); -+ TLI.setUnavailable(LibFunc_floorf); -+ TLI.setUnavailable(LibFunc_fminf); -+ TLI.setUnavailable(LibFunc_fmaxf); -+ TLI.setUnavailable(LibFunc_fmodf); -+ TLI.setUnavailable(LibFunc_logf); -+ TLI.setUnavailable(LibFunc_powf); -+ TLI.setUnavailable(LibFunc_sinf); -+ TLI.setUnavailable(LibFunc_sinhf); -+ TLI.setUnavailable(LibFunc_sqrtf); -+ TLI.setUnavailable(LibFunc_tanf); -+ TLI.setUnavailable(LibFunc_tanhf); - } - - // Win32 does *not* provide provide these functions, but they are - // generally available on POSIX-compliant systems: -- TLI.setUnavailable(LibFunc::access); -- TLI.setUnavailable(LibFunc::bcmp); -- TLI.setUnavailable(LibFunc::bcopy); -- TLI.setUnavailable(LibFunc::bzero); -- TLI.setUnavailable(LibFunc::chmod); -- TLI.setUnavailable(LibFunc::chown); -- TLI.setUnavailable(LibFunc::closedir); -- TLI.setUnavailable(LibFunc::ctermid); -- TLI.setUnavailable(LibFunc::fdopen); -- TLI.setUnavailable(LibFunc::ffs); -- TLI.setUnavailable(LibFunc::fileno); -- TLI.setUnavailable(LibFunc::flockfile); -- TLI.setUnavailable(LibFunc::fseeko); -- TLI.setUnavailable(LibFunc::fstat); -- TLI.setUnavailable(LibFunc::fstatvfs); -- TLI.setUnavailable(LibFunc::ftello); -- TLI.setUnavailable(LibFunc::ftrylockfile); -- TLI.setUnavailable(LibFunc::funlockfile); -- TLI.setUnavailable(LibFunc::getc_unlocked); -- TLI.setUnavailable(LibFunc::getitimer); -- TLI.setUnavailable(LibFunc::getlogin_r); -- TLI.setUnavailable(LibFunc::getpwnam); -- TLI.setUnavailable(LibFunc::gettimeofday); -- TLI.setUnavailable(LibFunc::htonl); -- TLI.setUnavailable(LibFunc::htons); -- TLI.setUnavailable(LibFunc::lchown); -- TLI.setUnavailable(LibFunc::lstat); -- TLI.setUnavailable(LibFunc::memccpy); -- TLI.setUnavailable(LibFunc::mkdir); -- TLI.setUnavailable(LibFunc::ntohl); -- TLI.setUnavailable(LibFunc::ntohs); -- TLI.setUnavailable(LibFunc::open); -- TLI.setUnavailable(LibFunc::opendir); -- TLI.setUnavailable(LibFunc::pclose); -- TLI.setUnavailable(LibFunc::popen); -- TLI.setUnavailable(LibFunc::pread); -- TLI.setUnavailable(LibFunc::pwrite); -- TLI.setUnavailable(LibFunc::read); -- TLI.setUnavailable(LibFunc::readlink); -- TLI.setUnavailable(LibFunc::realpath); -- TLI.setUnavailable(LibFunc::rmdir); -- TLI.setUnavailable(LibFunc::setitimer); -- TLI.setUnavailable(LibFunc::stat); -- TLI.setUnavailable(LibFunc::statvfs); -- TLI.setUnavailable(LibFunc::stpcpy); -- TLI.setUnavailable(LibFunc::stpncpy); -- TLI.setUnavailable(LibFunc::strcasecmp); -- TLI.setUnavailable(LibFunc::strncasecmp); -- TLI.setUnavailable(LibFunc::times); -- TLI.setUnavailable(LibFunc::uname); -- TLI.setUnavailable(LibFunc::unlink); -- TLI.setUnavailable(LibFunc::unsetenv); -- TLI.setUnavailable(LibFunc::utime); -- TLI.setUnavailable(LibFunc::utimes); -- TLI.setUnavailable(LibFunc::write); -+ TLI.setUnavailable(LibFunc_access); -+ TLI.setUnavailable(LibFunc_bcmp); -+ TLI.setUnavailable(LibFunc_bcopy); -+ TLI.setUnavailable(LibFunc_bzero); -+ TLI.setUnavailable(LibFunc_chmod); -+ TLI.setUnavailable(LibFunc_chown); -+ TLI.setUnavailable(LibFunc_closedir); -+ TLI.setUnavailable(LibFunc_ctermid); -+ TLI.setUnavailable(LibFunc_fdopen); -+ TLI.setUnavailable(LibFunc_ffs); -+ TLI.setUnavailable(LibFunc_fileno); -+ TLI.setUnavailable(LibFunc_flockfile); -+ TLI.setUnavailable(LibFunc_fseeko); -+ TLI.setUnavailable(LibFunc_fstat); -+ TLI.setUnavailable(LibFunc_fstatvfs); -+ TLI.setUnavailable(LibFunc_ftello); -+ TLI.setUnavailable(LibFunc_ftrylockfile); -+ TLI.setUnavailable(LibFunc_funlockfile); -+ TLI.setUnavailable(LibFunc_getc_unlocked); -+ TLI.setUnavailable(LibFunc_getitimer); -+ TLI.setUnavailable(LibFunc_getlogin_r); -+ TLI.setUnavailable(LibFunc_getpwnam); -+ TLI.setUnavailable(LibFunc_gettimeofday); -+ TLI.setUnavailable(LibFunc_htonl); -+ TLI.setUnavailable(LibFunc_htons); -+ TLI.setUnavailable(LibFunc_lchown); -+ TLI.setUnavailable(LibFunc_lstat); -+ TLI.setUnavailable(LibFunc_memccpy); -+ TLI.setUnavailable(LibFunc_mkdir); -+ TLI.setUnavailable(LibFunc_ntohl); -+ TLI.setUnavailable(LibFunc_ntohs); -+ TLI.setUnavailable(LibFunc_open); -+ TLI.setUnavailable(LibFunc_opendir); -+ TLI.setUnavailable(LibFunc_pclose); -+ TLI.setUnavailable(LibFunc_popen); -+ TLI.setUnavailable(LibFunc_pread); -+ TLI.setUnavailable(LibFunc_pwrite); -+ TLI.setUnavailable(LibFunc_read); -+ TLI.setUnavailable(LibFunc_readlink); -+ TLI.setUnavailable(LibFunc_realpath); -+ TLI.setUnavailable(LibFunc_rmdir); -+ TLI.setUnavailable(LibFunc_setitimer); -+ TLI.setUnavailable(LibFunc_stat); -+ TLI.setUnavailable(LibFunc_statvfs); -+ TLI.setUnavailable(LibFunc_stpcpy); -+ TLI.setUnavailable(LibFunc_stpncpy); -+ TLI.setUnavailable(LibFunc_strcasecmp); -+ TLI.setUnavailable(LibFunc_strncasecmp); -+ TLI.setUnavailable(LibFunc_times); -+ TLI.setUnavailable(LibFunc_uname); -+ TLI.setUnavailable(LibFunc_unlink); -+ TLI.setUnavailable(LibFunc_unsetenv); -+ TLI.setUnavailable(LibFunc_utime); -+ TLI.setUnavailable(LibFunc_utimes); -+ TLI.setUnavailable(LibFunc_write); - - // Win32 does *not* provide provide these functions, but they are - // specified by C99: -- TLI.setUnavailable(LibFunc::atoll); -- TLI.setUnavailable(LibFunc::frexpf); -- TLI.setUnavailable(LibFunc::llabs); -+ TLI.setUnavailable(LibFunc_atoll); -+ TLI.setUnavailable(LibFunc_frexpf); -+ TLI.setUnavailable(LibFunc_llabs); - } - - switch (T.getOS()) { -@@ -287,28 +287,28 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // for Intel processors (both OS X and iOS simulator) was incorrect for - // some values until OS X 10.11 and iOS 9.0. exp10l is not available on - // OS X or iOS. -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (T.isMacOSXVersionLT(10, 11)) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::IOS: - case Triple::TvOS: - case Triple::WatchOS: -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (!T.isWatchOS() && (T.isOSVersionLT(7, 0) || - (T.isOSVersionLT(9, 0) && - (T.getArch() == Triple::x86 || - T.getArch() == Triple::x86_64)))) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::Linux: -@@ -319,9 +319,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // - // Fall through to disable all of them. - default: -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); -+ TLI.setUnavailable(LibFunc_exp10l); - } - - // ffsl is available on at least Darwin, Mac OS X, iOS, FreeBSD, and -@@ -339,7 +339,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsl); -+ TLI.setUnavailable(LibFunc_ffsl); - } - - // ffsll is available on at least FreeBSD and Linux (GLIBC): -@@ -355,7 +355,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsll); -+ TLI.setUnavailable(LibFunc_ffsll); - } - - // The following functions are available on at least FreeBSD: -@@ -363,30 +363,30 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // http://svn.freebsd.org/base/head/lib/libc/string/flsl.c - // http://svn.freebsd.org/base/head/lib/libc/string/flsll.c - if (!T.isOSFreeBSD()) { -- TLI.setUnavailable(LibFunc::fls); -- TLI.setUnavailable(LibFunc::flsl); -- TLI.setUnavailable(LibFunc::flsll); -+ TLI.setUnavailable(LibFunc_fls); -+ TLI.setUnavailable(LibFunc_flsl); -+ TLI.setUnavailable(LibFunc_flsll); - } - - // The following functions are available on at least Linux: - if (!T.isOSLinux()) { -- TLI.setUnavailable(LibFunc::dunder_strdup); -- TLI.setUnavailable(LibFunc::dunder_strtok_r); -- TLI.setUnavailable(LibFunc::dunder_isoc99_scanf); -- TLI.setUnavailable(LibFunc::dunder_isoc99_sscanf); -- TLI.setUnavailable(LibFunc::under_IO_getc); -- TLI.setUnavailable(LibFunc::under_IO_putc); -- TLI.setUnavailable(LibFunc::memalign); -- TLI.setUnavailable(LibFunc::fopen64); -- TLI.setUnavailable(LibFunc::fseeko64); -- TLI.setUnavailable(LibFunc::fstat64); -- TLI.setUnavailable(LibFunc::fstatvfs64); -- TLI.setUnavailable(LibFunc::ftello64); -- TLI.setUnavailable(LibFunc::lstat64); -- TLI.setUnavailable(LibFunc::open64); -- TLI.setUnavailable(LibFunc::stat64); -- TLI.setUnavailable(LibFunc::statvfs64); -- TLI.setUnavailable(LibFunc::tmpfile64); -+ TLI.setUnavailable(LibFunc_dunder_strdup); -+ TLI.setUnavailable(LibFunc_dunder_strtok_r); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_scanf); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf); -+ TLI.setUnavailable(LibFunc_under_IO_getc); -+ TLI.setUnavailable(LibFunc_under_IO_putc); -+ TLI.setUnavailable(LibFunc_memalign); -+ TLI.setUnavailable(LibFunc_fopen64); -+ TLI.setUnavailable(LibFunc_fseeko64); -+ TLI.setUnavailable(LibFunc_fstat64); -+ TLI.setUnavailable(LibFunc_fstatvfs64); -+ TLI.setUnavailable(LibFunc_ftello64); -+ TLI.setUnavailable(LibFunc_lstat64); -+ TLI.setUnavailable(LibFunc_open64); -+ TLI.setUnavailable(LibFunc_stat64); -+ TLI.setUnavailable(LibFunc_statvfs64); -+ TLI.setUnavailable(LibFunc_tmpfile64); - } - - TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary); -@@ -446,9 +446,9 @@ static StringRef sanitizeFunctionName(StringRef funcName) { - } - - bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const char *const *Start = &StandardNames[0]; -- const char *const *End = &StandardNames[LibFunc::NumLibFuncs]; -+ const char *const *End = &StandardNames[NumLibFuncs]; - - funcName = sanitizeFunctionName(funcName); - if (funcName.empty()) -@@ -459,14 +459,14 @@ bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, - return std::strncmp(LHS, RHS.data(), RHS.size()) < 0; - }); - if (I != End && *I == funcName) { -- F = (LibFunc::Func)(I - Start); -+ F = (LibFunc)(I - Start); - return true; - } - return false; - } - - bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, -- LibFunc::Func F, -+ LibFunc F, - const DataLayout *DL) const { - LLVMContext &Ctx = FTy.getContext(); - Type *PCharTy = Type::getInt8PtrTy(Ctx); -@@ -477,489 +477,489 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - unsigned NumParams = FTy.getNumParams(); - - switch (F) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1)->isIntegerTy()); - -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return ((NumParams == 2 || NumParams == 3) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::strcat: -+ case LibFunc_strcat: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType()); - -- case LibFunc::strncat: -+ case LibFunc_strncat: - return (NumParams == 3 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType() && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strcpy_chk: -- case LibFunc::stpcpy_chk: -+ case LibFunc_strcpy_chk: -+ case LibFunc_stpcpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: - return (NumParams == 2 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy); - -- case LibFunc::strncpy_chk: -- case LibFunc::stpncpy_chk: -+ case LibFunc_strncpy_chk: -+ case LibFunc_stpncpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return (NumParams == 2 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strspn: -- case LibFunc::strcspn: -+ case LibFunc_strspn: -+ case LibFunc_strcspn: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strcoll: -- case LibFunc::strcasecmp: -- case LibFunc::strncasecmp: -+ case LibFunc_strcoll: -+ case LibFunc_strcasecmp: -+ case LibFunc_strncasecmp: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strstr: -+ case LibFunc_strstr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::scanf: -+ case LibFunc_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::system: -+ case LibFunc_system: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::malloc: -+ case LibFunc_malloc: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy()); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getReturnType()->isIntegerTy(32)); - -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy(32) && - FTy.getParamType(2)->isIntegerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::memcpy_chk: -- case LibFunc::memmove_chk: -+ case LibFunc_memcpy_chk: -+ case LibFunc_memmove_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memcpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memmove: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memset: -+ case LibFunc_memset: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memccpy: -+ case LibFunc_memccpy: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::memalign: -+ case LibFunc_memalign: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::realloc: -+ case LibFunc_realloc: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::read: -+ case LibFunc_read: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::rewind: -+ case LibFunc_rewind: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rename: -+ case LibFunc_rename: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::readlink: -+ case LibFunc_readlink: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::write: -+ case LibFunc_write: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bzero: -+ case LibFunc_bzero: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::calloc: -+ case LibFunc_calloc: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy()); - -- case LibFunc::atof: -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atoll: -- case LibFunc::ferror: -- case LibFunc::getenv: -- case LibFunc::getpwnam: -- case LibFunc::pclose: -- case LibFunc::perror: -- case LibFunc::printf: -- case LibFunc::puts: -- case LibFunc::uname: -- case LibFunc::under_IO_getc: -- case LibFunc::unlink: -- case LibFunc::unsetenv: -+ case LibFunc_atof: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atoll: -+ case LibFunc_ferror: -+ case LibFunc_getenv: -+ case LibFunc_getpwnam: -+ case LibFunc_pclose: -+ case LibFunc_perror: -+ case LibFunc_printf: -+ case LibFunc_puts: -+ case LibFunc_uname: -+ case LibFunc_under_IO_getc: -+ case LibFunc_unlink: -+ case LibFunc_unsetenv: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::chmod: -- case LibFunc::chown: -- case LibFunc::clearerr: -- case LibFunc::closedir: -- case LibFunc::ctermid: -- case LibFunc::fclose: -- case LibFunc::feof: -- case LibFunc::fflush: -- case LibFunc::fgetc: -- case LibFunc::fileno: -- case LibFunc::flockfile: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::fseeko64: -- case LibFunc::fseeko: -- case LibFunc::fsetpos: -- case LibFunc::ftell: -- case LibFunc::ftello64: -- case LibFunc::ftello: -- case LibFunc::ftrylockfile: -- case LibFunc::funlockfile: -- case LibFunc::getc: -- case LibFunc::getc_unlocked: -- case LibFunc::getlogin_r: -- case LibFunc::mkdir: -- case LibFunc::mktime: -- case LibFunc::times: -+ case LibFunc_chmod: -+ case LibFunc_chown: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: -+ case LibFunc_ctermid: -+ case LibFunc_fclose: -+ case LibFunc_feof: -+ case LibFunc_fflush: -+ case LibFunc_fgetc: -+ case LibFunc_fileno: -+ case LibFunc_flockfile: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_fseeko64: -+ case LibFunc_fseeko: -+ case LibFunc_fsetpos: -+ case LibFunc_ftell: -+ case LibFunc_ftello64: -+ case LibFunc_ftello: -+ case LibFunc_ftrylockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_getc: -+ case LibFunc_getc_unlocked: -+ case LibFunc_getlogin_r: -+ case LibFunc_mkdir: -+ case LibFunc_mktime: -+ case LibFunc_times: - return (NumParams != 0 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::access: -+ case LibFunc_access: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::fopen: -+ case LibFunc_fopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgets: -+ case LibFunc_fgets: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::fread: -+ case LibFunc_fread: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return (NumParams == 4 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::gets: -- case LibFunc::getchar: -- case LibFunc::getitimer: -+ case LibFunc_gets: -+ case LibFunc_getchar: -+ case LibFunc_getitimer: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::putc: -+ case LibFunc_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::pread: -- case LibFunc::pwrite: -+ case LibFunc_pread: -+ case LibFunc_pwrite: - return (NumParams == 4 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::popen: -+ case LibFunc_popen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::valloc: -+ case LibFunc_valloc: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::open: -+ case LibFunc_open: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::opendir: -+ case LibFunc_opendir: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -- case LibFunc::lstat: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: -+ case LibFunc_lstat: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::lchown: -+ case LibFunc_lchown: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::qsort: -+ case LibFunc_qsort: - return (NumParams == 4 && FTy.getParamType(3)->isPointerTy()); -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::open64: -+ case LibFunc_open64: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::Znwj: // new(unsigned int); -- case LibFunc::Znwm: // new(unsigned long); -- case LibFunc::Znaj: // new[](unsigned int); -- case LibFunc::Znam: // new[](unsigned long); -- case LibFunc::msvc_new_int: // new(unsigned int); -- case LibFunc::msvc_new_longlong: // new(unsigned long long); -- case LibFunc::msvc_new_array_int: // new[](unsigned int); -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long); -+ case LibFunc_Znwj: // new(unsigned int); -+ case LibFunc_Znwm: // new(unsigned long); -+ case LibFunc_Znaj: // new[](unsigned int); -+ case LibFunc_Znam: // new[](unsigned long); -+ case LibFunc_msvc_new_int: // new(unsigned int); -+ case LibFunc_msvc_new_longlong: // new(unsigned long long); -+ case LibFunc_msvc_new_array_int: // new[](unsigned int); -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long); - return (NumParams == 1); - -- case LibFunc::memset_pattern16: -+ case LibFunc_memset_pattern16: - return (!FTy.isVarArg() && NumParams == 3 && - isa(FTy.getParamType(0)) && - isa(FTy.getParamType(1)) && - isa(FTy.getParamType(2))); - -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - return (NumParams == 1 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return (NumParams == 2 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getReturnType() == FTy.getParamType(1)); - -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -- case LibFunc::isdigit: -- case LibFunc::isascii: -- case LibFunc::toascii: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: -+ case LibFunc_isdigit: -+ case LibFunc_isascii: -+ case LibFunc_toascii: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isIntegerTy()); - -- case LibFunc::fls: -- case LibFunc::flsl: -- case LibFunc::flsll: -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_fls: -+ case LibFunc_flsl: -+ case LibFunc_flsll: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::cxa_atexit: -+ case LibFunc_cxa_atexit: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); - -- case LibFunc::sinpi: -- case LibFunc::cospi: -+ case LibFunc_sinpi: -+ case LibFunc_cospi: - return (NumParams == 1 && FTy.getReturnType()->isDoubleTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::sinpif: -- case LibFunc::cospif: -+ case LibFunc_sinpif: -+ case LibFunc_cospif: - return (NumParams == 1 && FTy.getReturnType()->isFloatTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -@@ -971,7 +971,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - } - - bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const DataLayout *DL = - FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; - return getLibFunc(FDecl.getName(), F) && -diff --git a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -index b3bc885c..945acb8b 100644 ---- a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -+++ b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -@@ -135,7 +135,7 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - if (!TLI) - return Intrinsic::not_intrinsic; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = CI->getCalledFunction(); - // We're going to make assumptions on the semantics of the functions, check - // that the target knows that it's available in this environment and it does -@@ -148,77 +148,77 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - switch (Func) { - default: - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - return checkUnaryFloatSignature(*CI, Intrinsic::sin); -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - return checkUnaryFloatSignature(*CI, Intrinsic::cos); -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: - return checkUnaryFloatSignature(*CI, Intrinsic::exp); -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - return checkUnaryFloatSignature(*CI, Intrinsic::exp2); -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: - return checkUnaryFloatSignature(*CI, Intrinsic::log); -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: - return checkUnaryFloatSignature(*CI, Intrinsic::log10); -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - return checkUnaryFloatSignature(*CI, Intrinsic::log2); -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - return checkUnaryFloatSignature(*CI, Intrinsic::fabs); -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - return checkBinaryFloatSignature(*CI, Intrinsic::minnum); -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - return checkBinaryFloatSignature(*CI, Intrinsic::maxnum); -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - return checkBinaryFloatSignature(*CI, Intrinsic::copysign); -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - return checkUnaryFloatSignature(*CI, Intrinsic::floor); -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - return checkUnaryFloatSignature(*CI, Intrinsic::ceil); -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - return checkUnaryFloatSignature(*CI, Intrinsic::trunc); -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - return checkUnaryFloatSignature(*CI, Intrinsic::rint); -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - return checkUnaryFloatSignature(*CI, Intrinsic::nearbyint); -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - return checkUnaryFloatSignature(*CI, Intrinsic::round); -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return checkBinaryFloatSignature(*CI, Intrinsic::pow); - } - -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -index a8d4d296..da81eabd 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -@@ -1379,7 +1379,7 @@ bool FastISel::selectInstruction(const Instruction *I) { - - if (const auto *Call = dyn_cast(I)) { - const Function *F = Call->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - - // As a special case, don't handle calls to builtin library functions that - // may be translated directly to target instructions. -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -index 7f64d7b4..44800eca 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -@@ -6125,15 +6125,15 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - - // Check for well-known libc/libm calls. If the function is internal, it - // can't be a library call. -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { - switch (Func) { - default: break; -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - if (I.getNumArgOperands() == 2 && // Basic sanity checks. - I.getArgOperand(0)->getType()->isFloatingPointTy() && - I.getType() == I.getArgOperand(0)->getType() && -@@ -6146,118 +6146,118 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - return; - } - break; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - if (visitUnaryFloatCall(I, ISD::FABS)) - return; - break; -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - if (visitBinaryFloatCall(I, ISD::FMINNUM)) - return; - break; -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - if (visitBinaryFloatCall(I, ISD::FMAXNUM)) - return; - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - if (visitUnaryFloatCall(I, ISD::FSIN)) - return; - break; -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - if (visitUnaryFloatCall(I, ISD::FCOS)) - return; - break; -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: -- case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: -+ case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: - if (visitUnaryFloatCall(I, ISD::FSQRT)) - return; - break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - if (visitUnaryFloatCall(I, ISD::FFLOOR)) - return; - break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - if (visitUnaryFloatCall(I, ISD::FNEARBYINT)) - return; - break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - if (visitUnaryFloatCall(I, ISD::FCEIL)) - return; - break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - if (visitUnaryFloatCall(I, ISD::FRINT)) - return; - break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - if (visitUnaryFloatCall(I, ISD::FROUND)) - return; - break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - if (visitUnaryFloatCall(I, ISD::FTRUNC)) - return; - break; -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - if (visitUnaryFloatCall(I, ISD::FLOG2)) - return; - break; -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - if (visitUnaryFloatCall(I, ISD::FEXP2)) - return; - break; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - if (visitMemCmpCall(I)) - return; - break; -- case LibFunc::memchr: -+ case LibFunc_memchr: - if (visitMemChrCall(I)) - return; - break; -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - if (visitStrCpyCall(I, false)) - return; - break; -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - if (visitStrCpyCall(I, true)) - return; - break; -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - if (visitStrCmpCall(I)) - return; - break; -- case LibFunc::strlen: -+ case LibFunc_strlen: - if (visitStrLenCall(I)) - return; - break; -- case LibFunc::strnlen: -+ case LibFunc_strnlen: - if (visitStrNLenCall(I)) - return; - break; -diff --git a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -index bed784a5..5110cddd 100644 ---- a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -+++ b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -@@ -63,9 +63,9 @@ private: - - // TargetLibraryInfo has info on C runtime library calls on the current - // target. -- for (unsigned I = 0, E = static_cast(LibFunc::NumLibFuncs); -+ for (unsigned I = 0, E = static_cast(NumLibFuncs); - I != E; ++I) { -- LibFunc::Func F = static_cast(I); -+ LibFunc F = static_cast(I); - if (TLI.has(F)) - Libcalls.insert(TLI.getName(F)); - } -diff --git a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -index b6ac4d54..10f1f20e 100644 ---- a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -+++ b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -@@ -313,7 +313,7 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - // (i.e. soft float or atomics). If adapting for targets that do, - // additional care is required here. - -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && LibInfo && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { -@@ -327,42 +327,42 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - - switch (Func) { - default: return true; -- case LibFunc::copysign: -- case LibFunc::copysignf: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: - continue; // ISD::FCOPYSIGN is never a library call. -- case LibFunc::copysignl: -+ case LibFunc_copysignl: - return true; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - continue; // ISD::FABS is never a library call. -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - Opcode = ISD::FSQRT; break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - Opcode = ISD::FFLOOR; break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - Opcode = ISD::FNEARBYINT; break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - Opcode = ISD::FCEIL; break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - Opcode = ISD::FRINT; break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - Opcode = ISD::FROUND; break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - Opcode = ISD::FTRUNC; break; - } - -diff --git a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -index 29d2c99f..f258f38a 100644 ---- a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -+++ b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -@@ -3067,7 +3067,7 @@ bool GlobalOpt::OptimizeGlobalAliases(Module &M) { - } - - static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { -- LibFunc::Func F = LibFunc::cxa_atexit; -+ LibFunc F = LibFunc_cxa_atexit; - if (!TLI->has(F)) - return nullptr; - -@@ -3076,7 +3076,7 @@ static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { - return nullptr; - - // Make sure that the function has the correct prototype. -- if (!TLI->getLibFunc(*Fn, F) || F != LibFunc::cxa_atexit) -+ if (!TLI->getLibFunc(*Fn, F) || F != LibFunc_cxa_atexit) - return nullptr; - - return Fn; -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -index 36ad0a5f..2a644844 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -@@ -176,20 +176,20 @@ static bool hasMemoryWrite(Instruction *I, const TargetLibraryInfo &TLI) { - } - if (auto CS = CallSite(I)) { - if (Function *F = CS.getCalledFunction()) { -- if (TLI.has(LibFunc::strcpy) && -- F->getName() == TLI.getName(LibFunc::strcpy)) { -+ if (TLI.has(LibFunc_strcpy) && -+ F->getName() == TLI.getName(LibFunc_strcpy)) { - return true; - } -- if (TLI.has(LibFunc::strncpy) && -- F->getName() == TLI.getName(LibFunc::strncpy)) { -+ if (TLI.has(LibFunc_strncpy) && -+ F->getName() == TLI.getName(LibFunc_strncpy)) { - return true; - } -- if (TLI.has(LibFunc::strcat) && -- F->getName() == TLI.getName(LibFunc::strcat)) { -+ if (TLI.has(LibFunc_strcat) && -+ F->getName() == TLI.getName(LibFunc_strcat)) { - return true; - } -- if (TLI.has(LibFunc::strncat) && -- F->getName() == TLI.getName(LibFunc::strncat)) { -+ if (TLI.has(LibFunc_strncat) && -+ F->getName() == TLI.getName(LibFunc_strncat)) { - return true; - } - } -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -index fa87b5b1..e13fd802 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -@@ -210,9 +210,9 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L, LPPassManager &LPM) { - *CurLoop->getHeader()->getParent()); - DL = &CurLoop->getHeader()->getModule()->getDataLayout(); - -- HasMemset = TLI->has(LibFunc::memset); -- HasMemsetPattern = TLI->has(LibFunc::memset_pattern16); -- HasMemcpy = TLI->has(LibFunc::memcpy); -+ HasMemset = TLI->has(LibFunc_memset); -+ HasMemsetPattern = TLI->has(LibFunc_memset_pattern16); -+ HasMemcpy = TLI->has(LibFunc_memcpy); - - if (HasMemset || HasMemsetPattern || HasMemcpy) - if (SE->hasLoopInvariantBackedgeTakenCount(L)) -@@ -489,7 +489,7 @@ bool LoopIdiomRecognize::processLoopMemSet(MemSetInst *MSI, - return false; - - // If we're not allowed to hack on memset, we fail. -- if (!TLI->has(LibFunc::memset)) -+ if (!TLI->has(LibFunc_memset)) - return false; - - Value *Pointer = MSI->getDest(); -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -index 6b43b0f7..d4fd8ce4 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -@@ -1144,7 +1144,7 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) { - bool MemCpyOpt::processMemMove(MemMoveInst *M) { - AliasAnalysis &AA = getAnalysis().getAAResults(); - -- if (!TLI->has(LibFunc::memmove)) -+ if (!TLI->has(LibFunc_memmove)) - return false; - - // See if the pointers alias. -@@ -1290,7 +1290,7 @@ bool MemCpyOpt::runOnFunction(Function &F) { - // If we don't have at least memset and memcpy, there is little point of doing - // anything here. These are required by a freestanding implementation, so if - // even they are disabled, there is no point in trying hard. -- if (!TLI->has(LibFunc::memset) || !TLI->has(LibFunc::memcpy)) -+ if (!TLI->has(LibFunc_memset) || !TLI->has(LibFunc_memcpy)) - return false; - - while (1) { -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -index 9f26f788..aa08538a 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -@@ -77,14 +77,14 @@ bool PartiallyInlineLibCalls::runOnFunction(Function &F) { - - // Skip if function either has local linkage or is not a known library - // function. -- LibFunc::Func LibFunc; -+ LibFunc LF; - if (CalledFunc->hasLocalLinkage() || !CalledFunc->hasName() || -- !TLI->getLibFunc(CalledFunc->getName(), LibFunc)) -+ !TLI->getLibFunc(CalledFunc->getName(), LF)) - continue; - -- switch (LibFunc) { -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -+ switch (LF) { -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: - if (TTI->haveFastSqrt(Call->getType()) && - optimizeSQRT(Call, CalledFunc, *CurrBB, BB)) - break; -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -index 85d0299d..5b6dbdfd 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -@@ -107,254 +107,254 @@ static bool setNonNull(Function &F, unsigned n) { - } - - bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { -- LibFunc::Func TheLibFunc; -+ LibFunc TheLibFunc; - if (!(TLI.getLibFunc(F, TheLibFunc) && TLI.has(TheLibFunc))) - return false; - - bool Changed = false; - switch (TheLibFunc) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -- case LibFunc::strcat: -- case LibFunc::strncat: -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: -+ case LibFunc_strcat: -+ case LibFunc_strncat: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strcmp: // 0,1 -- case LibFunc::strspn: // 0,1 -- case LibFunc::strncmp: // 0,1 -- case LibFunc::strcspn: // 0,1 -- case LibFunc::strcoll: // 0,1 -- case LibFunc::strcasecmp: // 0,1 -- case LibFunc::strncasecmp: // -+ case LibFunc_strcmp: // 0,1 -+ case LibFunc_strspn: // 0,1 -+ case LibFunc_strncmp: // 0,1 -+ case LibFunc_strcspn: // 0,1 -+ case LibFunc_strcoll: // 0,1 -+ case LibFunc_strcasecmp: // 0,1 -+ case LibFunc_strncasecmp: // - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strstr: -- case LibFunc::strpbrk: -+ case LibFunc_strstr: -+ case LibFunc_strpbrk: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::scanf: -+ case LibFunc_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::system: -+ case LibFunc_system: - // May throw; "system" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::malloc: -+ case LibFunc_malloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memcpy: -- case LibFunc::memccpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memccpy: -+ case LibFunc_memmove: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::memalign: -+ case LibFunc_memalign: - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::mkdir: -+ case LibFunc_mkdir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::mktime: -+ case LibFunc_mktime: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::realloc: -+ case LibFunc_realloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::read: -+ case LibFunc_read: - // May throw; "read" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::rewind: -+ case LibFunc_rewind: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::rename: -+ case LibFunc_rename: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::readlink: -+ case LibFunc_readlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::write: -+ case LibFunc_write: - // May throw; "write" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::bzero: -+ case LibFunc_bzero: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::calloc: -+ case LibFunc_calloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::chmod: -- case LibFunc::chown: -+ case LibFunc_chmod: -+ case LibFunc_chown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ctermid: -- case LibFunc::clearerr: -- case LibFunc::closedir: -+ case LibFunc_ctermid: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atof: -- case LibFunc::atoll: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atof: -+ case LibFunc_atoll: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::access: -+ case LibFunc_access: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fopen: -+ case LibFunc_fopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -362,150 +362,150 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::feof: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::ftell: -- case LibFunc::fgetc: -- case LibFunc::fseeko: -- case LibFunc::ftello: -- case LibFunc::fileno: -- case LibFunc::fflush: -- case LibFunc::fclose: -- case LibFunc::fsetpos: -- case LibFunc::flockfile: -- case LibFunc::funlockfile: -- case LibFunc::ftrylockfile: -+ case LibFunc_feof: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_ftell: -+ case LibFunc_fgetc: -+ case LibFunc_fseeko: -+ case LibFunc_ftello: -+ case LibFunc_fileno: -+ case LibFunc_fflush: -+ case LibFunc_fclose: -+ case LibFunc_fsetpos: -+ case LibFunc_flockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_ftrylockfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::ferror: -+ case LibFunc_ferror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F); - return Changed; -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::fgets: -+ case LibFunc_fgets: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 3); - return Changed; -- case LibFunc::fread: -+ case LibFunc_fread: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - // FIXME: readonly #1? - return Changed; -- case LibFunc::fputs: -+ case LibFunc_fputs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getc: -- case LibFunc::getlogin_r: -- case LibFunc::getc_unlocked: -+ case LibFunc_getc: -+ case LibFunc_getlogin_r: -+ case LibFunc_getc_unlocked: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::getenv: -+ case LibFunc_getenv: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::gets: -- case LibFunc::getchar: -+ case LibFunc_gets: -+ case LibFunc_getchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::getitimer: -+ case LibFunc_getitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getpwnam: -+ case LibFunc_getpwnam: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::uname: -+ case LibFunc_uname: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::unlink: -+ case LibFunc_unlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::unsetenv: -+ case LibFunc_unsetenv: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putc: -+ case LibFunc_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::puts: -- case LibFunc::printf: -- case LibFunc::perror: -+ case LibFunc_puts: -+ case LibFunc_printf: -+ case LibFunc_perror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::pread: -+ case LibFunc_pread: - // May throw; "pread" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::pwrite: -+ case LibFunc_pwrite: - // May throw; "pwrite" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putchar: -+ case LibFunc_putchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::popen: -+ case LibFunc_popen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -513,132 +513,132 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::pclose: -+ case LibFunc_pclose: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::valloc: -+ case LibFunc_valloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::open: -+ case LibFunc_open: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::opendir: -+ case LibFunc_opendir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::times: -+ case LibFunc_times: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAccessMemory(F); - return Changed; -- case LibFunc::lstat: -+ case LibFunc_lstat: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::lchown: -+ case LibFunc_lchown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::qsort: -+ case LibFunc_qsort: - // May throw; places call through function pointer. - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::under_IO_getc: -+ case LibFunc_under_IO_getc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -646,26 +646,26 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fseeko64: -- case LibFunc::ftello64: -+ case LibFunc_fseeko64: -+ case LibFunc_ftello64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::open64: -+ case LibFunc_open64: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - // Currently some platforms have the restrict keyword on the arguments to - // gettimeofday. To be conservative, do not add noalias to gettimeofday's - // arguments. -@@ -673,22 +673,22 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::Znwj: // new(unsigned int) -- case LibFunc::Znwm: // new(unsigned long) -- case LibFunc::Znaj: // new[](unsigned int) -- case LibFunc::Znam: // new[](unsigned long) -- case LibFunc::msvc_new_int: // new(unsigned int) -- case LibFunc::msvc_new_longlong: // new(unsigned long long) -- case LibFunc::msvc_new_array_int: // new[](unsigned int) -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long) -+ case LibFunc_Znwj: // new(unsigned int) -+ case LibFunc_Znwm: // new(unsigned long) -+ case LibFunc_Znaj: // new[](unsigned int) -+ case LibFunc_Znam: // new[](unsigned long) -+ case LibFunc_msvc_new_int: // new(unsigned int) -+ case LibFunc_msvc_new_longlong: // new(unsigned long long) -+ case LibFunc_msvc_new_array_int: // new[](unsigned int) -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long) - // Operator new always returns a nonnull noalias pointer - Changed |= setNonNull(F, AttributeSet::ReturnIndex); - Changed |= setDoesNotAlias(F, AttributeSet::ReturnIndex); - return Changed; - //TODO: add LibFunc entries for: -- //case LibFunc::memset_pattern4: -- //case LibFunc::memset_pattern8: -- case LibFunc::memset_pattern16: -+ //case LibFunc_memset_pattern4: -+ //case LibFunc_memset_pattern8: -+ case LibFunc_memset_pattern16: - Changed |= setOnlyAccessesArgMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); -@@ -711,7 +711,7 @@ Value *llvm::castToCStr(Value *V, IRBuilder<> &B) { - - Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strlen)) -+ if (!TLI->has(LibFunc_strlen)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -728,7 +728,7 @@ Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - - Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strchr)) -+ if (!TLI->has(LibFunc_strchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -746,7 +746,7 @@ Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - - Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strncmp)) -+ if (!TLI->has(LibFunc_strncmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -766,7 +766,7 @@ Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - - Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strcpy)) -+ if (!TLI->has(LibFunc_strcpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -782,7 +782,7 @@ Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - - Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strncpy)) -+ if (!TLI->has(LibFunc_strncpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -800,7 +800,7 @@ Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcpy_chk)) -+ if (!TLI->has(LibFunc_memcpy_chk)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -822,7 +822,7 @@ Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - - Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memchr)) -+ if (!TLI->has(LibFunc_memchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -841,7 +841,7 @@ Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - - Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcmp)) -+ if (!TLI->has(LibFunc_memcmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -909,7 +909,7 @@ Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name, - - Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::putchar)) -+ if (!TLI->has(LibFunc_putchar)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -929,7 +929,7 @@ Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - - Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::puts)) -+ if (!TLI->has(LibFunc_puts)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -944,7 +944,7 @@ Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - - Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputc)) -+ if (!TLI->has(LibFunc_fputc)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -963,11 +963,11 @@ Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - - Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputs)) -+ if (!TLI->has(LibFunc_fputs)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -- StringRef FPutsName = TLI->getName(LibFunc::fputs); -+ StringRef FPutsName = TLI->getName(LibFunc_fputs); - Constant *F = M->getOrInsertFunction( - FPutsName, B.getInt32Ty(), B.getInt8PtrTy(), File->getType(), nullptr); - if (File->getType()->isPointerTy()) -@@ -981,12 +981,12 @@ Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - - Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fwrite)) -+ if (!TLI->has(LibFunc_fwrite)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); - LLVMContext &Context = B.GetInsertBlock()->getContext(); -- StringRef FWriteName = TLI->getName(LibFunc::fwrite); -+ StringRef FWriteName = TLI->getName(LibFunc_fwrite); - Constant *F = M->getOrInsertFunction( - FWriteName, DL.getIntPtrType(Context), B.getInt8PtrTy(), - DL.getIntPtrType(Context), DL.getIntPtrType(Context), File->getType(), -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -index 7bdc00c7..ec7937fc 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -@@ -308,7 +308,7 @@ bool llvm::obfuscateModule(Module &M, const TargetMachine *TM, Obfuscator &obfs, - TargetLibraryInfoImpl TLII(Triple(M.getTargetTriple())); - TargetLibraryInfo TLI(TLII); - auto isLibName = [&TLI](StringRef &S) { -- LibFunc::Func F; -+ LibFunc F; - return TLI.getLibFunc(S, F); - }; - -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -index fecded3c..b3238cbb 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -@@ -52,9 +52,9 @@ static cl::opt - // Helper Functions - //===----------------------------------------------------------------------===// - --static bool ignoreCallingConv(LibFunc::Func Func) { -- return Func == LibFunc::abs || Func == LibFunc::labs || -- Func == LibFunc::llabs || Func == LibFunc::strlen; -+static bool ignoreCallingConv(LibFunc Func) { -+ return Func == LibFunc_abs || Func == LibFunc_labs || -+ Func == LibFunc_llabs || Func == LibFunc_strlen; - } - - /// Return true if it only matters that the value is equal or not-equal to zero. -@@ -92,8 +92,8 @@ static bool callHasFloatingPointArgument(const CallInst *CI) { - /// \brief Check whether the overloaded unary floating point function - /// corresponding to \a Ty is available. - static bool hasUnaryFloatFn(const TargetLibraryInfo *TLI, Type *Ty, -- LibFunc::Func DoubleFn, LibFunc::Func FloatFn, -- LibFunc::Func LongDoubleFn) { -+ LibFunc DoubleFn, LibFunc FloatFn, -+ LibFunc LongDoubleFn) { - switch (Ty->getTypeID()) { - case Type::FloatTyID: - return TLI->has(FloatFn); -@@ -896,15 +896,15 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return Op1C; - // pow(2.0, x) -> exp2(x) - if (Op1C->isExactlyValue(2.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f, -- LibFunc::exp2l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp2), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp2, LibFunc_exp2f, -+ LibFunc_exp2l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp2), B, - Callee->getAttributes()); - // pow(10.0, x) -> exp10(x) - if (Op1C->isExactlyValue(10.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f, -- LibFunc::exp10l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp10, LibFunc_exp10f, -+ LibFunc_exp10l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp10), B, - Callee->getAttributes()); - } - -@@ -916,10 +916,10 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - // pow(exp(x), y) = pow(inf, 0.001) = inf, whereas exp(x*y) = exp(1). - auto *OpC = dyn_cast(Op1); - if (OpC && OpC->hasUnsafeAlgebra() && CI->hasUnsafeAlgebra()) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *OpCCallee = OpC->getCalledFunction(); - if (OpCCallee && TLI->getLibFunc(OpCCallee->getName(), Func) && -- TLI->has(Func) && (Func == LibFunc::exp || Func == LibFunc::exp2)) { -+ TLI->has(Func) && (Func == LibFunc_exp || Func == LibFunc_exp2)) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); - Value *FMul = B.CreateFMul(OpC->getArgOperand(0), Op2, "mul"); -@@ -936,16 +936,16 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return ConstantFP::get(CI->getType(), 1.0); - - if (Op2C->isExactlyValue(0.5) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::sqrt, LibFunc::sqrtf, -- LibFunc::sqrtl) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::fabs, LibFunc::fabsf, -- LibFunc::fabsl)) { -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_sqrt, LibFunc_sqrtf, -+ LibFunc_sqrtl) && -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_fabs, LibFunc_fabsf, -+ LibFunc_fabsl)) { - - // In -ffast-math, pow(x, 0.5) -> sqrt(x). - if (CI->hasUnsafeAlgebra()) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); -- return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B, -+ return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc_sqrt), B, - Callee->getAttributes()); - } - -@@ -1018,11 +1018,11 @@ Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilder<> &B) { - Value *Op = CI->getArgOperand(0); - // Turn exp2(sitofp(x)) -> ldexp(1.0, sext(x)) if sizeof(x) <= 32 - // Turn exp2(uitofp(x)) -> ldexp(1.0, zext(x)) if sizeof(x) < 32 -- LibFunc::Func LdExp = LibFunc::ldexpl; -+ LibFunc LdExp = LibFunc_ldexpl; - if (Op->getType()->isFloatTy()) -- LdExp = LibFunc::ldexpf; -+ LdExp = LibFunc_ldexpf; - else if (Op->getType()->isDoubleTy()) -- LdExp = LibFunc::ldexp; -+ LdExp = LibFunc_ldexp; - - if (TLI->has(LdExp)) { - Value *LdExpArg = nullptr; -@@ -1153,17 +1153,17 @@ Value *LibCallSimplifier::optimizeLog(CallInst *CI, IRBuilder<> &B) { - FMF.setUnsafeAlgebra(); - B.setFastMathFlags(FMF); - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && ((TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- Func == LibFunc::pow) || F->getIntrinsicID() == Intrinsic::pow)) -+ Func == LibFunc_pow) || F->getIntrinsicID() == Intrinsic::pow)) - return B.CreateFMul(OpC->getArgOperand(1), - emitUnaryFloatFnCall(OpC->getOperand(0), Callee->getName(), B, - Callee->getAttributes()), "mul"); - - // log(exp2(y)) -> y*log(2) - if (F && Name == "log" && TLI->getLibFunc(F->getName(), Func) && -- TLI->has(Func) && Func == LibFunc::exp2) -+ TLI->has(Func) && Func == LibFunc_exp2) - return B.CreateFMul( - OpC->getArgOperand(0), - emitUnaryFloatFnCall(ConstantFP::get(CI->getType(), 2.0), -@@ -1176,7 +1176,7 @@ Value *LibCallSimplifier::optimizeSqrt(CallInst *CI, IRBuilder<> &B) { - Function *Callee = CI->getCalledFunction(); - - Value *Ret = nullptr; -- if (TLI->has(LibFunc::sqrtf) && (Callee->getName() == "sqrt" || -+ if (TLI->has(LibFunc_sqrtf) && (Callee->getName() == "sqrt" || - Callee->getIntrinsicID() == Intrinsic::sqrt)) - Ret = optimizeUnaryDoubleFP(CI, B, true); - -@@ -1275,12 +1275,12 @@ Value *LibCallSimplifier::optimizeTan(CallInst *CI, IRBuilder<> &B) { - // tan(atan(x)) -> x - // tanf(atanf(x)) -> x - // tanl(atanl(x)) -> x -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- ((Func == LibFunc::atan && Callee->getName() == "tan") || -- (Func == LibFunc::atanf && Callee->getName() == "tanf") || -- (Func == LibFunc::atanl && Callee->getName() == "tanl"))) -+ ((Func == LibFunc_atan && Callee->getName() == "tan") || -+ (Func == LibFunc_atanf && Callee->getName() == "tanf") || -+ (Func == LibFunc_atanl && Callee->getName() == "tanl"))) - Ret = OpC->getArgOperand(0); - return Ret; - } -@@ -1348,24 +1348,24 @@ LibCallSimplifier::classifyArgUse(Value *Val, Function *F, bool IsFloat, - return; - - Function *Callee = CI->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - if (!Callee || !TLI->getLibFunc(*Callee, Func) || !TLI->has(Func) || - !isTrigLibCall(CI)) - return; - - if (IsFloat) { -- if (Func == LibFunc::sinpif) -+ if (Func == LibFunc_sinpif) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospif) -+ else if (Func == LibFunc_cospif) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospif_stret) -+ else if (Func == LibFunc_sincospif_stret) - SinCosCalls.push_back(CI); - } else { -- if (Func == LibFunc::sinpi) -+ if (Func == LibFunc_sinpi) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospi) -+ else if (Func == LibFunc_cospi) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospi_stret) -+ else if (Func == LibFunc_sincospi_stret) - SinCosCalls.push_back(CI); - } - } -@@ -1595,7 +1595,7 @@ Value *LibCallSimplifier::optimizePrintF(CallInst *CI, IRBuilder<> &B) { - - // printf(format, ...) -> iprintf(format, ...) if no floating point - // arguments. -- if (TLI->has(LibFunc::iprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_iprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *IPrintFFn = - M->getOrInsertFunction("iprintf", FT, Callee->getAttributes()); -@@ -1676,7 +1676,7 @@ Value *LibCallSimplifier::optimizeSPrintF(CallInst *CI, IRBuilder<> &B) { - - // sprintf(str, format, ...) -> siprintf(str, format, ...) if no floating - // point arguments. -- if (TLI->has(LibFunc::siprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_siprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *SIPrintFFn = - M->getOrInsertFunction("siprintf", FT, Callee->getAttributes()); -@@ -1746,7 +1746,7 @@ Value *LibCallSimplifier::optimizeFPrintF(CallInst *CI, IRBuilder<> &B) { - - // fprintf(stream, format, ...) -> fiprintf(stream, format, ...) if no - // floating point arguments. -- if (TLI->has(LibFunc::fiprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_fiprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *FIPrintFFn = - M->getOrInsertFunction("fiprintf", FT, Callee->getAttributes()); -@@ -1820,7 +1820,7 @@ Value *LibCallSimplifier::optimizePuts(CallInst *CI, IRBuilder<> &B) { - } - - bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { -- LibFunc::Func Func; -+ LibFunc Func; - SmallString<20> FloatFuncName = FuncName; - FloatFuncName += 'f'; - if (TLI->getLibFunc(FloatFuncName, Func)) -@@ -1830,7 +1830,7 @@ bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { - - Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - IRBuilder<> &Builder) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - // Check for string/memory library functions. - if (TLI->getLibFunc(*Callee, Func) && TLI->has(Func)) { -@@ -1839,51 +1839,51 @@ Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - CI->getCallingConv() == llvm::CallingConv::C) && - "Optimizing string/memory libcall would change the calling convention"); - switch (Func) { -- case LibFunc::strcat: -+ case LibFunc_strcat: - return optimizeStrCat(CI, Builder); -- case LibFunc::strncat: -+ case LibFunc_strncat: - return optimizeStrNCat(CI, Builder); -- case LibFunc::strchr: -+ case LibFunc_strchr: - return optimizeStrChr(CI, Builder); -- case LibFunc::strrchr: -+ case LibFunc_strrchr: - return optimizeStrRChr(CI, Builder); -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return optimizeStrCmp(CI, Builder); -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return optimizeStrNCmp(CI, Builder); -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - return optimizeStrCpy(CI, Builder); -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - return optimizeStpCpy(CI, Builder); -- case LibFunc::strncpy: -+ case LibFunc_strncpy: - return optimizeStrNCpy(CI, Builder); -- case LibFunc::strlen: -+ case LibFunc_strlen: - return optimizeStrLen(CI, Builder); -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return optimizeStrPBrk(CI, Builder); -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return optimizeStrTo(CI, Builder); -- case LibFunc::strspn: -+ case LibFunc_strspn: - return optimizeStrSpn(CI, Builder); -- case LibFunc::strcspn: -+ case LibFunc_strcspn: - return optimizeStrCSpn(CI, Builder); -- case LibFunc::strstr: -+ case LibFunc_strstr: - return optimizeStrStr(CI, Builder); -- case LibFunc::memchr: -+ case LibFunc_memchr: - return optimizeMemChr(CI, Builder); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return optimizeMemCmp(CI, Builder); -- case LibFunc::memcpy: -+ case LibFunc_memcpy: - return optimizeMemCpy(CI, Builder); -- case LibFunc::memmove: -+ case LibFunc_memmove: - return optimizeMemMove(CI, Builder); -- case LibFunc::memset: -+ case LibFunc_memset: - return optimizeMemSet(CI, Builder); - default: - break; -@@ -1896,7 +1896,7 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (CI->isNoBuiltin()) - return nullptr; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - StringRef FuncName = Callee->getName(); - -@@ -1957,110 +1957,110 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (Value *V = optimizeStringMemoryLibCall(CI, Builder)) - return V; - switch (Func) { -- case LibFunc::cosf: -- case LibFunc::cos: -- case LibFunc::cosl: -+ case LibFunc_cosf: -+ case LibFunc_cos: -+ case LibFunc_cosl: - return optimizeCos(CI, Builder); -- case LibFunc::sinpif: -- case LibFunc::sinpi: -- case LibFunc::cospif: -- case LibFunc::cospi: -+ case LibFunc_sinpif: -+ case LibFunc_sinpi: -+ case LibFunc_cospif: -+ case LibFunc_cospi: - return optimizeSinCosPi(CI, Builder); -- case LibFunc::powf: -- case LibFunc::pow: -- case LibFunc::powl: -+ case LibFunc_powf: -+ case LibFunc_pow: -+ case LibFunc_powl: - return optimizePow(CI, Builder); -- case LibFunc::exp2l: -- case LibFunc::exp2: -- case LibFunc::exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: - return optimizeExp2(CI, Builder); -- case LibFunc::fabsf: -- case LibFunc::fabs: -- case LibFunc::fabsl: -+ case LibFunc_fabsf: -+ case LibFunc_fabs: -+ case LibFunc_fabsl: - return optimizeFabs(CI, Builder); -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -- case LibFunc::sqrtl: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtl: - return optimizeSqrt(CI, Builder); -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: - return optimizeFFS(CI, Builder); -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return optimizeAbs(CI, Builder); -- case LibFunc::isdigit: -+ case LibFunc_isdigit: - return optimizeIsDigit(CI, Builder); -- case LibFunc::isascii: -+ case LibFunc_isascii: - return optimizeIsAscii(CI, Builder); -- case LibFunc::toascii: -+ case LibFunc_toascii: - return optimizeToAscii(CI, Builder); -- case LibFunc::printf: -+ case LibFunc_printf: - return optimizePrintF(CI, Builder); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return optimizeSPrintF(CI, Builder); -- case LibFunc::fprintf: -+ case LibFunc_fprintf: - return optimizeFPrintF(CI, Builder); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return optimizeFWrite(CI, Builder); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return optimizeFPuts(CI, Builder); -- case LibFunc::log: -- case LibFunc::log10: -- case LibFunc::log1p: -- case LibFunc::log2: -- case LibFunc::logb: -+ case LibFunc_log: -+ case LibFunc_log10: -+ case LibFunc_log1p: -+ case LibFunc_log2: -+ case LibFunc_logb: - return optimizeLog(CI, Builder); -- case LibFunc::puts: -+ case LibFunc_puts: - return optimizePuts(CI, Builder); -- case LibFunc::tan: -- case LibFunc::tanf: -- case LibFunc::tanl: -+ case LibFunc_tan: -+ case LibFunc_tanf: -+ case LibFunc_tanl: - return optimizeTan(CI, Builder); -- case LibFunc::perror: -+ case LibFunc_perror: - return optimizeErrorReporting(CI, Builder); -- case LibFunc::vfprintf: -- case LibFunc::fiprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_fiprintf: - return optimizeErrorReporting(CI, Builder, 0); -- case LibFunc::fputc: -+ case LibFunc_fputc: - return optimizeErrorReporting(CI, Builder, 1); -- case LibFunc::ceil: -- case LibFunc::floor: -- case LibFunc::rint: -- case LibFunc::round: -- case LibFunc::nearbyint: -- case LibFunc::trunc: -+ case LibFunc_ceil: -+ case LibFunc_floor: -+ case LibFunc_rint: -+ case LibFunc_round: -+ case LibFunc_nearbyint: -+ case LibFunc_trunc: - if (hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, false); - return nullptr; -- case LibFunc::acos: -- case LibFunc::acosh: -- case LibFunc::asin: -- case LibFunc::asinh: -- case LibFunc::atan: -- case LibFunc::atanh: -- case LibFunc::cbrt: -- case LibFunc::cosh: -- case LibFunc::exp: -- case LibFunc::exp10: -- case LibFunc::expm1: -- case LibFunc::sin: -- case LibFunc::sinh: -- case LibFunc::tanh: -+ case LibFunc_acos: -+ case LibFunc_acosh: -+ case LibFunc_asin: -+ case LibFunc_asinh: -+ case LibFunc_atan: -+ case LibFunc_atanh: -+ case LibFunc_cbrt: -+ case LibFunc_cosh: -+ case LibFunc_exp: -+ case LibFunc_exp10: -+ case LibFunc_expm1: -+ case LibFunc_sin: -+ case LibFunc_sinh: -+ case LibFunc_tanh: - if (UnsafeFPShrink && hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, true); - return nullptr; -- case LibFunc::copysign: -+ case LibFunc_copysign: - if (hasFloatVersion(FuncName)) - return optimizeBinaryDoubleFP(CI, Builder); - return nullptr; -- case LibFunc::fminf: -- case LibFunc::fmin: -- case LibFunc::fminl: -- case LibFunc::fmaxf: -- case LibFunc::fmax: -- case LibFunc::fmaxl: -+ case LibFunc_fminf: -+ case LibFunc_fmin: -+ case LibFunc_fminl: -+ case LibFunc_fmaxf: -+ case LibFunc_fmax: -+ case LibFunc_fmaxl: - return optimizeFMinFMax(CI, Builder); - default: - return nullptr; -@@ -2184,7 +2184,7 @@ Value *FortifiedLibCallSimplifier::optimizeMemSetChk(CallInst *CI, - - Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - const DataLayout &DL = CI->getModule()->getDataLayout(); -@@ -2192,7 +2192,7 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - *ObjSize = CI->getArgOperand(2); - - // __stpcpy_chk(x,x,...) -> x+strlen(x) -- if (Func == LibFunc::stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { -+ if (Func == LibFunc_stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { - Value *StrLen = emitStrLen(Src, B, DL, TLI); - return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr; - } -@@ -2218,14 +2218,14 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - Value *Ret = emitMemCpyChk(Dst, Src, LenV, ObjSize, B, DL, TLI); - // If the function was an __stpcpy_chk, and we were able to fold it into - // a __memcpy_chk, we still need to return the correct end pointer. -- if (Ret && Func == LibFunc::stpcpy_chk) -+ if (Ret && Func == LibFunc_stpcpy_chk) - return B.CreateGEP(B.getInt8Ty(), Dst, ConstantInt::get(SizeTTy, Len - 1)); - return Ret; - } - - Value *FortifiedLibCallSimplifier::optimizeStrpNCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - if (isFortifiedCallFoldable(CI, 3, 2, false)) { -@@ -2250,7 +2250,7 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - // - // PR23093. - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - - SmallVector OpBundles; -@@ -2268,17 +2268,17 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - return nullptr; - - switch (Func) { -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - return optimizeMemCpyChk(CI, Builder); -- case LibFunc::memmove_chk: -+ case LibFunc_memmove_chk: - return optimizeMemMoveChk(CI, Builder); -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - return optimizeMemSetChk(CI, Builder); -- case LibFunc::stpcpy_chk: -- case LibFunc::strcpy_chk: -+ case LibFunc_stpcpy_chk: -+ case LibFunc_strcpy_chk: - return optimizeStrpCpyChk(CI, Builder, Func); -- case LibFunc::stpncpy_chk: -- case LibFunc::strncpy_chk: -+ case LibFunc_stpncpy_chk: -+ case LibFunc_strncpy_chk: - return optimizeStrpNCpyChk(CI, Builder, Func); - default: - break; diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_musl.patch new file mode 120000 index 00000000000..435ae951cdc --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/libtapi_musl.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_musl.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/mingw_gcc710_i686.patch deleted file mode 100644 index 954f6ce3d60..00000000000 --- a/0_RootFS/GCCBootstrap@6/bundled/patches/mingw_gcc710_i686.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 431ac2a912708546cd7271332e9331399e66bc62 Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Wed, 3 May 2017 15:52:32 +0800 -Subject: [PATCH] winpthreads/src/dll_math.c: Implement `__divmoddi4()' for GCC - 7. - -GCC targeting i686 _may_ generate an external call to the function in -question when divding a 64-bit (DIMode) integer with another one. -Since we are linking against a fake libgcc, we have to implement it too. - -Signed-off-by: Liu Hao ---- - .../winpthreads/src/libgcc/dll_math.c | 27 ++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -index e09b481..aeec068 100644 ---- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -@@ -120,6 +120,7 @@ u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); - u_quad_t __udivdi3(u_quad_t a, u_quad_t b); - u_quad_t __umoddi3(u_quad_t a, u_quad_t b); - int __ucmpdi2(u_quad_t a, u_quad_t b); -+quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); - - #endif /* !_LIBKERN_QUAD_H_ */ - -@@ -546,6 +547,32 @@ __umoddi3(a, b) - (void)__qdivrem(a, b, &r); - return (r); - } -+ -+/* -+ * Divide two signed quads. -+ * This function is new in GCC 7. -+ */ -+quad_t -+__divmoddi4(a, b, rem) -+ quad_t a, b, *rem; -+{ -+ u_quad_t ua, ub, uq, ur; -+ int negq, negr; -+ -+ if (a < 0) -+ ua = -(u_quad_t)a, negq = 1, negr = 1; -+ else -+ ua = a, negq = 0, negr = 0; -+ if (b < 0) -+ ub = -(u_quad_t)b, negq ^= 1; -+ else -+ ub = b; -+ uq = __qdivrem(ua, ub, &ur); -+ if (rem) -+ *rem = (negr ? -ur : ur); -+ return (negq ? -uq : uq); -+} -+ - #else - static int __attribute__((unused)) dummy; - #endif /*deined (_X86_) && !defined (__x86_64__)*/ --- -2.7.4 - diff --git a/0_RootFS/GCCBootstrap@6/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@6/bundled/patches/mingw_gcc710_i686.patch new file mode 120000 index 00000000000..94de400d805 --- /dev/null +++ b/0_RootFS/GCCBootstrap@6/bundled/patches/mingw_gcc710_i686.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/mingw_gcc710_i686.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/binutils_freebsd_symbol_versioning.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/binutils_freebsd_symbol_versioning.patch deleted file mode 100644 index 02a73504795..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/binutils_freebsd_symbol_versioning.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc -index 444aef2942..8a3858d32b 100644 ---- a/ld/scripttempl/elf.sc -+++ b/ld/scripttempl/elf.sc -@@ -637,9 +637,9 @@ cat < -Date: Mon Sep 17 10:15:44 2018 +0000 - - GCC 4.8.X is too old to understand the `configure` argument `--with-native-system-header-dir=` - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index b09a763d525..afe7ec1579d 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1504,7 +1504,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) - tmake_file="${tmake_file} i386/t-mingw-w32" - ;; - esac -- native_system_header_dir=/mingw/include -+ native_system_header_dir=/include - target_gtfiles="\$(srcdir)/config/i386/winnt.c" - extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" - case ${target} in -diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h -index 1ac55441725..74641126007 100644 ---- a/gcc/config/i386/mingw32.h -+++ b/gcc/config/i386/mingw32.h -@@ -152,7 +152,7 @@ along with GCC; see the file COPYING3. If not see - - /* Override startfile prefix defaults. */ - #ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/mingw/lib/" -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" - #endif - #ifndef STANDARD_STARTFILE_PREFIX_2 - #define STANDARD_STARTFILE_PREFIX_2 "" -@@ -161,7 +161,7 @@ along with GCC; see the file COPYING3. If not see - /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR - macro contains POSIX-style path. See bug 52947. */ - #undef NATIVE_SYSTEM_HEADER_DIR --#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" -+#define NATIVE_SYSTEM_HEADER_DIR "/include" - - /* Output STRING, a string representing a filename, to FILE. - We canonicalize it to be in Unix format (backslashes are replaced diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/gcc485_mingw_include.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/gcc485_mingw_include.patch new file mode 120000 index 00000000000..a2b50298a2a --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/gcc485_mingw_include.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_mingw_include.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-01.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-01.patch new file mode 120000 index 00000000000..c750d5a8835 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-01.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-01.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-02.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-02.patch new file mode 120000 index 00000000000..c2f8ca9cddb --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-02.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-02.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-03.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-03.patch new file mode 120000 index 00000000000..7f9b18ab810 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-03.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-03.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-04.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-04.patch new file mode 120000 index 00000000000..82f535d0ef6 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-04.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-04.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-05.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-05.patch new file mode 120000 index 00000000000..629c1a71ca7 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-05.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-05.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-06.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-06.patch new file mode 120000 index 00000000000..4682d7d2638 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-06.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-06.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-07.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-07.patch new file mode 120000 index 00000000000..ec0ff4fc245 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-07.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-07.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-08.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-08.patch new file mode 120000 index 00000000000..dd3d8002d07 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-08.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-08.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-09.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-09.patch new file mode 120000 index 00000000000..6160e1ff6c9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-09.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-09.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-10.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-10.patch new file mode 120000 index 00000000000..3b0eb446435 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-10.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-10.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-11.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-11.patch new file mode 120000 index 00000000000..1a8b2b1874a --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-11.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-11.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-12.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-12.patch new file mode 120000 index 00000000000..5c61ae4d308 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-12.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-12.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-13.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-13.patch new file mode 120000 index 00000000000..9fcd14da248 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-13.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-13.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-14.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-14.patch new file mode 120000 index 00000000000..2c105860a79 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-14.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-14.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-15.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-15.patch new file mode 120000 index 00000000000..553e804d24c --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-15.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-15.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-16.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-16.patch new file mode 120000 index 00000000000..45b396e6e16 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-16.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-16.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-17.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-17.patch new file mode 120000 index 00000000000..381198312d8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-17.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-17.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-18.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-18.patch new file mode 120000 index 00000000000..75da139edca --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-18.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-18.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-19.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-19.patch new file mode 120000 index 00000000000..15b94428f84 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-19.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-19.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-20.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-20.patch new file mode 120000 index 00000000000..363da6ff21d --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-20.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-20.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-21.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-21.patch new file mode 120000 index 00000000000..d0b5d34df23 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-21.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-21.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-22.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-22.patch new file mode 120000 index 00000000000..e33401a61ec --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-22.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-22.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-23.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-23.patch new file mode 120000 index 00000000000..e17c24162a4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-23.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-23.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-24.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-24.patch new file mode 120000 index 00000000000..dabf39e7b9c --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-24.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-24.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-25.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-25.patch new file mode 120000 index 00000000000..a1013682f68 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-25.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-25.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-26.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-26.patch new file mode 120000 index 00000000000..9d6541b9b82 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-26.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-26.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-27.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-27.patch new file mode 120000 index 00000000000..b4b0172a637 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-27.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-27.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-28.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-28.patch new file mode 120000 index 00000000000..422f6eab38f --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-28.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-28.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-29.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-29.patch new file mode 120000 index 00000000000..29c53da8ea3 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-29.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-29.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-30.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-30.patch new file mode 120000 index 00000000000..6d532a56d8d --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-30.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-30.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-31.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-31.patch new file mode 120000 index 00000000000..9b06be66e43 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-31.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-31.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-32.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-32.patch new file mode 120000 index 00000000000..ed3e7f02517 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-32.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-32.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-33.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-33.patch new file mode 120000 index 00000000000..468c085f789 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-33.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-33.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-34.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-34.patch new file mode 120000 index 00000000000..58778f0e720 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-34.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-34.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-35.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-35.patch new file mode 120000 index 00000000000..07ea002e01f --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-35.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-35.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-36.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-36.patch new file mode 120000 index 00000000000..3bc5b0034c8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-36.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-36.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-37.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-37.patch new file mode 120000 index 00000000000..84f35423e52 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-37.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-37.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-38.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-38.patch new file mode 120000 index 00000000000..dc2041a6dfe --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-38.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-38.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-39.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-39.patch new file mode 120000 index 00000000000..edcdb4e0660 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-39.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-39.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-40.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-40.patch new file mode 120000 index 00000000000..d6664bac3ae --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-40.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-40.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-41.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-41.patch new file mode 120000 index 00000000000..024e01a1d93 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-41.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-41.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-42.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-42.patch new file mode 120000 index 00000000000..cc626e8bd3e --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-42.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-42.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-43.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-43.patch new file mode 120000 index 00000000000..78508bdced4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-43.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-43.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-44.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-44.patch new file mode 120000 index 00000000000..abc87cc7705 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-44.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-44.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-45.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-45.patch new file mode 120000 index 00000000000..546a75ecf8b --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-45.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-45.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-46.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-46.patch new file mode 120000 index 00000000000..651cb9e3cca --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-46.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-46.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch new file mode 120000 index 00000000000..8c086355317 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-48-ldbl_high.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-48-ldbl_high.patch new file mode 120000 index 00000000000..d6f0ec0b0f2 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc-ppc64le-48-ldbl_high.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-48-ldbl_high.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_aarch64_relocation.patch deleted file mode 100644 index bb9ce8d4e06..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_aarch64_relocation.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c -index d8cdb7e24b..5e6e70a5bf 100644 ---- a/elf/dl-sysdep.c -+++ b/elf/dl-sysdep.c -@@ -108,7 +108,7 @@ _dl_sysdep_start (void **start_argptr, - #endif - - __libc_stack_end = DL_STACK_END (start_argptr); -- DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, INTUSE(_dl_argv), _environ, -+ DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, _dl_argv, _environ, - GLRO(dl_auxv)); - - user_entry = (ElfW(Addr)) ENTRY_POINT; -diff --git a/elf/rtld.c b/elf/rtld.c -index 6dcbabc284..03209d695a 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -83,7 +83,7 @@ int _dl_argc attribute_relro attribute_hidden; - char **_dl_argv attribute_relro = NULL; - unsigned int _dl_skip_args attribute_relro attribute_hidden; - #endif --INTDEF(_dl_argv) -+rtld_hidden_data_def (_dl_argv) - - #ifndef THREAD_SET_STACK_GUARD - /* Only exported for architectures that don't store the stack guard canary -@@ -634,7 +634,7 @@ dlmopen_doit (void *a) - args->map = _dl_open (args->fname, - (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT - | __RTLD_SECURE), -- dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv), -+ dl_main, LM_ID_NEWLM, _dl_argc, _dl_argv, - __environ); - } - -@@ -952,55 +952,55 @@ dl_main (const ElfW(Phdr) *phdr, - GL(dl_rtld_map).l_name = rtld_progname; - - while (_dl_argc > 1) -- if (! strcmp (INTUSE(_dl_argv)[1], "--list")) -+ if (! strcmp (_dl_argv[1], "--list")) - { - mode = list; - GLRO(dl_lazy) = -1; /* This means do no dependency analysis. */ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--verify")) -+ else if (! strcmp (_dl_argv[1], "--verify")) - { - mode = verify; - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-cache")) -+ else if (! strcmp (_dl_argv[1], "--inhibit-cache")) - { - GLRO(dl_inhibit_cache) = 1; - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--library-path") -+ else if (! strcmp (_dl_argv[1], "--library-path") - && _dl_argc > 2) - { -- library_path = INTUSE(_dl_argv)[2]; -+ library_path = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-rpath") -+ else if (! strcmp (_dl_argv[1], "--inhibit-rpath") - && _dl_argc > 2) - { -- GLRO(dl_inhibit_rpath) = INTUSE(_dl_argv)[2]; -+ GLRO(dl_inhibit_rpath) = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--audit") && _dl_argc > 2) -+ else if (! strcmp (_dl_argv[1], "--audit") && _dl_argc > 2) - { -- process_dl_audit (INTUSE(_dl_argv)[2]); -+ process_dl_audit (_dl_argv[2]); - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } - else - break; -@@ -1034,7 +1034,7 @@ of this helper program; chances are you did not intend to run this program.\n\ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - - /* The initialization of _dl_stack_flags done below assumes the - executable's PT_GNU_STACK may have been honored by the kernel, and -@@ -1929,7 +1929,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - ElfW(Addr) loadbase; - lookup_t result; - -- result = _dl_lookup_symbol_x (INTUSE(_dl_argv)[i], main_map, -+ result = _dl_lookup_symbol_x (_dl_argv[i], main_map, - &ref, main_map->l_scope, - NULL, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); -@@ -1937,7 +1937,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - loadbase = LOOKUP_VALUE_ADDRESS (result); - - _dl_printf ("%s found at 0x%0*Zd in object at 0x%0*Zd\n", -- INTUSE(_dl_argv)[i], -+ _dl_argv[i], - (int) sizeof ref->st_value * 2, - (size_t) ref->st_value, - (int) sizeof loadbase * 2, (size_t) loadbase); -diff --git a/ports/sysdeps/aarch64/dl-machine.h b/ports/sysdeps/aarch64/dl-machine.h -index 997c860ccb..09fb09c164 100644 ---- a/ports/sysdeps/aarch64/dl-machine.h -+++ b/ports/sysdeps/aarch64/dl-machine.h -@@ -49,23 +49,10 @@ elf_machine_load_address (void) - /* To figure out the load address we use the definition that for any symbol: - dynamic_addr(symbol) = static_addr(symbol) + load_addr - -- The choice of symbol is arbitrary. The static address we obtain -- by constructing a non GOT reference to the symbol, the dynamic -- address of the symbol we compute using adrp/add to compute the -- symbol's address relative to the PC. */ -- -- ElfW(Addr) static_addr; -- ElfW(Addr) dynamic_addr; -- -- asm (" \n\ -- adrp %1, _dl_start; \n\ -- add %1, %1, #:lo12:_dl_start \n\ -- ldr %w0, 1f \n\ -- b 2f \n\ --1: .word _dl_start \n\ --2: \n\ -- " : "=r" (static_addr), "=r" (dynamic_addr)); -- return dynamic_addr - static_addr; -+ _DYNAMIC sysmbol is used here as its link-time address stored in -+ the special unrelocated first GOT entry. */ -+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; -+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic (); - } - - /* Set up the loaded object described by L so its unrelocated PLT -@@ -169,8 +156,8 @@ _dl_start_user: \n\ - cmp x0, #0 \n\ - bne 1b \n\ - // Update _dl_argv \n\ -- adrp x3, _dl_argv \n\ -- str x2, [x3, #:lo12:_dl_argv] \n\ -+ adrp x3, __GI__dl_argv \n\ -+ str x2, [x3, #:lo12:__GI__dl_argv] \n\ - .L_done_stack_adjust: \n\ - // compute envp \n\ - add x3, x2, x1, lsl #3 \n\ -diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index ffeb093887..051bb4d954 100644 ---- a/sysdeps/generic/ldsodefs.h -+++ b/sysdeps/generic/ldsodefs.h -@@ -649,6 +649,7 @@ extern char **_dl_argv - attribute_relro - #endif - ; -+rtld_hidden_proto (_dl_argv) - #ifdef IS_IN_rtld - extern unsigned int _dl_skip_args attribute_hidden - # ifndef DL_ARGV_NOT_RELRO -@@ -660,15 +661,8 @@ extern unsigned int _dl_skip_args_internal attribute_hidden - attribute_relro - # endif - ; --extern char **_dl_argv_internal attribute_hidden --# ifndef DL_ARGV_NOT_RELRO -- attribute_relro --# endif -- ; --# define rtld_progname (INTUSE(_dl_argv)[0]) --#else --# define rtld_progname _dl_argv[0] - #endif -+# define rtld_progname _dl_argv[0] - - /* Flag set at startup and cleared when the last initializer has run. */ - extern int _dl_starting_up; diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_aarch64_relocation.patch new file mode 120000 index 00000000000..23af0beaecb --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_aarch64_relocation.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_aarch64_relocation.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_arm_gcc_fix.patch deleted file mode 100644 index 4ab50ebcb5e..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_arm_gcc_fix.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/nptl/sysdeps/pthread/unwind-forcedunwind.c -+++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/sysdeps/gnu/unwind-resume.c -+++ b/sysdeps/gnu/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - --- -1.9.4 - diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_arm_gcc_fix.patch new file mode 120000 index 00000000000..13167359553 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_arm_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_arm_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_gcc_version.patch deleted file mode 100644 index 4d894fa9bb4..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_gcc_version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old 2017-07-27 20:01:59.997750069 +0000 -+++ configure 2017-07-27 20:02:54.029053809 +0000 -@@ -5189,7 +5189,7 @@ - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | 4.[0-9]* | 5.[0-9]* | 6.[0-9]* | 7.[0-9]* | 8.[0-9]* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_gcc_version.patch new file mode 120000 index 00000000000..473f7a525d9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_gcc_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_gcc_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_i686_asm.patch deleted file mode 100644 index e2f8c86ec9d..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_i686_asm.patch +++ /dev/null @@ -1,49 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-04-18 -Initial Package Version: 2.11.1 -Upstream Status: Not Submitted -Origin: http://www.eglibc.org/archives/patches/msg00073.html -Description: Fixes the following build problem with GCC-4.5.0: - -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os -./sysdeps/i386/fpu/s_frexp.S: Assembler messages: -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 - -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_i686_asm.patch new file mode 120000 index 00000000000..35f065f0d0d --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_i686_asm.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_i686_asm.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_make_version.patch deleted file mode 100644 index 1c2edd11111..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_make_version.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 30f1989e789515790343811e1d333a903ffb84a0 -Author: Elliot Saba -Date: Tue Sep 18 08:50:46 2018 +0000 - - Include `make` v4.X as valid in configure version check - -diff --git a/configure b/configure -index 8799b7de78..b8bf4e07f6 100755 ---- a/configure -+++ b/configure -@@ -4972,7 +4972,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | 4*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index d369382264..0417133a5c 100644 ---- a/configure.in -+++ b/configure.in -@@ -935,7 +935,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | 4*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_make_version.patch new file mode 120000 index 00000000000..1c6b268bfab --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_make_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_make_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection.patch deleted file mode 100644 index 49668244d52..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection.patch +++ /dev/null @@ -1,176 +0,0 @@ -commit ee14fe4c606fa577ae4375985b75ec0cb8e79fec -Author: Keno Fischer -Date: Fri Jun 22 18:03:46 2018 -0400 - - dl-load: Reject musl-linked libraries - - This prevents the glibc dynamic linker from considering shared - libraries linked against musl (similar to how it would reject - libraries for other architectures). - - See https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/297 - -diff --git a/elf/dl-load.c b/elf/dl-load.c -index 7554a99..fe9e483 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -46,6 +46,7 @@ - #include - #include - -+#include - - #include - #if BYTE_ORDER == BIG_ENDIAN -@@ -1382,6 +1383,60 @@ print_search_path (struct r_search_path_elem **list, - else - _dl_debug_printf_c ("\t\t(%s)\n", what); - } -+ -+struct known_names -+{ -+ const char *soname; -+ int flag; -+}; -+ -+static struct known_names known_libs[] = -+{ -+#ifdef SYSDEP_KNOWN_LIBRARY_NAMES -+ SYSDEP_KNOWN_LIBRARY_NAMES -+#endif -+}; -+ -+static int validate_lib(int fd, unsigned int dynamic_addr, unsigned int dynamic_size) -+{ -+ ElfW(Dyn) *dyn_entry; -+ ElfW(Dyn) *dynamic_segment = alloca(dynamic_size); -+ char fname[255]; -+ __lseek (fd, dynamic_addr, SEEK_SET); -+ if ((size_t) __libc_read (fd, (void *) dynamic_segment, dynamic_size) != dynamic_size) -+ { -+ return -2; -+ } -+ // Find the string table -+ unsigned int string_offset = 0; -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_STRTAB) { -+ string_offset = dyn_entry->d_un.d_val; -+ } -+ if (string_offset != 0) { -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_NEEDED) { -+ __lseek (fd, string_offset + dyn_entry->d_un.d_val, SEEK_SET); -+ ssize_t nchars = __libc_read (fd, (void *)fname, 254); -+ if (nchars == -1) -+ return -2; -+ fname[nchars] = 0; -+ for (int j = 0; j < sizeof (known_libs) / sizeof (known_libs [0]); ++j) { -+ if (strcmp (fname, known_libs [j].soname) == 0) -+ { -+ if (known_libs [j].flag == FLAG_ELF_MUSL) -+ return 1; -+ } -+ } -+ } -+ } -+ } -+ } -+ return 0; -+} -+ - - /* Open a file and verify it is an ELF file for this architecture. We - ignore only ELF files for other architectures. Non-ELF files and -@@ -1427,6 +1482,8 @@ open_verify (const char *name, int fd, - } expected_note = { 4, 16, 1, "GNU" }; - /* Initialize it to make the compiler happy. */ - const char *errstring = NULL; -+ unsigned int dynamic_addr = 0; -+ unsigned int dynamic_size = 0; - int errval = 0; - - #ifdef SHARED -@@ -1618,8 +1675,15 @@ open_verify (const char *name, int fd, - loader, fd))) - goto close_and_out; - -+ dynamic_addr = 0; -+ dynamic_size = 0; - /* Check .note.ABI-tag if present. */ -- for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) -+ for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) { -+ if (ph->p_type == PT_DYNAMIC) -+ { -+ dynamic_addr = ph->p_offset; -+ dynamic_size = ph->p_filesz; -+ } - if (ph->p_type == PT_NOTE && ph->p_filesz >= 32 && ph->p_align >= 4) - { - ElfW(Addr) size = ph->p_filesz; -@@ -1678,6 +1742,20 @@ open_verify (const char *name, int fd, - - break; - } -+ } -+ /* Check the dynamic section */ -+ if (dynamic_addr != 0) { -+ int err = validate_lib(fd, dynamic_addr, dynamic_size); -+ if (err == -2) { -+ errstring = N_("failed to read file"); -+ goto call_lose; -+ } -+ else if (err != 0) { -+ __close (fd); -+ __set_errno (ENOENT); -+ fd = -1; -+ } -+ } - } - - return fd; -diff --git a/elf/ldconfig.c b/elf/ldconfig.c -index fbdd814..53a1f87 100644 ---- a/elf/ldconfig.c -+++ b/elf/ldconfig.c -@@ -875,6 +875,16 @@ search_dir (const struct dir_entry *entry) - add_to_aux_cache (&lstat_buf, flag, osversion, soname); - } - -+ /* Don't try to load MUSL-dependent libraries */ -+ if ((flag & FLAG_TYPE_MASK) == FLAG_ELF_MUSL) -+ { -+ if (real_name != real_file_name) -+ free (real_name); -+ if (opt_verbose) -+ error (0, 0, _("Skipping musl-linked library %s"), file_name); -+ continue; -+ } -+ - if (soname == NULL) - soname = implicit_soname (direntry->d_name, flag); - -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index 59e20dc..13c4215 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -27,6 +27,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 -diff --git a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -index c7e9ad6..abd724e 100644 ---- a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -+++ b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -@@ -23,4 +23,5 @@ - { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, - #define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ -- { "libm.so.6", FLAG_ELF_LIBC6 }, -+ { "libm.so.6", FLAG_ELF_LIBC6 }, \ -+ { "libc.musl-x86_64.so.1", FLAG_ELF_MUSL } diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection.patch new file mode 120000 index 00000000000..81a4040c7fd --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection_old.patch deleted file mode 100644 index a400df39623..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection_old.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index fadd5ec370..cb6b6d53b7 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -26,6 +26,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection_old.patch new file mode 120000 index 00000000000..31d164c349c --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_musl_rejection_old.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection_old.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_nocommon.patch deleted file mode 100644 index 6fbd074443f..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_nocommon.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./malloc/obstack.c.old 2017-10-27 17:08:52.000000000 -0400 -+++ ./malloc/obstack.c 2017-10-27 17:09:54.000000000 -0400 -@@ -117,7 +117,7 @@ - /* A looong time ago (before 1994, anyway; we're not sure) this global variable - was used by non-GNU-C macros to avoid multiple evaluation. The GNU C - library still exports it because somebody might use it. */ --struct obstack *_obstack_compat; -+struct obstack *_obstack_compat __attribute__((nocommon)); - compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); - # endif - # endif diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_nocommon.patch new file mode 120000 index 00000000000..5b375100acb --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_powerpc64le_gcc_fix.patch deleted file mode 100644 index 8bc77f56d70..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_powerpc64le_gcc_fix.patch +++ /dev/null @@ -1,198 +0,0 @@ -From db8fed87d9741b6b3da6c2257f01d63ef2fe407c Mon Sep 17 00:00:00 2001 -From: Martin Sebor -Date: Mon, 1 Jun 2015 14:12:09 -0300 -Subject: [PATCH] powerpc: setcontext.S uses power6 mtfsf when not supported - [BZ #18116] - -The attached patch fixes a glibc build failure with gcc 5 on powerpc64le -caused by a recent change in gcc where the compiler defines the -_ARCH_PWR6 macro when processing assembly files but doesn't invoke the -assembler in the corresponding machine mode (unless it has been -explicitly configured to target POWER 6 or later). A bug had been filed -with gcc for this (65341) but was closed as won't fix. Glibc relies on -the _ARCH_PWR6 macro in a few .S files to make use of Power ISA 2.5 -instructions (specifically, the four-argument form of the mtfsf insn). -A similar problem had occurred in the past (bug 10118) but the fix that -was committed for it didn't anticipate this new problem. ---- - ChangeLog | 9 ++++++ - .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 30 ++++++++++++++---- - .../sysv/linux/powerpc/powerpc64/swapcontext.S | 36 +++++++++++++++++----- - 3 files changed, 61 insertions(+), 14 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 6d295e7..239a0e6 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,12 @@ -+2015-03-11 Martin Sebor -+ -+ [BZ #18116] -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+ (__setcontext): Use extended four-operand version of mtsf whenever -+ possible. -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+ (__novec_swapcontext): Likewise. -+ - 2015-06-01 Siddhesh Poyarekar - - * benchtests/scripts/compare_bench.py: New file. -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -index e47a57a..8a08dc4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -@@ -81,22 +81,31 @@ ENTRY(__novec_setcontext) - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 5f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -364,22 +373,31 @@ L(has_no_vec): - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 7f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -index bc02a21..2421ca4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -@@ -173,24 +173,34 @@ ENTRY(__novec_swapcontext) - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 5f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -652,24 +662,34 @@ L(has_no_vec2): - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 7f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) --- -2.9.3 - diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_powerpc64le_gcc_fix.patch new file mode 120000 index 00000000000..206ed74aa45 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_powerpc64le_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_powerpc64le_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_regexp_nocommon.patch deleted file mode 100644 index 98bd10251e3..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_regexp_nocommon.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- misc/regexp.c.old 2017-10-28 12:54:11.000000000 -0400 -+++ misc/regexp.c 2017-10-28 12:54:37.000000000 -0400 -@@ -30,13 +30,13 @@ - #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) - - /* Define the variables used for the interface. */ --char *loc1; --char *loc2; -+char *loc1 __attribute__((nocommon)); -+char *loc2 __attribute__((nocommon)); - compat_symbol (libc, loc1, loc1, GLIBC_2_0); - compat_symbol (libc, loc2, loc2, GLIBC_2_0); - - /* Although we do not support the use we define this variable as well. */ --char *locs; -+char *locs __attribute__((nocommon)); - compat_symbol (libc, locs, locs, GLIBC_2_0); - - diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_regexp_nocommon.patch new file mode 120000 index 00000000000..1a10ef2694b --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_regexp_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_regexp_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_sunrpc.patch deleted file mode 100644 index d7fdf48316d..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_sunrpc.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- sunrpc/rpc/types.h.old -+++ sunrpc/rpc/types.h -@@ -69,7 +69,7 @@ - #include - #endif - --#ifndef __u_char_defined -+#if 0 - typedef __u_char u_char; - typedef __u_short u_short; - typedef __u_int u_int; -@@ -79,7 +79,7 @@ - typedef __fsid_t fsid_t; - # define __u_char_defined - #endif --#ifndef __daddr_t_defined -+#if 0 - typedef __daddr_t daddr_t; - typedef __caddr_t caddr_t; - # define __daddr_t_defined diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_sunrpc.patch new file mode 120000 index 00000000000..9359558d4e0 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/glibc_sunrpc.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_sunrpc.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_fullyaml.patch deleted file mode 100644 index fc8b4e8e120..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_fullyaml.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -index ca62890e..6038c13b 100644 ---- a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -+++ b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -@@ -26,7 +26,7 @@ void RefactoringOptionSet::print(llvm::raw_ostream &OS) const { - } - } - --template <> struct CustomMappingTraits { -+template <> struct llvm::yaml::CustomMappingTraits { - static void inputOne(IO &YamlIn, StringRef Key, - RefactoringOptionSet &Result) { - #define HANDLE(Type) \ diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_fullyaml.patch new file mode 120000 index 00000000000..8c24845b566 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_fullyaml.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_fullyaml.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_musl.patch deleted file mode 100644 index d0b09c58c31..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_musl.patch +++ /dev/null @@ -1,3851 +0,0 @@ -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -index 7798e3c8..dc890373 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -@@ -20,7 +20,7 @@ - // One of TLI_DEFINE_ENUM/STRING are defined. - - #if defined(TLI_DEFINE_ENUM) --#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) enum_variant, -+#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) LibFunc_##enum_variant, - #define TLI_DEFINE_STRING_INTERNAL(string_repr) - #else - #define TLI_DEFINE_ENUM_INTERNAL(enum_variant) -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -index 2cba44bc..25ae5449 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -@@ -29,14 +29,12 @@ struct VecDesc { - }; - class PreservedAnalyses; - -- namespace LibFunc { -- enum Func { -+ enum LibFunc { - #define TLI_DEFINE_ENUM - #include "llvm/Analysis/TargetLibraryInfo.def" - - NumLibFuncs - }; -- } - - /// \brief Implementation of the target library information. - /// -@@ -47,20 +45,20 @@ class PreservedAnalyses; - class TargetLibraryInfoImpl { - friend class TargetLibraryInfo; - -- unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4]; -+ unsigned char AvailableArray[(NumLibFuncs+3)/4]; - llvm::DenseMap CustomNames; -- static const char *const StandardNames[LibFunc::NumLibFuncs]; -+ static const char *const StandardNames[NumLibFuncs]; - - enum AvailabilityState { - StandardName = 3, // (memset to all ones) - CustomName = 1, - Unavailable = 0 // (memset to all zeros) - }; -- void setState(LibFunc::Func F, AvailabilityState State) { -+ void setState(LibFunc F, AvailabilityState State) { - AvailableArray[F/4] &= ~(3 << 2*(F&3)); - AvailableArray[F/4] |= State << 2*(F&3); - } -- AvailabilityState getState(LibFunc::Func F) const { -+ AvailabilityState getState(LibFunc F) const { - return static_cast((AvailableArray[F/4] >> 2*(F&3)) & 3); - } - -@@ -72,7 +70,7 @@ class TargetLibraryInfoImpl { - - /// Return true if the function type FTy is valid for the library function - /// F, regardless of whether the function is available. -- bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc::Func F, -+ bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc F, - const DataLayout *DL) const; - - public: -@@ -101,28 +99,28 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const; -+ bool getLibFunc(StringRef funcName, LibFunc &F) const; - - /// Searches for a particular function name, also checking that its type is - /// valid for the library function matching that name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const; -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const; - - /// \brief Forces a function to be marked as unavailable. -- void setUnavailable(LibFunc::Func F) { -+ void setUnavailable(LibFunc F) { - setState(F, Unavailable); - } - - /// \brief Forces a function to be marked as available. -- void setAvailable(LibFunc::Func F) { -+ void setAvailable(LibFunc F) { - setState(F, StandardName); - } - - /// \brief Forces a function to be marked as available and provide an - /// alternate name that must be used. -- void setAvailableWithName(LibFunc::Func F, StringRef Name) { -+ void setAvailableWithName(LibFunc F, StringRef Name) { - if (StandardNames[F] != Name) { - setState(F, CustomName); - CustomNames[F] = Name; -@@ -203,16 +201,16 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const { -+ bool getLibFunc(StringRef funcName, LibFunc &F) const { - return Impl->getLibFunc(funcName, F); - } - -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const { -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const { - return Impl->getLibFunc(FDecl, F); - } - - /// \brief Tests whether a library function is available. -- bool has(LibFunc::Func F) const { -+ bool has(LibFunc F) const { - return Impl->getState(F) != TargetLibraryInfoImpl::Unavailable; - } - bool isFunctionVectorizable(StringRef F, unsigned VF) const { -@@ -227,37 +225,37 @@ public: - - /// \brief Tests if the function is both available and a candidate for - /// optimized code generation. -- bool hasOptimizedCodeGen(LibFunc::Func F) const { -+ bool hasOptimizedCodeGen(LibFunc F) const { - if (Impl->getState(F) == TargetLibraryInfoImpl::Unavailable) - return false; - switch (F) { - default: break; -- case LibFunc::copysign: case LibFunc::copysignf: case LibFunc::copysignl: -- case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: -- case LibFunc::sin: case LibFunc::sinf: case LibFunc::sinl: -- case LibFunc::cos: case LibFunc::cosf: case LibFunc::cosl: -- case LibFunc::sqrt: case LibFunc::sqrtf: case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -- case LibFunc::fmax: case LibFunc::fmaxf: case LibFunc::fmaxl: -- case LibFunc::fmin: case LibFunc::fminf: case LibFunc::fminl: -- case LibFunc::floor: case LibFunc::floorf: case LibFunc::floorl: -- case LibFunc::nearbyint: case LibFunc::nearbyintf: case LibFunc::nearbyintl: -- case LibFunc::ceil: case LibFunc::ceilf: case LibFunc::ceill: -- case LibFunc::rint: case LibFunc::rintf: case LibFunc::rintl: -- case LibFunc::round: case LibFunc::roundf: case LibFunc::roundl: -- case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: -- case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: -- case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: -- case LibFunc::memcmp: case LibFunc::strcmp: case LibFunc::strcpy: -- case LibFunc::stpcpy: case LibFunc::strlen: case LibFunc::strnlen: -- case LibFunc::memchr: -+ case LibFunc_copysign: case LibFunc_copysignf: case LibFunc_copysignl: -+ case LibFunc_fabs: case LibFunc_fabsf: case LibFunc_fabsl: -+ case LibFunc_sin: case LibFunc_sinf: case LibFunc_sinl: -+ case LibFunc_cos: case LibFunc_cosf: case LibFunc_cosl: -+ case LibFunc_sqrt: case LibFunc_sqrtf: case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: -+ case LibFunc_fmax: case LibFunc_fmaxf: case LibFunc_fmaxl: -+ case LibFunc_fmin: case LibFunc_fminf: case LibFunc_fminl: -+ case LibFunc_floor: case LibFunc_floorf: case LibFunc_floorl: -+ case LibFunc_nearbyint: case LibFunc_nearbyintf: case LibFunc_nearbyintl: -+ case LibFunc_ceil: case LibFunc_ceilf: case LibFunc_ceill: -+ case LibFunc_rint: case LibFunc_rintf: case LibFunc_rintl: -+ case LibFunc_round: case LibFunc_roundf: case LibFunc_roundl: -+ case LibFunc_trunc: case LibFunc_truncf: case LibFunc_truncl: -+ case LibFunc_log2: case LibFunc_log2f: case LibFunc_log2l: -+ case LibFunc_exp2: case LibFunc_exp2f: case LibFunc_exp2l: -+ case LibFunc_memcmp: case LibFunc_strcmp: case LibFunc_strcpy: -+ case LibFunc_stpcpy: case LibFunc_strlen: case LibFunc_strnlen: -+ case LibFunc_memchr: - return true; - } - return false; - } - -- StringRef getName(LibFunc::Func F) const { -+ StringRef getName(LibFunc F) const { - auto State = Impl->getState(F); - if (State == TargetLibraryInfoImpl::Unavailable) - return StringRef(); -diff --git a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -index 6ec531f8..e50c779c 100644 ---- a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -+++ b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -@@ -56,8 +56,8 @@ private: - Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B); - - // Str/Stp cpy are similar enough to be handled in the same functions. -- Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -- Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -+ Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); -+ Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); - - /// \brief Checks whether the call \p CI to a fortified libcall is foldable - /// to the non-fortified version. -diff --git a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -index ec712a31..058f1aef 100644 ---- a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -+++ b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -@@ -613,9 +613,9 @@ static bool isWriteOnlyParam(ImmutableCallSite CS, unsigned ArgIdx, - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. Note that all but the missing writeonly attribute are - // handled via InferFunctionAttr. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) -+ F == LibFunc_memset_pattern16 && TLI.has(F)) - if (ArgIdx == 0) - return true; - -diff --git a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -index ccb56631..18ce21de 100644 ---- a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -+++ b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -@@ -1501,51 +1501,51 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - switch (Name[0]) { - case 'a': -- if ((Name == "acos" && TLI->has(LibFunc::acos)) || -- (Name == "acosf" && TLI->has(LibFunc::acosf))) -+ if ((Name == "acos" && TLI->has(LibFunc_acos)) || -+ (Name == "acosf" && TLI->has(LibFunc_acosf))) - return ConstantFoldFP(acos, V, Ty); -- else if ((Name == "asin" && TLI->has(LibFunc::asin)) || -- (Name == "asinf" && TLI->has(LibFunc::asinf))) -+ else if ((Name == "asin" && TLI->has(LibFunc_asin)) || -+ (Name == "asinf" && TLI->has(LibFunc_asinf))) - return ConstantFoldFP(asin, V, Ty); -- else if ((Name == "atan" && TLI->has(LibFunc::atan)) || -- (Name == "atanf" && TLI->has(LibFunc::atanf))) -+ else if ((Name == "atan" && TLI->has(LibFunc_atan)) || -+ (Name == "atanf" && TLI->has(LibFunc_atanf))) - return ConstantFoldFP(atan, V, Ty); - break; - case 'c': -- if ((Name == "ceil" && TLI->has(LibFunc::ceil)) || -- (Name == "ceilf" && TLI->has(LibFunc::ceilf))) -+ if ((Name == "ceil" && TLI->has(LibFunc_ceil)) || -+ (Name == "ceilf" && TLI->has(LibFunc_ceilf))) - return ConstantFoldFP(ceil, V, Ty); -- else if ((Name == "cos" && TLI->has(LibFunc::cos)) || -- (Name == "cosf" && TLI->has(LibFunc::cosf))) -+ else if ((Name == "cos" && TLI->has(LibFunc_cos)) || -+ (Name == "cosf" && TLI->has(LibFunc_cosf))) - return ConstantFoldFP(cos, V, Ty); -- else if ((Name == "cosh" && TLI->has(LibFunc::cosh)) || -- (Name == "coshf" && TLI->has(LibFunc::coshf))) -+ else if ((Name == "cosh" && TLI->has(LibFunc_cosh)) || -+ (Name == "coshf" && TLI->has(LibFunc_coshf))) - return ConstantFoldFP(cosh, V, Ty); - break; - case 'e': -- if ((Name == "exp" && TLI->has(LibFunc::exp)) || -- (Name == "expf" && TLI->has(LibFunc::expf))) -+ if ((Name == "exp" && TLI->has(LibFunc_exp)) || -+ (Name == "expf" && TLI->has(LibFunc_expf))) - return ConstantFoldFP(exp, V, Ty); -- if ((Name == "exp2" && TLI->has(LibFunc::exp2)) || -- (Name == "exp2f" && TLI->has(LibFunc::exp2f))) -+ if ((Name == "exp2" && TLI->has(LibFunc_exp2)) || -+ (Name == "exp2f" && TLI->has(LibFunc_exp2f))) - // Constant fold exp2(x) as pow(2,x) in case the host doesn't have a - // C99 library. - return ConstantFoldBinaryFP(pow, 2.0, V, Ty); - break; - case 'f': -- if ((Name == "fabs" && TLI->has(LibFunc::fabs)) || -- (Name == "fabsf" && TLI->has(LibFunc::fabsf))) -+ if ((Name == "fabs" && TLI->has(LibFunc_fabs)) || -+ (Name == "fabsf" && TLI->has(LibFunc_fabsf))) - return ConstantFoldFP(fabs, V, Ty); -- else if ((Name == "floor" && TLI->has(LibFunc::floor)) || -- (Name == "floorf" && TLI->has(LibFunc::floorf))) -+ else if ((Name == "floor" && TLI->has(LibFunc_floor)) || -+ (Name == "floorf" && TLI->has(LibFunc_floorf))) - return ConstantFoldFP(floor, V, Ty); - break; - case 'l': -- if ((Name == "log" && V > 0 && TLI->has(LibFunc::log)) || -- (Name == "logf" && V > 0 && TLI->has(LibFunc::logf))) -+ if ((Name == "log" && V > 0 && TLI->has(LibFunc_log)) || -+ (Name == "logf" && V > 0 && TLI->has(LibFunc_logf))) - return ConstantFoldFP(log, V, Ty); -- else if ((Name == "log10" && V > 0 && TLI->has(LibFunc::log10)) || -- (Name == "log10f" && V > 0 && TLI->has(LibFunc::log10f))) -+ else if ((Name == "log10" && V > 0 && TLI->has(LibFunc_log10)) || -+ (Name == "log10f" && V > 0 && TLI->has(LibFunc_log10f))) - return ConstantFoldFP(log10, V, Ty); - else if (IntrinsicID == Intrinsic::sqrt && - (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())) { -@@ -1562,22 +1562,22 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - } - break; - case 's': -- if ((Name == "sin" && TLI->has(LibFunc::sin)) || -- (Name == "sinf" && TLI->has(LibFunc::sinf))) -+ if ((Name == "sin" && TLI->has(LibFunc_sin)) || -+ (Name == "sinf" && TLI->has(LibFunc_sinf))) - return ConstantFoldFP(sin, V, Ty); -- else if ((Name == "sinh" && TLI->has(LibFunc::sinh)) || -- (Name == "sinhf" && TLI->has(LibFunc::sinhf))) -+ else if ((Name == "sinh" && TLI->has(LibFunc_sinh)) || -+ (Name == "sinhf" && TLI->has(LibFunc_sinhf))) - return ConstantFoldFP(sinh, V, Ty); -- else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc::sqrt)) || -- (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc::sqrtf))) -+ else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc_sqrt)) || -+ (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc_sqrtf))) - return ConstantFoldFP(sqrt, V, Ty); - break; - case 't': -- if ((Name == "tan" && TLI->has(LibFunc::tan)) || -- (Name == "tanf" && TLI->has(LibFunc::tanf))) -+ if ((Name == "tan" && TLI->has(LibFunc_tan)) || -+ (Name == "tanf" && TLI->has(LibFunc_tanf))) - return ConstantFoldFP(tan, V, Ty); -- else if ((Name == "tanh" && TLI->has(LibFunc::tanh)) || -- (Name == "tanhf" && TLI->has(LibFunc::tanhf))) -+ else if ((Name == "tanh" && TLI->has(LibFunc_tanh)) || -+ (Name == "tanhf" && TLI->has(LibFunc_tanhf))) - return ConstantFoldFP(tanh, V, Ty); - break; - default: -@@ -1680,14 +1680,14 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - if (!TLI) - return nullptr; -- if ((Name == "pow" && TLI->has(LibFunc::pow)) || -- (Name == "powf" && TLI->has(LibFunc::powf))) -+ if ((Name == "pow" && TLI->has(LibFunc_pow)) || -+ (Name == "powf" && TLI->has(LibFunc_powf))) - return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty); -- if ((Name == "fmod" && TLI->has(LibFunc::fmod)) || -- (Name == "fmodf" && TLI->has(LibFunc::fmodf))) -+ if ((Name == "fmod" && TLI->has(LibFunc_fmod)) || -+ (Name == "fmodf" && TLI->has(LibFunc_fmodf))) - return ConstantFoldBinaryFP(fmod, Op1V, Op2V, Ty); -- if ((Name == "atan2" && TLI->has(LibFunc::atan2)) || -- (Name == "atan2f" && TLI->has(LibFunc::atan2f))) -+ if ((Name == "atan2" && TLI->has(LibFunc_atan2)) || -+ (Name == "atan2f" && TLI->has(LibFunc_atan2f))) - return ConstantFoldBinaryFP(atan2, Op1V, Op2V, Ty); - } else if (ConstantInt *Op2C = dyn_cast(Operands[1])) { - if (IntrinsicID == Intrinsic::powi && Ty->isHalfTy()) -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -index 480ab5cd..f6d83716 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -@@ -42,7 +42,7 @@ enum AllocType : uint8_t { - }; - - struct AllocFnsTy { -- LibFunc::Func Func; -+ LibFunc Func; - AllocType AllocTy; - unsigned char NumParams; - // First and Second size parameters (or -1 if unused) -@@ -52,29 +52,29 @@ struct AllocFnsTy { - // FIXME: certain users need more information. E.g., SimplifyLibCalls needs to - // know which functions are nounwind, noalias, nocapture parameters, etc. - static const AllocFnsTy AllocationFnData[] = { -- {LibFunc::malloc, MallocLike, 1, 0, -1}, -- {LibFunc::valloc, MallocLike, 1, 0, -1}, -- {LibFunc::Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -- {LibFunc::ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -- {LibFunc::Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -- {LibFunc::ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -- {LibFunc::msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -- {LibFunc::msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -- {LibFunc::msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -- {LibFunc::msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -- {LibFunc::calloc, CallocLike, 2, 0, 1}, -- {LibFunc::realloc, ReallocLike, 2, 1, -1}, -- {LibFunc::reallocf, ReallocLike, 2, 1, -1}, -- {LibFunc::strdup, StrDupLike, 1, -1, -1}, -- {LibFunc::strndup, StrDupLike, 2, 1, -1} -+ {LibFunc_malloc, MallocLike, 1, 0, -1}, -+ {LibFunc_valloc, MallocLike, 1, 0, -1}, -+ {LibFunc_Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -+ {LibFunc_ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -+ {LibFunc_Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -+ {LibFunc_ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -+ {LibFunc_msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -+ {LibFunc_msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -+ {LibFunc_msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -+ {LibFunc_msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -+ {LibFunc_calloc, CallocLike, 2, 0, 1}, -+ {LibFunc_realloc, ReallocLike, 2, 1, -1}, -+ {LibFunc_reallocf, ReallocLike, 2, 1, -1}, -+ {LibFunc_strdup, StrDupLike, 1, -1, -1}, -+ {LibFunc_strndup, StrDupLike, 2, 1, -1} - // TODO: Handle "int posix_memalign(void **, size_t, size_t)" - }; - -@@ -111,7 +111,7 @@ static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy, - - // Make sure that the function is available. - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - -@@ -295,33 +295,33 @@ const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) { - return nullptr; - - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - - unsigned ExpectedNumParams; -- if (TLIFn == LibFunc::free || -- TLIFn == LibFunc::ZdlPv || // operator delete(void*) -- TLIFn == LibFunc::ZdaPv || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_ptr32 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_ptr64 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_array_ptr32 || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_array_ptr64) // operator delete[](void*) -+ if (TLIFn == LibFunc_free || -+ TLIFn == LibFunc_ZdlPv || // operator delete(void*) -+ TLIFn == LibFunc_ZdaPv || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_ptr32 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_ptr64 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr32 || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr64) // operator delete[](void*) - ExpectedNumParams = 1; -- else if (TLIFn == LibFunc::ZdlPvj || // delete(void*, uint) -- TLIFn == LibFunc::ZdlPvm || // delete(void*, ulong) -- TLIFn == LibFunc::ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -- TLIFn == LibFunc::ZdaPvj || // delete[](void*, uint) -- TLIFn == LibFunc::ZdaPvm || // delete[](void*, ulong) -- TLIFn == LibFunc::ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr32_int || // delete(void*, uint) -- TLIFn == LibFunc::msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr32_int || // delete[](void*, uint) -- TLIFn == LibFunc::msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) -+ else if (TLIFn == LibFunc_ZdlPvj || // delete(void*, uint) -+ TLIFn == LibFunc_ZdlPvm || // delete(void*, ulong) -+ TLIFn == LibFunc_ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -+ TLIFn == LibFunc_ZdaPvj || // delete[](void*, uint) -+ TLIFn == LibFunc_ZdaPvm || // delete[](void*, ulong) -+ TLIFn == LibFunc_ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr32_int || // delete(void*, uint) -+ TLIFn == LibFunc_msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_int || // delete[](void*, uint) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) - ExpectedNumParams = 2; - else - return nullptr; -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -index a0ae72f1..9db6c499 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -@@ -142,9 +142,9 @@ MemoryLocation MemoryLocation::getForArgument(ImmutableCallSite CS, - // for memcpy/memset. This is particularly important because the - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) { -+ F == LibFunc_memset_pattern16 && TLI.has(F)) { - assert((ArgIdx == 0 || ArgIdx == 1) && - "Invalid argument index for memset_pattern16"); - if (ArgIdx == 1) -diff --git a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -index a71d090c..a34174d1 100644 ---- a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -+++ b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -@@ -25,7 +25,7 @@ static cl::opt ClVectorLibrary( - "Accelerate framework"), - clEnumValEnd)); - --const char *const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = { -+const char *const TargetLibraryInfoImpl::StandardNames[NumLibFuncs] = { - #define TLI_DEFINE_STRING - #include "llvm/Analysis/TargetLibraryInfo.def" - }; -@@ -62,9 +62,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - - if (T.getArch() == Triple::r600 || - T.getArch() == Triple::amdgcn) { -- TLI.setUnavailable(LibFunc::ldexp); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -+ TLI.setUnavailable(LibFunc_ldexp); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); - } - - // There are no library implementations of mempcy and memset for AMD gpus and -@@ -73,9 +73,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - T.getArch() == Triple::amdgcn || - T.getArch() == Triple::wasm32 || - T.getArch() == Triple::wasm64) { -- TLI.setUnavailable(LibFunc::memcpy); -- TLI.setUnavailable(LibFunc::memset); -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memcpy); -+ TLI.setUnavailable(LibFunc_memset); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - return; - } - -@@ -83,21 +83,21 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // All versions of watchOS support it. - if (T.isMacOSX()) { - if (T.isMacOSXVersionLT(10, 5)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (T.isiOS()) { - if (T.isOSVersionLT(3, 0)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (!T.isWatchOS()) { -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } - - if (!hasSinCosPiStret(T)) { -- TLI.setUnavailable(LibFunc::sinpi); -- TLI.setUnavailable(LibFunc::sinpif); -- TLI.setUnavailable(LibFunc::cospi); -- TLI.setUnavailable(LibFunc::cospif); -- TLI.setUnavailable(LibFunc::sincospi_stret); -- TLI.setUnavailable(LibFunc::sincospif_stret); -+ TLI.setUnavailable(LibFunc_sinpi); -+ TLI.setUnavailable(LibFunc_sinpif); -+ TLI.setUnavailable(LibFunc_cospi); -+ TLI.setUnavailable(LibFunc_cospif); -+ TLI.setUnavailable(LibFunc_sincospi_stret); -+ TLI.setUnavailable(LibFunc_sincospif_stret); - } - - if (T.isMacOSX() && T.getArch() == Triple::x86 && -@@ -107,177 +107,177 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // has a $UNIX2003 suffix. The two implementations are identical except - // for the return value in some edge cases. However, we don't want to - // generate code that depends on the old symbols. -- TLI.setAvailableWithName(LibFunc::fwrite, "fwrite$UNIX2003"); -- TLI.setAvailableWithName(LibFunc::fputs, "fputs$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fwrite, "fwrite$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fputs, "fputs$UNIX2003"); - } - - // iprintf and friends are only available on XCore and TCE. - if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) { -- TLI.setUnavailable(LibFunc::iprintf); -- TLI.setUnavailable(LibFunc::siprintf); -- TLI.setUnavailable(LibFunc::fiprintf); -+ TLI.setUnavailable(LibFunc_iprintf); -+ TLI.setUnavailable(LibFunc_siprintf); -+ TLI.setUnavailable(LibFunc_fiprintf); - } - - if (T.isOSWindows() && !T.isOSCygMing()) { - // Win32 does not support long double -- TLI.setUnavailable(LibFunc::acosl); -- TLI.setUnavailable(LibFunc::asinl); -- TLI.setUnavailable(LibFunc::atanl); -- TLI.setUnavailable(LibFunc::atan2l); -- TLI.setUnavailable(LibFunc::ceill); -- TLI.setUnavailable(LibFunc::copysignl); -- TLI.setUnavailable(LibFunc::cosl); -- TLI.setUnavailable(LibFunc::coshl); -- TLI.setUnavailable(LibFunc::expl); -- TLI.setUnavailable(LibFunc::fabsf); // Win32 and Win64 both lack fabsf -- TLI.setUnavailable(LibFunc::fabsl); -- TLI.setUnavailable(LibFunc::floorl); -- TLI.setUnavailable(LibFunc::fmaxl); -- TLI.setUnavailable(LibFunc::fminl); -- TLI.setUnavailable(LibFunc::fmodl); -- TLI.setUnavailable(LibFunc::frexpl); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -- TLI.setUnavailable(LibFunc::logl); -- TLI.setUnavailable(LibFunc::modfl); -- TLI.setUnavailable(LibFunc::powl); -- TLI.setUnavailable(LibFunc::sinl); -- TLI.setUnavailable(LibFunc::sinhl); -- TLI.setUnavailable(LibFunc::sqrtl); -- TLI.setUnavailable(LibFunc::tanl); -- TLI.setUnavailable(LibFunc::tanhl); -+ TLI.setUnavailable(LibFunc_acosl); -+ TLI.setUnavailable(LibFunc_asinl); -+ TLI.setUnavailable(LibFunc_atanl); -+ TLI.setUnavailable(LibFunc_atan2l); -+ TLI.setUnavailable(LibFunc_ceill); -+ TLI.setUnavailable(LibFunc_copysignl); -+ TLI.setUnavailable(LibFunc_cosl); -+ TLI.setUnavailable(LibFunc_coshl); -+ TLI.setUnavailable(LibFunc_expl); -+ TLI.setUnavailable(LibFunc_fabsf); // Win32 and Win64 both lack fabsf -+ TLI.setUnavailable(LibFunc_fabsl); -+ TLI.setUnavailable(LibFunc_floorl); -+ TLI.setUnavailable(LibFunc_fmaxl); -+ TLI.setUnavailable(LibFunc_fminl); -+ TLI.setUnavailable(LibFunc_fmodl); -+ TLI.setUnavailable(LibFunc_frexpl); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); -+ TLI.setUnavailable(LibFunc_logl); -+ TLI.setUnavailable(LibFunc_modfl); -+ TLI.setUnavailable(LibFunc_powl); -+ TLI.setUnavailable(LibFunc_sinl); -+ TLI.setUnavailable(LibFunc_sinhl); -+ TLI.setUnavailable(LibFunc_sqrtl); -+ TLI.setUnavailable(LibFunc_tanl); -+ TLI.setUnavailable(LibFunc_tanhl); - - // Win32 only has C89 math -- TLI.setUnavailable(LibFunc::acosh); -- TLI.setUnavailable(LibFunc::acoshf); -- TLI.setUnavailable(LibFunc::acoshl); -- TLI.setUnavailable(LibFunc::asinh); -- TLI.setUnavailable(LibFunc::asinhf); -- TLI.setUnavailable(LibFunc::asinhl); -- TLI.setUnavailable(LibFunc::atanh); -- TLI.setUnavailable(LibFunc::atanhf); -- TLI.setUnavailable(LibFunc::atanhl); -- TLI.setUnavailable(LibFunc::cbrt); -- TLI.setUnavailable(LibFunc::cbrtf); -- TLI.setUnavailable(LibFunc::cbrtl); -- TLI.setUnavailable(LibFunc::exp2); -- TLI.setUnavailable(LibFunc::exp2f); -- TLI.setUnavailable(LibFunc::exp2l); -- TLI.setUnavailable(LibFunc::expm1); -- TLI.setUnavailable(LibFunc::expm1f); -- TLI.setUnavailable(LibFunc::expm1l); -- TLI.setUnavailable(LibFunc::log2); -- TLI.setUnavailable(LibFunc::log2f); -- TLI.setUnavailable(LibFunc::log2l); -- TLI.setUnavailable(LibFunc::log1p); -- TLI.setUnavailable(LibFunc::log1pf); -- TLI.setUnavailable(LibFunc::log1pl); -- TLI.setUnavailable(LibFunc::logb); -- TLI.setUnavailable(LibFunc::logbf); -- TLI.setUnavailable(LibFunc::logbl); -- TLI.setUnavailable(LibFunc::nearbyint); -- TLI.setUnavailable(LibFunc::nearbyintf); -- TLI.setUnavailable(LibFunc::nearbyintl); -- TLI.setUnavailable(LibFunc::rint); -- TLI.setUnavailable(LibFunc::rintf); -- TLI.setUnavailable(LibFunc::rintl); -- TLI.setUnavailable(LibFunc::round); -- TLI.setUnavailable(LibFunc::roundf); -- TLI.setUnavailable(LibFunc::roundl); -- TLI.setUnavailable(LibFunc::trunc); -- TLI.setUnavailable(LibFunc::truncf); -- TLI.setUnavailable(LibFunc::truncl); -+ TLI.setUnavailable(LibFunc_acosh); -+ TLI.setUnavailable(LibFunc_acoshf); -+ TLI.setUnavailable(LibFunc_acoshl); -+ TLI.setUnavailable(LibFunc_asinh); -+ TLI.setUnavailable(LibFunc_asinhf); -+ TLI.setUnavailable(LibFunc_asinhl); -+ TLI.setUnavailable(LibFunc_atanh); -+ TLI.setUnavailable(LibFunc_atanhf); -+ TLI.setUnavailable(LibFunc_atanhl); -+ TLI.setUnavailable(LibFunc_cbrt); -+ TLI.setUnavailable(LibFunc_cbrtf); -+ TLI.setUnavailable(LibFunc_cbrtl); -+ TLI.setUnavailable(LibFunc_exp2); -+ TLI.setUnavailable(LibFunc_exp2f); -+ TLI.setUnavailable(LibFunc_exp2l); -+ TLI.setUnavailable(LibFunc_expm1); -+ TLI.setUnavailable(LibFunc_expm1f); -+ TLI.setUnavailable(LibFunc_expm1l); -+ TLI.setUnavailable(LibFunc_log2); -+ TLI.setUnavailable(LibFunc_log2f); -+ TLI.setUnavailable(LibFunc_log2l); -+ TLI.setUnavailable(LibFunc_log1p); -+ TLI.setUnavailable(LibFunc_log1pf); -+ TLI.setUnavailable(LibFunc_log1pl); -+ TLI.setUnavailable(LibFunc_logb); -+ TLI.setUnavailable(LibFunc_logbf); -+ TLI.setUnavailable(LibFunc_logbl); -+ TLI.setUnavailable(LibFunc_nearbyint); -+ TLI.setUnavailable(LibFunc_nearbyintf); -+ TLI.setUnavailable(LibFunc_nearbyintl); -+ TLI.setUnavailable(LibFunc_rint); -+ TLI.setUnavailable(LibFunc_rintf); -+ TLI.setUnavailable(LibFunc_rintl); -+ TLI.setUnavailable(LibFunc_round); -+ TLI.setUnavailable(LibFunc_roundf); -+ TLI.setUnavailable(LibFunc_roundl); -+ TLI.setUnavailable(LibFunc_trunc); -+ TLI.setUnavailable(LibFunc_truncf); -+ TLI.setUnavailable(LibFunc_truncl); - - // Win32 provides some C99 math with mangled names -- TLI.setAvailableWithName(LibFunc::copysign, "_copysign"); -+ TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); - - if (T.getArch() == Triple::x86) { - // Win32 on x86 implements single-precision math functions as macros -- TLI.setUnavailable(LibFunc::acosf); -- TLI.setUnavailable(LibFunc::asinf); -- TLI.setUnavailable(LibFunc::atanf); -- TLI.setUnavailable(LibFunc::atan2f); -- TLI.setUnavailable(LibFunc::ceilf); -- TLI.setUnavailable(LibFunc::copysignf); -- TLI.setUnavailable(LibFunc::cosf); -- TLI.setUnavailable(LibFunc::coshf); -- TLI.setUnavailable(LibFunc::expf); -- TLI.setUnavailable(LibFunc::floorf); -- TLI.setUnavailable(LibFunc::fminf); -- TLI.setUnavailable(LibFunc::fmaxf); -- TLI.setUnavailable(LibFunc::fmodf); -- TLI.setUnavailable(LibFunc::logf); -- TLI.setUnavailable(LibFunc::powf); -- TLI.setUnavailable(LibFunc::sinf); -- TLI.setUnavailable(LibFunc::sinhf); -- TLI.setUnavailable(LibFunc::sqrtf); -- TLI.setUnavailable(LibFunc::tanf); -- TLI.setUnavailable(LibFunc::tanhf); -+ TLI.setUnavailable(LibFunc_acosf); -+ TLI.setUnavailable(LibFunc_asinf); -+ TLI.setUnavailable(LibFunc_atanf); -+ TLI.setUnavailable(LibFunc_atan2f); -+ TLI.setUnavailable(LibFunc_ceilf); -+ TLI.setUnavailable(LibFunc_copysignf); -+ TLI.setUnavailable(LibFunc_cosf); -+ TLI.setUnavailable(LibFunc_coshf); -+ TLI.setUnavailable(LibFunc_expf); -+ TLI.setUnavailable(LibFunc_floorf); -+ TLI.setUnavailable(LibFunc_fminf); -+ TLI.setUnavailable(LibFunc_fmaxf); -+ TLI.setUnavailable(LibFunc_fmodf); -+ TLI.setUnavailable(LibFunc_logf); -+ TLI.setUnavailable(LibFunc_powf); -+ TLI.setUnavailable(LibFunc_sinf); -+ TLI.setUnavailable(LibFunc_sinhf); -+ TLI.setUnavailable(LibFunc_sqrtf); -+ TLI.setUnavailable(LibFunc_tanf); -+ TLI.setUnavailable(LibFunc_tanhf); - } - - // Win32 does *not* provide provide these functions, but they are - // generally available on POSIX-compliant systems: -- TLI.setUnavailable(LibFunc::access); -- TLI.setUnavailable(LibFunc::bcmp); -- TLI.setUnavailable(LibFunc::bcopy); -- TLI.setUnavailable(LibFunc::bzero); -- TLI.setUnavailable(LibFunc::chmod); -- TLI.setUnavailable(LibFunc::chown); -- TLI.setUnavailable(LibFunc::closedir); -- TLI.setUnavailable(LibFunc::ctermid); -- TLI.setUnavailable(LibFunc::fdopen); -- TLI.setUnavailable(LibFunc::ffs); -- TLI.setUnavailable(LibFunc::fileno); -- TLI.setUnavailable(LibFunc::flockfile); -- TLI.setUnavailable(LibFunc::fseeko); -- TLI.setUnavailable(LibFunc::fstat); -- TLI.setUnavailable(LibFunc::fstatvfs); -- TLI.setUnavailable(LibFunc::ftello); -- TLI.setUnavailable(LibFunc::ftrylockfile); -- TLI.setUnavailable(LibFunc::funlockfile); -- TLI.setUnavailable(LibFunc::getc_unlocked); -- TLI.setUnavailable(LibFunc::getitimer); -- TLI.setUnavailable(LibFunc::getlogin_r); -- TLI.setUnavailable(LibFunc::getpwnam); -- TLI.setUnavailable(LibFunc::gettimeofday); -- TLI.setUnavailable(LibFunc::htonl); -- TLI.setUnavailable(LibFunc::htons); -- TLI.setUnavailable(LibFunc::lchown); -- TLI.setUnavailable(LibFunc::lstat); -- TLI.setUnavailable(LibFunc::memccpy); -- TLI.setUnavailable(LibFunc::mkdir); -- TLI.setUnavailable(LibFunc::ntohl); -- TLI.setUnavailable(LibFunc::ntohs); -- TLI.setUnavailable(LibFunc::open); -- TLI.setUnavailable(LibFunc::opendir); -- TLI.setUnavailable(LibFunc::pclose); -- TLI.setUnavailable(LibFunc::popen); -- TLI.setUnavailable(LibFunc::pread); -- TLI.setUnavailable(LibFunc::pwrite); -- TLI.setUnavailable(LibFunc::read); -- TLI.setUnavailable(LibFunc::readlink); -- TLI.setUnavailable(LibFunc::realpath); -- TLI.setUnavailable(LibFunc::rmdir); -- TLI.setUnavailable(LibFunc::setitimer); -- TLI.setUnavailable(LibFunc::stat); -- TLI.setUnavailable(LibFunc::statvfs); -- TLI.setUnavailable(LibFunc::stpcpy); -- TLI.setUnavailable(LibFunc::stpncpy); -- TLI.setUnavailable(LibFunc::strcasecmp); -- TLI.setUnavailable(LibFunc::strncasecmp); -- TLI.setUnavailable(LibFunc::times); -- TLI.setUnavailable(LibFunc::uname); -- TLI.setUnavailable(LibFunc::unlink); -- TLI.setUnavailable(LibFunc::unsetenv); -- TLI.setUnavailable(LibFunc::utime); -- TLI.setUnavailable(LibFunc::utimes); -- TLI.setUnavailable(LibFunc::write); -+ TLI.setUnavailable(LibFunc_access); -+ TLI.setUnavailable(LibFunc_bcmp); -+ TLI.setUnavailable(LibFunc_bcopy); -+ TLI.setUnavailable(LibFunc_bzero); -+ TLI.setUnavailable(LibFunc_chmod); -+ TLI.setUnavailable(LibFunc_chown); -+ TLI.setUnavailable(LibFunc_closedir); -+ TLI.setUnavailable(LibFunc_ctermid); -+ TLI.setUnavailable(LibFunc_fdopen); -+ TLI.setUnavailable(LibFunc_ffs); -+ TLI.setUnavailable(LibFunc_fileno); -+ TLI.setUnavailable(LibFunc_flockfile); -+ TLI.setUnavailable(LibFunc_fseeko); -+ TLI.setUnavailable(LibFunc_fstat); -+ TLI.setUnavailable(LibFunc_fstatvfs); -+ TLI.setUnavailable(LibFunc_ftello); -+ TLI.setUnavailable(LibFunc_ftrylockfile); -+ TLI.setUnavailable(LibFunc_funlockfile); -+ TLI.setUnavailable(LibFunc_getc_unlocked); -+ TLI.setUnavailable(LibFunc_getitimer); -+ TLI.setUnavailable(LibFunc_getlogin_r); -+ TLI.setUnavailable(LibFunc_getpwnam); -+ TLI.setUnavailable(LibFunc_gettimeofday); -+ TLI.setUnavailable(LibFunc_htonl); -+ TLI.setUnavailable(LibFunc_htons); -+ TLI.setUnavailable(LibFunc_lchown); -+ TLI.setUnavailable(LibFunc_lstat); -+ TLI.setUnavailable(LibFunc_memccpy); -+ TLI.setUnavailable(LibFunc_mkdir); -+ TLI.setUnavailable(LibFunc_ntohl); -+ TLI.setUnavailable(LibFunc_ntohs); -+ TLI.setUnavailable(LibFunc_open); -+ TLI.setUnavailable(LibFunc_opendir); -+ TLI.setUnavailable(LibFunc_pclose); -+ TLI.setUnavailable(LibFunc_popen); -+ TLI.setUnavailable(LibFunc_pread); -+ TLI.setUnavailable(LibFunc_pwrite); -+ TLI.setUnavailable(LibFunc_read); -+ TLI.setUnavailable(LibFunc_readlink); -+ TLI.setUnavailable(LibFunc_realpath); -+ TLI.setUnavailable(LibFunc_rmdir); -+ TLI.setUnavailable(LibFunc_setitimer); -+ TLI.setUnavailable(LibFunc_stat); -+ TLI.setUnavailable(LibFunc_statvfs); -+ TLI.setUnavailable(LibFunc_stpcpy); -+ TLI.setUnavailable(LibFunc_stpncpy); -+ TLI.setUnavailable(LibFunc_strcasecmp); -+ TLI.setUnavailable(LibFunc_strncasecmp); -+ TLI.setUnavailable(LibFunc_times); -+ TLI.setUnavailable(LibFunc_uname); -+ TLI.setUnavailable(LibFunc_unlink); -+ TLI.setUnavailable(LibFunc_unsetenv); -+ TLI.setUnavailable(LibFunc_utime); -+ TLI.setUnavailable(LibFunc_utimes); -+ TLI.setUnavailable(LibFunc_write); - - // Win32 does *not* provide provide these functions, but they are - // specified by C99: -- TLI.setUnavailable(LibFunc::atoll); -- TLI.setUnavailable(LibFunc::frexpf); -- TLI.setUnavailable(LibFunc::llabs); -+ TLI.setUnavailable(LibFunc_atoll); -+ TLI.setUnavailable(LibFunc_frexpf); -+ TLI.setUnavailable(LibFunc_llabs); - } - - switch (T.getOS()) { -@@ -287,28 +287,28 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // for Intel processors (both OS X and iOS simulator) was incorrect for - // some values until OS X 10.11 and iOS 9.0. exp10l is not available on - // OS X or iOS. -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (T.isMacOSXVersionLT(10, 11)) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::IOS: - case Triple::TvOS: - case Triple::WatchOS: -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (!T.isWatchOS() && (T.isOSVersionLT(7, 0) || - (T.isOSVersionLT(9, 0) && - (T.getArch() == Triple::x86 || - T.getArch() == Triple::x86_64)))) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::Linux: -@@ -319,9 +319,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // - // Fall through to disable all of them. - default: -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); -+ TLI.setUnavailable(LibFunc_exp10l); - } - - // ffsl is available on at least Darwin, Mac OS X, iOS, FreeBSD, and -@@ -339,7 +339,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsl); -+ TLI.setUnavailable(LibFunc_ffsl); - } - - // ffsll is available on at least FreeBSD and Linux (GLIBC): -@@ -355,7 +355,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsll); -+ TLI.setUnavailable(LibFunc_ffsll); - } - - // The following functions are available on at least FreeBSD: -@@ -363,30 +363,30 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // http://svn.freebsd.org/base/head/lib/libc/string/flsl.c - // http://svn.freebsd.org/base/head/lib/libc/string/flsll.c - if (!T.isOSFreeBSD()) { -- TLI.setUnavailable(LibFunc::fls); -- TLI.setUnavailable(LibFunc::flsl); -- TLI.setUnavailable(LibFunc::flsll); -+ TLI.setUnavailable(LibFunc_fls); -+ TLI.setUnavailable(LibFunc_flsl); -+ TLI.setUnavailable(LibFunc_flsll); - } - - // The following functions are available on at least Linux: - if (!T.isOSLinux()) { -- TLI.setUnavailable(LibFunc::dunder_strdup); -- TLI.setUnavailable(LibFunc::dunder_strtok_r); -- TLI.setUnavailable(LibFunc::dunder_isoc99_scanf); -- TLI.setUnavailable(LibFunc::dunder_isoc99_sscanf); -- TLI.setUnavailable(LibFunc::under_IO_getc); -- TLI.setUnavailable(LibFunc::under_IO_putc); -- TLI.setUnavailable(LibFunc::memalign); -- TLI.setUnavailable(LibFunc::fopen64); -- TLI.setUnavailable(LibFunc::fseeko64); -- TLI.setUnavailable(LibFunc::fstat64); -- TLI.setUnavailable(LibFunc::fstatvfs64); -- TLI.setUnavailable(LibFunc::ftello64); -- TLI.setUnavailable(LibFunc::lstat64); -- TLI.setUnavailable(LibFunc::open64); -- TLI.setUnavailable(LibFunc::stat64); -- TLI.setUnavailable(LibFunc::statvfs64); -- TLI.setUnavailable(LibFunc::tmpfile64); -+ TLI.setUnavailable(LibFunc_dunder_strdup); -+ TLI.setUnavailable(LibFunc_dunder_strtok_r); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_scanf); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf); -+ TLI.setUnavailable(LibFunc_under_IO_getc); -+ TLI.setUnavailable(LibFunc_under_IO_putc); -+ TLI.setUnavailable(LibFunc_memalign); -+ TLI.setUnavailable(LibFunc_fopen64); -+ TLI.setUnavailable(LibFunc_fseeko64); -+ TLI.setUnavailable(LibFunc_fstat64); -+ TLI.setUnavailable(LibFunc_fstatvfs64); -+ TLI.setUnavailable(LibFunc_ftello64); -+ TLI.setUnavailable(LibFunc_lstat64); -+ TLI.setUnavailable(LibFunc_open64); -+ TLI.setUnavailable(LibFunc_stat64); -+ TLI.setUnavailable(LibFunc_statvfs64); -+ TLI.setUnavailable(LibFunc_tmpfile64); - } - - TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary); -@@ -446,9 +446,9 @@ static StringRef sanitizeFunctionName(StringRef funcName) { - } - - bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const char *const *Start = &StandardNames[0]; -- const char *const *End = &StandardNames[LibFunc::NumLibFuncs]; -+ const char *const *End = &StandardNames[NumLibFuncs]; - - funcName = sanitizeFunctionName(funcName); - if (funcName.empty()) -@@ -459,14 +459,14 @@ bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, - return std::strncmp(LHS, RHS.data(), RHS.size()) < 0; - }); - if (I != End && *I == funcName) { -- F = (LibFunc::Func)(I - Start); -+ F = (LibFunc)(I - Start); - return true; - } - return false; - } - - bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, -- LibFunc::Func F, -+ LibFunc F, - const DataLayout *DL) const { - LLVMContext &Ctx = FTy.getContext(); - Type *PCharTy = Type::getInt8PtrTy(Ctx); -@@ -477,489 +477,489 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - unsigned NumParams = FTy.getNumParams(); - - switch (F) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1)->isIntegerTy()); - -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return ((NumParams == 2 || NumParams == 3) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::strcat: -+ case LibFunc_strcat: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType()); - -- case LibFunc::strncat: -+ case LibFunc_strncat: - return (NumParams == 3 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType() && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strcpy_chk: -- case LibFunc::stpcpy_chk: -+ case LibFunc_strcpy_chk: -+ case LibFunc_stpcpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: - return (NumParams == 2 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy); - -- case LibFunc::strncpy_chk: -- case LibFunc::stpncpy_chk: -+ case LibFunc_strncpy_chk: -+ case LibFunc_stpncpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return (NumParams == 2 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strspn: -- case LibFunc::strcspn: -+ case LibFunc_strspn: -+ case LibFunc_strcspn: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strcoll: -- case LibFunc::strcasecmp: -- case LibFunc::strncasecmp: -+ case LibFunc_strcoll: -+ case LibFunc_strcasecmp: -+ case LibFunc_strncasecmp: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strstr: -+ case LibFunc_strstr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::scanf: -+ case LibFunc_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::system: -+ case LibFunc_system: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::malloc: -+ case LibFunc_malloc: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy()); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getReturnType()->isIntegerTy(32)); - -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy(32) && - FTy.getParamType(2)->isIntegerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::memcpy_chk: -- case LibFunc::memmove_chk: -+ case LibFunc_memcpy_chk: -+ case LibFunc_memmove_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memcpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memmove: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memset: -+ case LibFunc_memset: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memccpy: -+ case LibFunc_memccpy: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::memalign: -+ case LibFunc_memalign: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::realloc: -+ case LibFunc_realloc: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::read: -+ case LibFunc_read: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::rewind: -+ case LibFunc_rewind: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rename: -+ case LibFunc_rename: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::readlink: -+ case LibFunc_readlink: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::write: -+ case LibFunc_write: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bzero: -+ case LibFunc_bzero: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::calloc: -+ case LibFunc_calloc: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy()); - -- case LibFunc::atof: -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atoll: -- case LibFunc::ferror: -- case LibFunc::getenv: -- case LibFunc::getpwnam: -- case LibFunc::pclose: -- case LibFunc::perror: -- case LibFunc::printf: -- case LibFunc::puts: -- case LibFunc::uname: -- case LibFunc::under_IO_getc: -- case LibFunc::unlink: -- case LibFunc::unsetenv: -+ case LibFunc_atof: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atoll: -+ case LibFunc_ferror: -+ case LibFunc_getenv: -+ case LibFunc_getpwnam: -+ case LibFunc_pclose: -+ case LibFunc_perror: -+ case LibFunc_printf: -+ case LibFunc_puts: -+ case LibFunc_uname: -+ case LibFunc_under_IO_getc: -+ case LibFunc_unlink: -+ case LibFunc_unsetenv: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::chmod: -- case LibFunc::chown: -- case LibFunc::clearerr: -- case LibFunc::closedir: -- case LibFunc::ctermid: -- case LibFunc::fclose: -- case LibFunc::feof: -- case LibFunc::fflush: -- case LibFunc::fgetc: -- case LibFunc::fileno: -- case LibFunc::flockfile: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::fseeko64: -- case LibFunc::fseeko: -- case LibFunc::fsetpos: -- case LibFunc::ftell: -- case LibFunc::ftello64: -- case LibFunc::ftello: -- case LibFunc::ftrylockfile: -- case LibFunc::funlockfile: -- case LibFunc::getc: -- case LibFunc::getc_unlocked: -- case LibFunc::getlogin_r: -- case LibFunc::mkdir: -- case LibFunc::mktime: -- case LibFunc::times: -+ case LibFunc_chmod: -+ case LibFunc_chown: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: -+ case LibFunc_ctermid: -+ case LibFunc_fclose: -+ case LibFunc_feof: -+ case LibFunc_fflush: -+ case LibFunc_fgetc: -+ case LibFunc_fileno: -+ case LibFunc_flockfile: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_fseeko64: -+ case LibFunc_fseeko: -+ case LibFunc_fsetpos: -+ case LibFunc_ftell: -+ case LibFunc_ftello64: -+ case LibFunc_ftello: -+ case LibFunc_ftrylockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_getc: -+ case LibFunc_getc_unlocked: -+ case LibFunc_getlogin_r: -+ case LibFunc_mkdir: -+ case LibFunc_mktime: -+ case LibFunc_times: - return (NumParams != 0 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::access: -+ case LibFunc_access: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::fopen: -+ case LibFunc_fopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgets: -+ case LibFunc_fgets: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::fread: -+ case LibFunc_fread: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return (NumParams == 4 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::gets: -- case LibFunc::getchar: -- case LibFunc::getitimer: -+ case LibFunc_gets: -+ case LibFunc_getchar: -+ case LibFunc_getitimer: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::putc: -+ case LibFunc_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::pread: -- case LibFunc::pwrite: -+ case LibFunc_pread: -+ case LibFunc_pwrite: - return (NumParams == 4 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::popen: -+ case LibFunc_popen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::valloc: -+ case LibFunc_valloc: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::open: -+ case LibFunc_open: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::opendir: -+ case LibFunc_opendir: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -- case LibFunc::lstat: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: -+ case LibFunc_lstat: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::lchown: -+ case LibFunc_lchown: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::qsort: -+ case LibFunc_qsort: - return (NumParams == 4 && FTy.getParamType(3)->isPointerTy()); -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::open64: -+ case LibFunc_open64: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::Znwj: // new(unsigned int); -- case LibFunc::Znwm: // new(unsigned long); -- case LibFunc::Znaj: // new[](unsigned int); -- case LibFunc::Znam: // new[](unsigned long); -- case LibFunc::msvc_new_int: // new(unsigned int); -- case LibFunc::msvc_new_longlong: // new(unsigned long long); -- case LibFunc::msvc_new_array_int: // new[](unsigned int); -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long); -+ case LibFunc_Znwj: // new(unsigned int); -+ case LibFunc_Znwm: // new(unsigned long); -+ case LibFunc_Znaj: // new[](unsigned int); -+ case LibFunc_Znam: // new[](unsigned long); -+ case LibFunc_msvc_new_int: // new(unsigned int); -+ case LibFunc_msvc_new_longlong: // new(unsigned long long); -+ case LibFunc_msvc_new_array_int: // new[](unsigned int); -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long); - return (NumParams == 1); - -- case LibFunc::memset_pattern16: -+ case LibFunc_memset_pattern16: - return (!FTy.isVarArg() && NumParams == 3 && - isa(FTy.getParamType(0)) && - isa(FTy.getParamType(1)) && - isa(FTy.getParamType(2))); - -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - return (NumParams == 1 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return (NumParams == 2 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getReturnType() == FTy.getParamType(1)); - -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -- case LibFunc::isdigit: -- case LibFunc::isascii: -- case LibFunc::toascii: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: -+ case LibFunc_isdigit: -+ case LibFunc_isascii: -+ case LibFunc_toascii: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isIntegerTy()); - -- case LibFunc::fls: -- case LibFunc::flsl: -- case LibFunc::flsll: -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_fls: -+ case LibFunc_flsl: -+ case LibFunc_flsll: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::cxa_atexit: -+ case LibFunc_cxa_atexit: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); - -- case LibFunc::sinpi: -- case LibFunc::cospi: -+ case LibFunc_sinpi: -+ case LibFunc_cospi: - return (NumParams == 1 && FTy.getReturnType()->isDoubleTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::sinpif: -- case LibFunc::cospif: -+ case LibFunc_sinpif: -+ case LibFunc_cospif: - return (NumParams == 1 && FTy.getReturnType()->isFloatTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -@@ -971,7 +971,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - } - - bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const DataLayout *DL = - FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; - return getLibFunc(FDecl.getName(), F) && -diff --git a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -index b3bc885c..945acb8b 100644 ---- a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -+++ b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -@@ -135,7 +135,7 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - if (!TLI) - return Intrinsic::not_intrinsic; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = CI->getCalledFunction(); - // We're going to make assumptions on the semantics of the functions, check - // that the target knows that it's available in this environment and it does -@@ -148,77 +148,77 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - switch (Func) { - default: - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - return checkUnaryFloatSignature(*CI, Intrinsic::sin); -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - return checkUnaryFloatSignature(*CI, Intrinsic::cos); -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: - return checkUnaryFloatSignature(*CI, Intrinsic::exp); -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - return checkUnaryFloatSignature(*CI, Intrinsic::exp2); -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: - return checkUnaryFloatSignature(*CI, Intrinsic::log); -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: - return checkUnaryFloatSignature(*CI, Intrinsic::log10); -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - return checkUnaryFloatSignature(*CI, Intrinsic::log2); -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - return checkUnaryFloatSignature(*CI, Intrinsic::fabs); -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - return checkBinaryFloatSignature(*CI, Intrinsic::minnum); -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - return checkBinaryFloatSignature(*CI, Intrinsic::maxnum); -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - return checkBinaryFloatSignature(*CI, Intrinsic::copysign); -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - return checkUnaryFloatSignature(*CI, Intrinsic::floor); -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - return checkUnaryFloatSignature(*CI, Intrinsic::ceil); -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - return checkUnaryFloatSignature(*CI, Intrinsic::trunc); -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - return checkUnaryFloatSignature(*CI, Intrinsic::rint); -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - return checkUnaryFloatSignature(*CI, Intrinsic::nearbyint); -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - return checkUnaryFloatSignature(*CI, Intrinsic::round); -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return checkBinaryFloatSignature(*CI, Intrinsic::pow); - } - -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -index a8d4d296..da81eabd 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -@@ -1379,7 +1379,7 @@ bool FastISel::selectInstruction(const Instruction *I) { - - if (const auto *Call = dyn_cast(I)) { - const Function *F = Call->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - - // As a special case, don't handle calls to builtin library functions that - // may be translated directly to target instructions. -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -index 7f64d7b4..44800eca 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -@@ -6125,15 +6125,15 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - - // Check for well-known libc/libm calls. If the function is internal, it - // can't be a library call. -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { - switch (Func) { - default: break; -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - if (I.getNumArgOperands() == 2 && // Basic sanity checks. - I.getArgOperand(0)->getType()->isFloatingPointTy() && - I.getType() == I.getArgOperand(0)->getType() && -@@ -6146,118 +6146,118 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - return; - } - break; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - if (visitUnaryFloatCall(I, ISD::FABS)) - return; - break; -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - if (visitBinaryFloatCall(I, ISD::FMINNUM)) - return; - break; -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - if (visitBinaryFloatCall(I, ISD::FMAXNUM)) - return; - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - if (visitUnaryFloatCall(I, ISD::FSIN)) - return; - break; -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - if (visitUnaryFloatCall(I, ISD::FCOS)) - return; - break; -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: -- case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: -+ case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: - if (visitUnaryFloatCall(I, ISD::FSQRT)) - return; - break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - if (visitUnaryFloatCall(I, ISD::FFLOOR)) - return; - break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - if (visitUnaryFloatCall(I, ISD::FNEARBYINT)) - return; - break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - if (visitUnaryFloatCall(I, ISD::FCEIL)) - return; - break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - if (visitUnaryFloatCall(I, ISD::FRINT)) - return; - break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - if (visitUnaryFloatCall(I, ISD::FROUND)) - return; - break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - if (visitUnaryFloatCall(I, ISD::FTRUNC)) - return; - break; -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - if (visitUnaryFloatCall(I, ISD::FLOG2)) - return; - break; -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - if (visitUnaryFloatCall(I, ISD::FEXP2)) - return; - break; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - if (visitMemCmpCall(I)) - return; - break; -- case LibFunc::memchr: -+ case LibFunc_memchr: - if (visitMemChrCall(I)) - return; - break; -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - if (visitStrCpyCall(I, false)) - return; - break; -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - if (visitStrCpyCall(I, true)) - return; - break; -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - if (visitStrCmpCall(I)) - return; - break; -- case LibFunc::strlen: -+ case LibFunc_strlen: - if (visitStrLenCall(I)) - return; - break; -- case LibFunc::strnlen: -+ case LibFunc_strnlen: - if (visitStrNLenCall(I)) - return; - break; -diff --git a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -index bed784a5..5110cddd 100644 ---- a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -+++ b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -@@ -63,9 +63,9 @@ private: - - // TargetLibraryInfo has info on C runtime library calls on the current - // target. -- for (unsigned I = 0, E = static_cast(LibFunc::NumLibFuncs); -+ for (unsigned I = 0, E = static_cast(NumLibFuncs); - I != E; ++I) { -- LibFunc::Func F = static_cast(I); -+ LibFunc F = static_cast(I); - if (TLI.has(F)) - Libcalls.insert(TLI.getName(F)); - } -diff --git a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -index b6ac4d54..10f1f20e 100644 ---- a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -+++ b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -@@ -313,7 +313,7 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - // (i.e. soft float or atomics). If adapting for targets that do, - // additional care is required here. - -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && LibInfo && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { -@@ -327,42 +327,42 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - - switch (Func) { - default: return true; -- case LibFunc::copysign: -- case LibFunc::copysignf: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: - continue; // ISD::FCOPYSIGN is never a library call. -- case LibFunc::copysignl: -+ case LibFunc_copysignl: - return true; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - continue; // ISD::FABS is never a library call. -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - Opcode = ISD::FSQRT; break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - Opcode = ISD::FFLOOR; break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - Opcode = ISD::FNEARBYINT; break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - Opcode = ISD::FCEIL; break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - Opcode = ISD::FRINT; break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - Opcode = ISD::FROUND; break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - Opcode = ISD::FTRUNC; break; - } - -diff --git a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -index 29d2c99f..f258f38a 100644 ---- a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -+++ b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -@@ -3067,7 +3067,7 @@ bool GlobalOpt::OptimizeGlobalAliases(Module &M) { - } - - static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { -- LibFunc::Func F = LibFunc::cxa_atexit; -+ LibFunc F = LibFunc_cxa_atexit; - if (!TLI->has(F)) - return nullptr; - -@@ -3076,7 +3076,7 @@ static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { - return nullptr; - - // Make sure that the function has the correct prototype. -- if (!TLI->getLibFunc(*Fn, F) || F != LibFunc::cxa_atexit) -+ if (!TLI->getLibFunc(*Fn, F) || F != LibFunc_cxa_atexit) - return nullptr; - - return Fn; -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -index 36ad0a5f..2a644844 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -@@ -176,20 +176,20 @@ static bool hasMemoryWrite(Instruction *I, const TargetLibraryInfo &TLI) { - } - if (auto CS = CallSite(I)) { - if (Function *F = CS.getCalledFunction()) { -- if (TLI.has(LibFunc::strcpy) && -- F->getName() == TLI.getName(LibFunc::strcpy)) { -+ if (TLI.has(LibFunc_strcpy) && -+ F->getName() == TLI.getName(LibFunc_strcpy)) { - return true; - } -- if (TLI.has(LibFunc::strncpy) && -- F->getName() == TLI.getName(LibFunc::strncpy)) { -+ if (TLI.has(LibFunc_strncpy) && -+ F->getName() == TLI.getName(LibFunc_strncpy)) { - return true; - } -- if (TLI.has(LibFunc::strcat) && -- F->getName() == TLI.getName(LibFunc::strcat)) { -+ if (TLI.has(LibFunc_strcat) && -+ F->getName() == TLI.getName(LibFunc_strcat)) { - return true; - } -- if (TLI.has(LibFunc::strncat) && -- F->getName() == TLI.getName(LibFunc::strncat)) { -+ if (TLI.has(LibFunc_strncat) && -+ F->getName() == TLI.getName(LibFunc_strncat)) { - return true; - } - } -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -index fa87b5b1..e13fd802 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -@@ -210,9 +210,9 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L, LPPassManager &LPM) { - *CurLoop->getHeader()->getParent()); - DL = &CurLoop->getHeader()->getModule()->getDataLayout(); - -- HasMemset = TLI->has(LibFunc::memset); -- HasMemsetPattern = TLI->has(LibFunc::memset_pattern16); -- HasMemcpy = TLI->has(LibFunc::memcpy); -+ HasMemset = TLI->has(LibFunc_memset); -+ HasMemsetPattern = TLI->has(LibFunc_memset_pattern16); -+ HasMemcpy = TLI->has(LibFunc_memcpy); - - if (HasMemset || HasMemsetPattern || HasMemcpy) - if (SE->hasLoopInvariantBackedgeTakenCount(L)) -@@ -489,7 +489,7 @@ bool LoopIdiomRecognize::processLoopMemSet(MemSetInst *MSI, - return false; - - // If we're not allowed to hack on memset, we fail. -- if (!TLI->has(LibFunc::memset)) -+ if (!TLI->has(LibFunc_memset)) - return false; - - Value *Pointer = MSI->getDest(); -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -index 6b43b0f7..d4fd8ce4 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -@@ -1144,7 +1144,7 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) { - bool MemCpyOpt::processMemMove(MemMoveInst *M) { - AliasAnalysis &AA = getAnalysis().getAAResults(); - -- if (!TLI->has(LibFunc::memmove)) -+ if (!TLI->has(LibFunc_memmove)) - return false; - - // See if the pointers alias. -@@ -1290,7 +1290,7 @@ bool MemCpyOpt::runOnFunction(Function &F) { - // If we don't have at least memset and memcpy, there is little point of doing - // anything here. These are required by a freestanding implementation, so if - // even they are disabled, there is no point in trying hard. -- if (!TLI->has(LibFunc::memset) || !TLI->has(LibFunc::memcpy)) -+ if (!TLI->has(LibFunc_memset) || !TLI->has(LibFunc_memcpy)) - return false; - - while (1) { -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -index 9f26f788..aa08538a 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -@@ -77,14 +77,14 @@ bool PartiallyInlineLibCalls::runOnFunction(Function &F) { - - // Skip if function either has local linkage or is not a known library - // function. -- LibFunc::Func LibFunc; -+ LibFunc LF; - if (CalledFunc->hasLocalLinkage() || !CalledFunc->hasName() || -- !TLI->getLibFunc(CalledFunc->getName(), LibFunc)) -+ !TLI->getLibFunc(CalledFunc->getName(), LF)) - continue; - -- switch (LibFunc) { -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -+ switch (LF) { -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: - if (TTI->haveFastSqrt(Call->getType()) && - optimizeSQRT(Call, CalledFunc, *CurrBB, BB)) - break; -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -index 85d0299d..5b6dbdfd 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -@@ -107,254 +107,254 @@ static bool setNonNull(Function &F, unsigned n) { - } - - bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { -- LibFunc::Func TheLibFunc; -+ LibFunc TheLibFunc; - if (!(TLI.getLibFunc(F, TheLibFunc) && TLI.has(TheLibFunc))) - return false; - - bool Changed = false; - switch (TheLibFunc) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -- case LibFunc::strcat: -- case LibFunc::strncat: -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: -+ case LibFunc_strcat: -+ case LibFunc_strncat: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strcmp: // 0,1 -- case LibFunc::strspn: // 0,1 -- case LibFunc::strncmp: // 0,1 -- case LibFunc::strcspn: // 0,1 -- case LibFunc::strcoll: // 0,1 -- case LibFunc::strcasecmp: // 0,1 -- case LibFunc::strncasecmp: // -+ case LibFunc_strcmp: // 0,1 -+ case LibFunc_strspn: // 0,1 -+ case LibFunc_strncmp: // 0,1 -+ case LibFunc_strcspn: // 0,1 -+ case LibFunc_strcoll: // 0,1 -+ case LibFunc_strcasecmp: // 0,1 -+ case LibFunc_strncasecmp: // - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strstr: -- case LibFunc::strpbrk: -+ case LibFunc_strstr: -+ case LibFunc_strpbrk: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::scanf: -+ case LibFunc_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::system: -+ case LibFunc_system: - // May throw; "system" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::malloc: -+ case LibFunc_malloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memcpy: -- case LibFunc::memccpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memccpy: -+ case LibFunc_memmove: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::memalign: -+ case LibFunc_memalign: - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::mkdir: -+ case LibFunc_mkdir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::mktime: -+ case LibFunc_mktime: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::realloc: -+ case LibFunc_realloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::read: -+ case LibFunc_read: - // May throw; "read" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::rewind: -+ case LibFunc_rewind: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::rename: -+ case LibFunc_rename: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::readlink: -+ case LibFunc_readlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::write: -+ case LibFunc_write: - // May throw; "write" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::bzero: -+ case LibFunc_bzero: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::calloc: -+ case LibFunc_calloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::chmod: -- case LibFunc::chown: -+ case LibFunc_chmod: -+ case LibFunc_chown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ctermid: -- case LibFunc::clearerr: -- case LibFunc::closedir: -+ case LibFunc_ctermid: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atof: -- case LibFunc::atoll: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atof: -+ case LibFunc_atoll: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::access: -+ case LibFunc_access: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fopen: -+ case LibFunc_fopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -362,150 +362,150 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::feof: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::ftell: -- case LibFunc::fgetc: -- case LibFunc::fseeko: -- case LibFunc::ftello: -- case LibFunc::fileno: -- case LibFunc::fflush: -- case LibFunc::fclose: -- case LibFunc::fsetpos: -- case LibFunc::flockfile: -- case LibFunc::funlockfile: -- case LibFunc::ftrylockfile: -+ case LibFunc_feof: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_ftell: -+ case LibFunc_fgetc: -+ case LibFunc_fseeko: -+ case LibFunc_ftello: -+ case LibFunc_fileno: -+ case LibFunc_fflush: -+ case LibFunc_fclose: -+ case LibFunc_fsetpos: -+ case LibFunc_flockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_ftrylockfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::ferror: -+ case LibFunc_ferror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F); - return Changed; -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::fgets: -+ case LibFunc_fgets: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 3); - return Changed; -- case LibFunc::fread: -+ case LibFunc_fread: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - // FIXME: readonly #1? - return Changed; -- case LibFunc::fputs: -+ case LibFunc_fputs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getc: -- case LibFunc::getlogin_r: -- case LibFunc::getc_unlocked: -+ case LibFunc_getc: -+ case LibFunc_getlogin_r: -+ case LibFunc_getc_unlocked: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::getenv: -+ case LibFunc_getenv: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::gets: -- case LibFunc::getchar: -+ case LibFunc_gets: -+ case LibFunc_getchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::getitimer: -+ case LibFunc_getitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getpwnam: -+ case LibFunc_getpwnam: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::uname: -+ case LibFunc_uname: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::unlink: -+ case LibFunc_unlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::unsetenv: -+ case LibFunc_unsetenv: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putc: -+ case LibFunc_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::puts: -- case LibFunc::printf: -- case LibFunc::perror: -+ case LibFunc_puts: -+ case LibFunc_printf: -+ case LibFunc_perror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::pread: -+ case LibFunc_pread: - // May throw; "pread" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::pwrite: -+ case LibFunc_pwrite: - // May throw; "pwrite" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putchar: -+ case LibFunc_putchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::popen: -+ case LibFunc_popen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -513,132 +513,132 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::pclose: -+ case LibFunc_pclose: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::valloc: -+ case LibFunc_valloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::open: -+ case LibFunc_open: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::opendir: -+ case LibFunc_opendir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::times: -+ case LibFunc_times: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAccessMemory(F); - return Changed; -- case LibFunc::lstat: -+ case LibFunc_lstat: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::lchown: -+ case LibFunc_lchown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::qsort: -+ case LibFunc_qsort: - // May throw; places call through function pointer. - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::under_IO_getc: -+ case LibFunc_under_IO_getc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -646,26 +646,26 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fseeko64: -- case LibFunc::ftello64: -+ case LibFunc_fseeko64: -+ case LibFunc_ftello64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::open64: -+ case LibFunc_open64: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - // Currently some platforms have the restrict keyword on the arguments to - // gettimeofday. To be conservative, do not add noalias to gettimeofday's - // arguments. -@@ -673,22 +673,22 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::Znwj: // new(unsigned int) -- case LibFunc::Znwm: // new(unsigned long) -- case LibFunc::Znaj: // new[](unsigned int) -- case LibFunc::Znam: // new[](unsigned long) -- case LibFunc::msvc_new_int: // new(unsigned int) -- case LibFunc::msvc_new_longlong: // new(unsigned long long) -- case LibFunc::msvc_new_array_int: // new[](unsigned int) -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long) -+ case LibFunc_Znwj: // new(unsigned int) -+ case LibFunc_Znwm: // new(unsigned long) -+ case LibFunc_Znaj: // new[](unsigned int) -+ case LibFunc_Znam: // new[](unsigned long) -+ case LibFunc_msvc_new_int: // new(unsigned int) -+ case LibFunc_msvc_new_longlong: // new(unsigned long long) -+ case LibFunc_msvc_new_array_int: // new[](unsigned int) -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long) - // Operator new always returns a nonnull noalias pointer - Changed |= setNonNull(F, AttributeSet::ReturnIndex); - Changed |= setDoesNotAlias(F, AttributeSet::ReturnIndex); - return Changed; - //TODO: add LibFunc entries for: -- //case LibFunc::memset_pattern4: -- //case LibFunc::memset_pattern8: -- case LibFunc::memset_pattern16: -+ //case LibFunc_memset_pattern4: -+ //case LibFunc_memset_pattern8: -+ case LibFunc_memset_pattern16: - Changed |= setOnlyAccessesArgMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); -@@ -711,7 +711,7 @@ Value *llvm::castToCStr(Value *V, IRBuilder<> &B) { - - Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strlen)) -+ if (!TLI->has(LibFunc_strlen)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -728,7 +728,7 @@ Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - - Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strchr)) -+ if (!TLI->has(LibFunc_strchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -746,7 +746,7 @@ Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - - Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strncmp)) -+ if (!TLI->has(LibFunc_strncmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -766,7 +766,7 @@ Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - - Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strcpy)) -+ if (!TLI->has(LibFunc_strcpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -782,7 +782,7 @@ Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - - Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strncpy)) -+ if (!TLI->has(LibFunc_strncpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -800,7 +800,7 @@ Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcpy_chk)) -+ if (!TLI->has(LibFunc_memcpy_chk)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -822,7 +822,7 @@ Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - - Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memchr)) -+ if (!TLI->has(LibFunc_memchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -841,7 +841,7 @@ Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - - Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcmp)) -+ if (!TLI->has(LibFunc_memcmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -909,7 +909,7 @@ Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name, - - Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::putchar)) -+ if (!TLI->has(LibFunc_putchar)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -929,7 +929,7 @@ Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - - Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::puts)) -+ if (!TLI->has(LibFunc_puts)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -944,7 +944,7 @@ Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - - Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputc)) -+ if (!TLI->has(LibFunc_fputc)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -963,11 +963,11 @@ Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - - Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputs)) -+ if (!TLI->has(LibFunc_fputs)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -- StringRef FPutsName = TLI->getName(LibFunc::fputs); -+ StringRef FPutsName = TLI->getName(LibFunc_fputs); - Constant *F = M->getOrInsertFunction( - FPutsName, B.getInt32Ty(), B.getInt8PtrTy(), File->getType(), nullptr); - if (File->getType()->isPointerTy()) -@@ -981,12 +981,12 @@ Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - - Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fwrite)) -+ if (!TLI->has(LibFunc_fwrite)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); - LLVMContext &Context = B.GetInsertBlock()->getContext(); -- StringRef FWriteName = TLI->getName(LibFunc::fwrite); -+ StringRef FWriteName = TLI->getName(LibFunc_fwrite); - Constant *F = M->getOrInsertFunction( - FWriteName, DL.getIntPtrType(Context), B.getInt8PtrTy(), - DL.getIntPtrType(Context), DL.getIntPtrType(Context), File->getType(), -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -index 7bdc00c7..ec7937fc 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -@@ -308,7 +308,7 @@ bool llvm::obfuscateModule(Module &M, const TargetMachine *TM, Obfuscator &obfs, - TargetLibraryInfoImpl TLII(Triple(M.getTargetTriple())); - TargetLibraryInfo TLI(TLII); - auto isLibName = [&TLI](StringRef &S) { -- LibFunc::Func F; -+ LibFunc F; - return TLI.getLibFunc(S, F); - }; - -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -index fecded3c..b3238cbb 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -@@ -52,9 +52,9 @@ static cl::opt - // Helper Functions - //===----------------------------------------------------------------------===// - --static bool ignoreCallingConv(LibFunc::Func Func) { -- return Func == LibFunc::abs || Func == LibFunc::labs || -- Func == LibFunc::llabs || Func == LibFunc::strlen; -+static bool ignoreCallingConv(LibFunc Func) { -+ return Func == LibFunc_abs || Func == LibFunc_labs || -+ Func == LibFunc_llabs || Func == LibFunc_strlen; - } - - /// Return true if it only matters that the value is equal or not-equal to zero. -@@ -92,8 +92,8 @@ static bool callHasFloatingPointArgument(const CallInst *CI) { - /// \brief Check whether the overloaded unary floating point function - /// corresponding to \a Ty is available. - static bool hasUnaryFloatFn(const TargetLibraryInfo *TLI, Type *Ty, -- LibFunc::Func DoubleFn, LibFunc::Func FloatFn, -- LibFunc::Func LongDoubleFn) { -+ LibFunc DoubleFn, LibFunc FloatFn, -+ LibFunc LongDoubleFn) { - switch (Ty->getTypeID()) { - case Type::FloatTyID: - return TLI->has(FloatFn); -@@ -896,15 +896,15 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return Op1C; - // pow(2.0, x) -> exp2(x) - if (Op1C->isExactlyValue(2.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f, -- LibFunc::exp2l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp2), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp2, LibFunc_exp2f, -+ LibFunc_exp2l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp2), B, - Callee->getAttributes()); - // pow(10.0, x) -> exp10(x) - if (Op1C->isExactlyValue(10.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f, -- LibFunc::exp10l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp10, LibFunc_exp10f, -+ LibFunc_exp10l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp10), B, - Callee->getAttributes()); - } - -@@ -916,10 +916,10 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - // pow(exp(x), y) = pow(inf, 0.001) = inf, whereas exp(x*y) = exp(1). - auto *OpC = dyn_cast(Op1); - if (OpC && OpC->hasUnsafeAlgebra() && CI->hasUnsafeAlgebra()) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *OpCCallee = OpC->getCalledFunction(); - if (OpCCallee && TLI->getLibFunc(OpCCallee->getName(), Func) && -- TLI->has(Func) && (Func == LibFunc::exp || Func == LibFunc::exp2)) { -+ TLI->has(Func) && (Func == LibFunc_exp || Func == LibFunc_exp2)) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); - Value *FMul = B.CreateFMul(OpC->getArgOperand(0), Op2, "mul"); -@@ -936,16 +936,16 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return ConstantFP::get(CI->getType(), 1.0); - - if (Op2C->isExactlyValue(0.5) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::sqrt, LibFunc::sqrtf, -- LibFunc::sqrtl) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::fabs, LibFunc::fabsf, -- LibFunc::fabsl)) { -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_sqrt, LibFunc_sqrtf, -+ LibFunc_sqrtl) && -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_fabs, LibFunc_fabsf, -+ LibFunc_fabsl)) { - - // In -ffast-math, pow(x, 0.5) -> sqrt(x). - if (CI->hasUnsafeAlgebra()) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); -- return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B, -+ return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc_sqrt), B, - Callee->getAttributes()); - } - -@@ -1018,11 +1018,11 @@ Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilder<> &B) { - Value *Op = CI->getArgOperand(0); - // Turn exp2(sitofp(x)) -> ldexp(1.0, sext(x)) if sizeof(x) <= 32 - // Turn exp2(uitofp(x)) -> ldexp(1.0, zext(x)) if sizeof(x) < 32 -- LibFunc::Func LdExp = LibFunc::ldexpl; -+ LibFunc LdExp = LibFunc_ldexpl; - if (Op->getType()->isFloatTy()) -- LdExp = LibFunc::ldexpf; -+ LdExp = LibFunc_ldexpf; - else if (Op->getType()->isDoubleTy()) -- LdExp = LibFunc::ldexp; -+ LdExp = LibFunc_ldexp; - - if (TLI->has(LdExp)) { - Value *LdExpArg = nullptr; -@@ -1153,17 +1153,17 @@ Value *LibCallSimplifier::optimizeLog(CallInst *CI, IRBuilder<> &B) { - FMF.setUnsafeAlgebra(); - B.setFastMathFlags(FMF); - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && ((TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- Func == LibFunc::pow) || F->getIntrinsicID() == Intrinsic::pow)) -+ Func == LibFunc_pow) || F->getIntrinsicID() == Intrinsic::pow)) - return B.CreateFMul(OpC->getArgOperand(1), - emitUnaryFloatFnCall(OpC->getOperand(0), Callee->getName(), B, - Callee->getAttributes()), "mul"); - - // log(exp2(y)) -> y*log(2) - if (F && Name == "log" && TLI->getLibFunc(F->getName(), Func) && -- TLI->has(Func) && Func == LibFunc::exp2) -+ TLI->has(Func) && Func == LibFunc_exp2) - return B.CreateFMul( - OpC->getArgOperand(0), - emitUnaryFloatFnCall(ConstantFP::get(CI->getType(), 2.0), -@@ -1176,7 +1176,7 @@ Value *LibCallSimplifier::optimizeSqrt(CallInst *CI, IRBuilder<> &B) { - Function *Callee = CI->getCalledFunction(); - - Value *Ret = nullptr; -- if (TLI->has(LibFunc::sqrtf) && (Callee->getName() == "sqrt" || -+ if (TLI->has(LibFunc_sqrtf) && (Callee->getName() == "sqrt" || - Callee->getIntrinsicID() == Intrinsic::sqrt)) - Ret = optimizeUnaryDoubleFP(CI, B, true); - -@@ -1275,12 +1275,12 @@ Value *LibCallSimplifier::optimizeTan(CallInst *CI, IRBuilder<> &B) { - // tan(atan(x)) -> x - // tanf(atanf(x)) -> x - // tanl(atanl(x)) -> x -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- ((Func == LibFunc::atan && Callee->getName() == "tan") || -- (Func == LibFunc::atanf && Callee->getName() == "tanf") || -- (Func == LibFunc::atanl && Callee->getName() == "tanl"))) -+ ((Func == LibFunc_atan && Callee->getName() == "tan") || -+ (Func == LibFunc_atanf && Callee->getName() == "tanf") || -+ (Func == LibFunc_atanl && Callee->getName() == "tanl"))) - Ret = OpC->getArgOperand(0); - return Ret; - } -@@ -1348,24 +1348,24 @@ LibCallSimplifier::classifyArgUse(Value *Val, Function *F, bool IsFloat, - return; - - Function *Callee = CI->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - if (!Callee || !TLI->getLibFunc(*Callee, Func) || !TLI->has(Func) || - !isTrigLibCall(CI)) - return; - - if (IsFloat) { -- if (Func == LibFunc::sinpif) -+ if (Func == LibFunc_sinpif) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospif) -+ else if (Func == LibFunc_cospif) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospif_stret) -+ else if (Func == LibFunc_sincospif_stret) - SinCosCalls.push_back(CI); - } else { -- if (Func == LibFunc::sinpi) -+ if (Func == LibFunc_sinpi) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospi) -+ else if (Func == LibFunc_cospi) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospi_stret) -+ else if (Func == LibFunc_sincospi_stret) - SinCosCalls.push_back(CI); - } - } -@@ -1595,7 +1595,7 @@ Value *LibCallSimplifier::optimizePrintF(CallInst *CI, IRBuilder<> &B) { - - // printf(format, ...) -> iprintf(format, ...) if no floating point - // arguments. -- if (TLI->has(LibFunc::iprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_iprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *IPrintFFn = - M->getOrInsertFunction("iprintf", FT, Callee->getAttributes()); -@@ -1676,7 +1676,7 @@ Value *LibCallSimplifier::optimizeSPrintF(CallInst *CI, IRBuilder<> &B) { - - // sprintf(str, format, ...) -> siprintf(str, format, ...) if no floating - // point arguments. -- if (TLI->has(LibFunc::siprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_siprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *SIPrintFFn = - M->getOrInsertFunction("siprintf", FT, Callee->getAttributes()); -@@ -1746,7 +1746,7 @@ Value *LibCallSimplifier::optimizeFPrintF(CallInst *CI, IRBuilder<> &B) { - - // fprintf(stream, format, ...) -> fiprintf(stream, format, ...) if no - // floating point arguments. -- if (TLI->has(LibFunc::fiprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_fiprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *FIPrintFFn = - M->getOrInsertFunction("fiprintf", FT, Callee->getAttributes()); -@@ -1820,7 +1820,7 @@ Value *LibCallSimplifier::optimizePuts(CallInst *CI, IRBuilder<> &B) { - } - - bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { -- LibFunc::Func Func; -+ LibFunc Func; - SmallString<20> FloatFuncName = FuncName; - FloatFuncName += 'f'; - if (TLI->getLibFunc(FloatFuncName, Func)) -@@ -1830,7 +1830,7 @@ bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { - - Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - IRBuilder<> &Builder) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - // Check for string/memory library functions. - if (TLI->getLibFunc(*Callee, Func) && TLI->has(Func)) { -@@ -1839,51 +1839,51 @@ Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - CI->getCallingConv() == llvm::CallingConv::C) && - "Optimizing string/memory libcall would change the calling convention"); - switch (Func) { -- case LibFunc::strcat: -+ case LibFunc_strcat: - return optimizeStrCat(CI, Builder); -- case LibFunc::strncat: -+ case LibFunc_strncat: - return optimizeStrNCat(CI, Builder); -- case LibFunc::strchr: -+ case LibFunc_strchr: - return optimizeStrChr(CI, Builder); -- case LibFunc::strrchr: -+ case LibFunc_strrchr: - return optimizeStrRChr(CI, Builder); -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return optimizeStrCmp(CI, Builder); -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return optimizeStrNCmp(CI, Builder); -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - return optimizeStrCpy(CI, Builder); -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - return optimizeStpCpy(CI, Builder); -- case LibFunc::strncpy: -+ case LibFunc_strncpy: - return optimizeStrNCpy(CI, Builder); -- case LibFunc::strlen: -+ case LibFunc_strlen: - return optimizeStrLen(CI, Builder); -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return optimizeStrPBrk(CI, Builder); -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return optimizeStrTo(CI, Builder); -- case LibFunc::strspn: -+ case LibFunc_strspn: - return optimizeStrSpn(CI, Builder); -- case LibFunc::strcspn: -+ case LibFunc_strcspn: - return optimizeStrCSpn(CI, Builder); -- case LibFunc::strstr: -+ case LibFunc_strstr: - return optimizeStrStr(CI, Builder); -- case LibFunc::memchr: -+ case LibFunc_memchr: - return optimizeMemChr(CI, Builder); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return optimizeMemCmp(CI, Builder); -- case LibFunc::memcpy: -+ case LibFunc_memcpy: - return optimizeMemCpy(CI, Builder); -- case LibFunc::memmove: -+ case LibFunc_memmove: - return optimizeMemMove(CI, Builder); -- case LibFunc::memset: -+ case LibFunc_memset: - return optimizeMemSet(CI, Builder); - default: - break; -@@ -1896,7 +1896,7 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (CI->isNoBuiltin()) - return nullptr; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - StringRef FuncName = Callee->getName(); - -@@ -1957,110 +1957,110 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (Value *V = optimizeStringMemoryLibCall(CI, Builder)) - return V; - switch (Func) { -- case LibFunc::cosf: -- case LibFunc::cos: -- case LibFunc::cosl: -+ case LibFunc_cosf: -+ case LibFunc_cos: -+ case LibFunc_cosl: - return optimizeCos(CI, Builder); -- case LibFunc::sinpif: -- case LibFunc::sinpi: -- case LibFunc::cospif: -- case LibFunc::cospi: -+ case LibFunc_sinpif: -+ case LibFunc_sinpi: -+ case LibFunc_cospif: -+ case LibFunc_cospi: - return optimizeSinCosPi(CI, Builder); -- case LibFunc::powf: -- case LibFunc::pow: -- case LibFunc::powl: -+ case LibFunc_powf: -+ case LibFunc_pow: -+ case LibFunc_powl: - return optimizePow(CI, Builder); -- case LibFunc::exp2l: -- case LibFunc::exp2: -- case LibFunc::exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: - return optimizeExp2(CI, Builder); -- case LibFunc::fabsf: -- case LibFunc::fabs: -- case LibFunc::fabsl: -+ case LibFunc_fabsf: -+ case LibFunc_fabs: -+ case LibFunc_fabsl: - return optimizeFabs(CI, Builder); -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -- case LibFunc::sqrtl: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtl: - return optimizeSqrt(CI, Builder); -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: - return optimizeFFS(CI, Builder); -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return optimizeAbs(CI, Builder); -- case LibFunc::isdigit: -+ case LibFunc_isdigit: - return optimizeIsDigit(CI, Builder); -- case LibFunc::isascii: -+ case LibFunc_isascii: - return optimizeIsAscii(CI, Builder); -- case LibFunc::toascii: -+ case LibFunc_toascii: - return optimizeToAscii(CI, Builder); -- case LibFunc::printf: -+ case LibFunc_printf: - return optimizePrintF(CI, Builder); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return optimizeSPrintF(CI, Builder); -- case LibFunc::fprintf: -+ case LibFunc_fprintf: - return optimizeFPrintF(CI, Builder); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return optimizeFWrite(CI, Builder); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return optimizeFPuts(CI, Builder); -- case LibFunc::log: -- case LibFunc::log10: -- case LibFunc::log1p: -- case LibFunc::log2: -- case LibFunc::logb: -+ case LibFunc_log: -+ case LibFunc_log10: -+ case LibFunc_log1p: -+ case LibFunc_log2: -+ case LibFunc_logb: - return optimizeLog(CI, Builder); -- case LibFunc::puts: -+ case LibFunc_puts: - return optimizePuts(CI, Builder); -- case LibFunc::tan: -- case LibFunc::tanf: -- case LibFunc::tanl: -+ case LibFunc_tan: -+ case LibFunc_tanf: -+ case LibFunc_tanl: - return optimizeTan(CI, Builder); -- case LibFunc::perror: -+ case LibFunc_perror: - return optimizeErrorReporting(CI, Builder); -- case LibFunc::vfprintf: -- case LibFunc::fiprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_fiprintf: - return optimizeErrorReporting(CI, Builder, 0); -- case LibFunc::fputc: -+ case LibFunc_fputc: - return optimizeErrorReporting(CI, Builder, 1); -- case LibFunc::ceil: -- case LibFunc::floor: -- case LibFunc::rint: -- case LibFunc::round: -- case LibFunc::nearbyint: -- case LibFunc::trunc: -+ case LibFunc_ceil: -+ case LibFunc_floor: -+ case LibFunc_rint: -+ case LibFunc_round: -+ case LibFunc_nearbyint: -+ case LibFunc_trunc: - if (hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, false); - return nullptr; -- case LibFunc::acos: -- case LibFunc::acosh: -- case LibFunc::asin: -- case LibFunc::asinh: -- case LibFunc::atan: -- case LibFunc::atanh: -- case LibFunc::cbrt: -- case LibFunc::cosh: -- case LibFunc::exp: -- case LibFunc::exp10: -- case LibFunc::expm1: -- case LibFunc::sin: -- case LibFunc::sinh: -- case LibFunc::tanh: -+ case LibFunc_acos: -+ case LibFunc_acosh: -+ case LibFunc_asin: -+ case LibFunc_asinh: -+ case LibFunc_atan: -+ case LibFunc_atanh: -+ case LibFunc_cbrt: -+ case LibFunc_cosh: -+ case LibFunc_exp: -+ case LibFunc_exp10: -+ case LibFunc_expm1: -+ case LibFunc_sin: -+ case LibFunc_sinh: -+ case LibFunc_tanh: - if (UnsafeFPShrink && hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, true); - return nullptr; -- case LibFunc::copysign: -+ case LibFunc_copysign: - if (hasFloatVersion(FuncName)) - return optimizeBinaryDoubleFP(CI, Builder); - return nullptr; -- case LibFunc::fminf: -- case LibFunc::fmin: -- case LibFunc::fminl: -- case LibFunc::fmaxf: -- case LibFunc::fmax: -- case LibFunc::fmaxl: -+ case LibFunc_fminf: -+ case LibFunc_fmin: -+ case LibFunc_fminl: -+ case LibFunc_fmaxf: -+ case LibFunc_fmax: -+ case LibFunc_fmaxl: - return optimizeFMinFMax(CI, Builder); - default: - return nullptr; -@@ -2184,7 +2184,7 @@ Value *FortifiedLibCallSimplifier::optimizeMemSetChk(CallInst *CI, - - Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - const DataLayout &DL = CI->getModule()->getDataLayout(); -@@ -2192,7 +2192,7 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - *ObjSize = CI->getArgOperand(2); - - // __stpcpy_chk(x,x,...) -> x+strlen(x) -- if (Func == LibFunc::stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { -+ if (Func == LibFunc_stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { - Value *StrLen = emitStrLen(Src, B, DL, TLI); - return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr; - } -@@ -2218,14 +2218,14 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - Value *Ret = emitMemCpyChk(Dst, Src, LenV, ObjSize, B, DL, TLI); - // If the function was an __stpcpy_chk, and we were able to fold it into - // a __memcpy_chk, we still need to return the correct end pointer. -- if (Ret && Func == LibFunc::stpcpy_chk) -+ if (Ret && Func == LibFunc_stpcpy_chk) - return B.CreateGEP(B.getInt8Ty(), Dst, ConstantInt::get(SizeTTy, Len - 1)); - return Ret; - } - - Value *FortifiedLibCallSimplifier::optimizeStrpNCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - if (isFortifiedCallFoldable(CI, 3, 2, false)) { -@@ -2250,7 +2250,7 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - // - // PR23093. - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - - SmallVector OpBundles; -@@ -2268,17 +2268,17 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - return nullptr; - - switch (Func) { -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - return optimizeMemCpyChk(CI, Builder); -- case LibFunc::memmove_chk: -+ case LibFunc_memmove_chk: - return optimizeMemMoveChk(CI, Builder); -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - return optimizeMemSetChk(CI, Builder); -- case LibFunc::stpcpy_chk: -- case LibFunc::strcpy_chk: -+ case LibFunc_stpcpy_chk: -+ case LibFunc_strcpy_chk: - return optimizeStrpCpyChk(CI, Builder, Func); -- case LibFunc::stpncpy_chk: -- case LibFunc::strncpy_chk: -+ case LibFunc_stpncpy_chk: -+ case LibFunc_strncpy_chk: - return optimizeStrpNCpyChk(CI, Builder, Func); - default: - break; diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_musl.patch new file mode 120000 index 00000000000..435ae951cdc --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/libtapi_musl.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_musl.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/mingw_gcc710_i686.patch deleted file mode 100644 index 954f6ce3d60..00000000000 --- a/0_RootFS/GCCBootstrap@7/bundled/patches/mingw_gcc710_i686.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 431ac2a912708546cd7271332e9331399e66bc62 Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Wed, 3 May 2017 15:52:32 +0800 -Subject: [PATCH] winpthreads/src/dll_math.c: Implement `__divmoddi4()' for GCC - 7. - -GCC targeting i686 _may_ generate an external call to the function in -question when divding a 64-bit (DIMode) integer with another one. -Since we are linking against a fake libgcc, we have to implement it too. - -Signed-off-by: Liu Hao ---- - .../winpthreads/src/libgcc/dll_math.c | 27 ++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -index e09b481..aeec068 100644 ---- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -@@ -120,6 +120,7 @@ u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); - u_quad_t __udivdi3(u_quad_t a, u_quad_t b); - u_quad_t __umoddi3(u_quad_t a, u_quad_t b); - int __ucmpdi2(u_quad_t a, u_quad_t b); -+quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); - - #endif /* !_LIBKERN_QUAD_H_ */ - -@@ -546,6 +547,32 @@ __umoddi3(a, b) - (void)__qdivrem(a, b, &r); - return (r); - } -+ -+/* -+ * Divide two signed quads. -+ * This function is new in GCC 7. -+ */ -+quad_t -+__divmoddi4(a, b, rem) -+ quad_t a, b, *rem; -+{ -+ u_quad_t ua, ub, uq, ur; -+ int negq, negr; -+ -+ if (a < 0) -+ ua = -(u_quad_t)a, negq = 1, negr = 1; -+ else -+ ua = a, negq = 0, negr = 0; -+ if (b < 0) -+ ub = -(u_quad_t)b, negq ^= 1; -+ else -+ ub = b; -+ uq = __qdivrem(ua, ub, &ur); -+ if (rem) -+ *rem = (negr ? -ur : ur); -+ return (negq ? -uq : uq); -+} -+ - #else - static int __attribute__((unused)) dummy; - #endif /*deined (_X86_) && !defined (__x86_64__)*/ --- -2.7.4 - diff --git a/0_RootFS/GCCBootstrap@7/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@7/bundled/patches/mingw_gcc710_i686.patch new file mode 120000 index 00000000000..94de400d805 --- /dev/null +++ b/0_RootFS/GCCBootstrap@7/bundled/patches/mingw_gcc710_i686.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/mingw_gcc710_i686.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/binutils_freebsd_symbol_versioning.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/binutils_freebsd_symbol_versioning.patch deleted file mode 100644 index 02a73504795..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/binutils_freebsd_symbol_versioning.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc -index 444aef2942..8a3858d32b 100644 ---- a/ld/scripttempl/elf.sc -+++ b/ld/scripttempl/elf.sc -@@ -637,9 +637,9 @@ cat < -Date: Mon Sep 17 10:15:44 2018 +0000 - - GCC 4.8.X is too old to understand the `configure` argument `--with-native-system-header-dir=` - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index b09a763d525..afe7ec1579d 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1504,7 +1504,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) - tmake_file="${tmake_file} i386/t-mingw-w32" - ;; - esac -- native_system_header_dir=/mingw/include -+ native_system_header_dir=/include - target_gtfiles="\$(srcdir)/config/i386/winnt.c" - extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" - case ${target} in -diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h -index 1ac55441725..74641126007 100644 ---- a/gcc/config/i386/mingw32.h -+++ b/gcc/config/i386/mingw32.h -@@ -152,7 +152,7 @@ along with GCC; see the file COPYING3. If not see - - /* Override startfile prefix defaults. */ - #ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/mingw/lib/" -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" - #endif - #ifndef STANDARD_STARTFILE_PREFIX_2 - #define STANDARD_STARTFILE_PREFIX_2 "" -@@ -161,7 +161,7 @@ along with GCC; see the file COPYING3. If not see - /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR - macro contains POSIX-style path. See bug 52947. */ - #undef NATIVE_SYSTEM_HEADER_DIR --#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" -+#define NATIVE_SYSTEM_HEADER_DIR "/include" - - /* Output STRING, a string representing a filename, to FILE. - We canonicalize it to be in Unix format (backslashes are replaced diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/gcc485_mingw_include.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/gcc485_mingw_include.patch new file mode 120000 index 00000000000..a2b50298a2a --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/gcc485_mingw_include.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_mingw_include.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-01.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-01.patch new file mode 120000 index 00000000000..c750d5a8835 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-01.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-01.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-02.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-02.patch new file mode 120000 index 00000000000..c2f8ca9cddb --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-02.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-02.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-03.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-03.patch new file mode 120000 index 00000000000..7f9b18ab810 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-03.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-03.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-04.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-04.patch new file mode 120000 index 00000000000..82f535d0ef6 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-04.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-04.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-05.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-05.patch new file mode 120000 index 00000000000..629c1a71ca7 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-05.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-05.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-06.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-06.patch new file mode 120000 index 00000000000..4682d7d2638 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-06.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-06.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-07.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-07.patch new file mode 120000 index 00000000000..ec0ff4fc245 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-07.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-07.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-08.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-08.patch new file mode 120000 index 00000000000..dd3d8002d07 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-08.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-08.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-09.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-09.patch new file mode 120000 index 00000000000..6160e1ff6c9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-09.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-09.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-10.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-10.patch new file mode 120000 index 00000000000..3b0eb446435 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-10.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-10.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-11.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-11.patch new file mode 120000 index 00000000000..1a8b2b1874a --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-11.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-11.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-12.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-12.patch new file mode 120000 index 00000000000..5c61ae4d308 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-12.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-12.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-13.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-13.patch new file mode 120000 index 00000000000..9fcd14da248 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-13.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-13.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-14.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-14.patch new file mode 120000 index 00000000000..2c105860a79 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-14.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-14.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-15.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-15.patch new file mode 120000 index 00000000000..553e804d24c --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-15.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-15.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-16.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-16.patch new file mode 120000 index 00000000000..45b396e6e16 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-16.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-16.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-17.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-17.patch new file mode 120000 index 00000000000..381198312d8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-17.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-17.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-18.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-18.patch new file mode 120000 index 00000000000..75da139edca --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-18.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-18.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-19.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-19.patch new file mode 120000 index 00000000000..15b94428f84 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-19.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-19.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-20.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-20.patch new file mode 120000 index 00000000000..363da6ff21d --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-20.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-20.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-21.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-21.patch new file mode 120000 index 00000000000..d0b5d34df23 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-21.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-21.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-22.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-22.patch new file mode 120000 index 00000000000..e33401a61ec --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-22.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-22.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-23.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-23.patch new file mode 120000 index 00000000000..e17c24162a4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-23.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-23.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-24.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-24.patch new file mode 120000 index 00000000000..dabf39e7b9c --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-24.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-24.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-25.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-25.patch new file mode 120000 index 00000000000..a1013682f68 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-25.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-25.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-26.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-26.patch new file mode 120000 index 00000000000..9d6541b9b82 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-26.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-26.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-27.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-27.patch new file mode 120000 index 00000000000..b4b0172a637 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-27.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-27.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-28.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-28.patch new file mode 120000 index 00000000000..422f6eab38f --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-28.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-28.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-29.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-29.patch new file mode 120000 index 00000000000..29c53da8ea3 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-29.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-29.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-30.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-30.patch new file mode 120000 index 00000000000..6d532a56d8d --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-30.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-30.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-31.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-31.patch new file mode 120000 index 00000000000..9b06be66e43 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-31.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-31.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-32.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-32.patch new file mode 120000 index 00000000000..ed3e7f02517 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-32.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-32.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-33.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-33.patch new file mode 120000 index 00000000000..468c085f789 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-33.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-33.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-34.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-34.patch new file mode 120000 index 00000000000..58778f0e720 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-34.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-34.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-35.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-35.patch new file mode 120000 index 00000000000..07ea002e01f --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-35.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-35.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-36.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-36.patch new file mode 120000 index 00000000000..3bc5b0034c8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-36.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-36.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-37.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-37.patch new file mode 120000 index 00000000000..84f35423e52 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-37.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-37.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-38.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-38.patch new file mode 120000 index 00000000000..dc2041a6dfe --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-38.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-38.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-39.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-39.patch new file mode 120000 index 00000000000..edcdb4e0660 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-39.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-39.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-40.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-40.patch new file mode 120000 index 00000000000..d6664bac3ae --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-40.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-40.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-41.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-41.patch new file mode 120000 index 00000000000..024e01a1d93 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-41.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-41.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-42.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-42.patch new file mode 120000 index 00000000000..cc626e8bd3e --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-42.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-42.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-43.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-43.patch new file mode 120000 index 00000000000..78508bdced4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-43.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-43.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-44.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-44.patch new file mode 120000 index 00000000000..abc87cc7705 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-44.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-44.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-45.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-45.patch new file mode 120000 index 00000000000..546a75ecf8b --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-45.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-45.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-46.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-46.patch new file mode 120000 index 00000000000..651cb9e3cca --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-46.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-46.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch new file mode 120000 index 00000000000..8c086355317 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-48-ldbl_high.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-48-ldbl_high.patch new file mode 120000 index 00000000000..d6f0ec0b0f2 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc-ppc64le-48-ldbl_high.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-48-ldbl_high.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_aarch64_relocation.patch deleted file mode 100644 index bb9ce8d4e06..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_aarch64_relocation.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c -index d8cdb7e24b..5e6e70a5bf 100644 ---- a/elf/dl-sysdep.c -+++ b/elf/dl-sysdep.c -@@ -108,7 +108,7 @@ _dl_sysdep_start (void **start_argptr, - #endif - - __libc_stack_end = DL_STACK_END (start_argptr); -- DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, INTUSE(_dl_argv), _environ, -+ DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, _dl_argv, _environ, - GLRO(dl_auxv)); - - user_entry = (ElfW(Addr)) ENTRY_POINT; -diff --git a/elf/rtld.c b/elf/rtld.c -index 6dcbabc284..03209d695a 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -83,7 +83,7 @@ int _dl_argc attribute_relro attribute_hidden; - char **_dl_argv attribute_relro = NULL; - unsigned int _dl_skip_args attribute_relro attribute_hidden; - #endif --INTDEF(_dl_argv) -+rtld_hidden_data_def (_dl_argv) - - #ifndef THREAD_SET_STACK_GUARD - /* Only exported for architectures that don't store the stack guard canary -@@ -634,7 +634,7 @@ dlmopen_doit (void *a) - args->map = _dl_open (args->fname, - (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT - | __RTLD_SECURE), -- dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv), -+ dl_main, LM_ID_NEWLM, _dl_argc, _dl_argv, - __environ); - } - -@@ -952,55 +952,55 @@ dl_main (const ElfW(Phdr) *phdr, - GL(dl_rtld_map).l_name = rtld_progname; - - while (_dl_argc > 1) -- if (! strcmp (INTUSE(_dl_argv)[1], "--list")) -+ if (! strcmp (_dl_argv[1], "--list")) - { - mode = list; - GLRO(dl_lazy) = -1; /* This means do no dependency analysis. */ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--verify")) -+ else if (! strcmp (_dl_argv[1], "--verify")) - { - mode = verify; - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-cache")) -+ else if (! strcmp (_dl_argv[1], "--inhibit-cache")) - { - GLRO(dl_inhibit_cache) = 1; - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--library-path") -+ else if (! strcmp (_dl_argv[1], "--library-path") - && _dl_argc > 2) - { -- library_path = INTUSE(_dl_argv)[2]; -+ library_path = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-rpath") -+ else if (! strcmp (_dl_argv[1], "--inhibit-rpath") - && _dl_argc > 2) - { -- GLRO(dl_inhibit_rpath) = INTUSE(_dl_argv)[2]; -+ GLRO(dl_inhibit_rpath) = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--audit") && _dl_argc > 2) -+ else if (! strcmp (_dl_argv[1], "--audit") && _dl_argc > 2) - { -- process_dl_audit (INTUSE(_dl_argv)[2]); -+ process_dl_audit (_dl_argv[2]); - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } - else - break; -@@ -1034,7 +1034,7 @@ of this helper program; chances are you did not intend to run this program.\n\ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - - /* The initialization of _dl_stack_flags done below assumes the - executable's PT_GNU_STACK may have been honored by the kernel, and -@@ -1929,7 +1929,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - ElfW(Addr) loadbase; - lookup_t result; - -- result = _dl_lookup_symbol_x (INTUSE(_dl_argv)[i], main_map, -+ result = _dl_lookup_symbol_x (_dl_argv[i], main_map, - &ref, main_map->l_scope, - NULL, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); -@@ -1937,7 +1937,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - loadbase = LOOKUP_VALUE_ADDRESS (result); - - _dl_printf ("%s found at 0x%0*Zd in object at 0x%0*Zd\n", -- INTUSE(_dl_argv)[i], -+ _dl_argv[i], - (int) sizeof ref->st_value * 2, - (size_t) ref->st_value, - (int) sizeof loadbase * 2, (size_t) loadbase); -diff --git a/ports/sysdeps/aarch64/dl-machine.h b/ports/sysdeps/aarch64/dl-machine.h -index 997c860ccb..09fb09c164 100644 ---- a/ports/sysdeps/aarch64/dl-machine.h -+++ b/ports/sysdeps/aarch64/dl-machine.h -@@ -49,23 +49,10 @@ elf_machine_load_address (void) - /* To figure out the load address we use the definition that for any symbol: - dynamic_addr(symbol) = static_addr(symbol) + load_addr - -- The choice of symbol is arbitrary. The static address we obtain -- by constructing a non GOT reference to the symbol, the dynamic -- address of the symbol we compute using adrp/add to compute the -- symbol's address relative to the PC. */ -- -- ElfW(Addr) static_addr; -- ElfW(Addr) dynamic_addr; -- -- asm (" \n\ -- adrp %1, _dl_start; \n\ -- add %1, %1, #:lo12:_dl_start \n\ -- ldr %w0, 1f \n\ -- b 2f \n\ --1: .word _dl_start \n\ --2: \n\ -- " : "=r" (static_addr), "=r" (dynamic_addr)); -- return dynamic_addr - static_addr; -+ _DYNAMIC sysmbol is used here as its link-time address stored in -+ the special unrelocated first GOT entry. */ -+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; -+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic (); - } - - /* Set up the loaded object described by L so its unrelocated PLT -@@ -169,8 +156,8 @@ _dl_start_user: \n\ - cmp x0, #0 \n\ - bne 1b \n\ - // Update _dl_argv \n\ -- adrp x3, _dl_argv \n\ -- str x2, [x3, #:lo12:_dl_argv] \n\ -+ adrp x3, __GI__dl_argv \n\ -+ str x2, [x3, #:lo12:__GI__dl_argv] \n\ - .L_done_stack_adjust: \n\ - // compute envp \n\ - add x3, x2, x1, lsl #3 \n\ -diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index ffeb093887..051bb4d954 100644 ---- a/sysdeps/generic/ldsodefs.h -+++ b/sysdeps/generic/ldsodefs.h -@@ -649,6 +649,7 @@ extern char **_dl_argv - attribute_relro - #endif - ; -+rtld_hidden_proto (_dl_argv) - #ifdef IS_IN_rtld - extern unsigned int _dl_skip_args attribute_hidden - # ifndef DL_ARGV_NOT_RELRO -@@ -660,15 +661,8 @@ extern unsigned int _dl_skip_args_internal attribute_hidden - attribute_relro - # endif - ; --extern char **_dl_argv_internal attribute_hidden --# ifndef DL_ARGV_NOT_RELRO -- attribute_relro --# endif -- ; --# define rtld_progname (INTUSE(_dl_argv)[0]) --#else --# define rtld_progname _dl_argv[0] - #endif -+# define rtld_progname _dl_argv[0] - - /* Flag set at startup and cleared when the last initializer has run. */ - extern int _dl_starting_up; diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_aarch64_relocation.patch new file mode 120000 index 00000000000..23af0beaecb --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_aarch64_relocation.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_aarch64_relocation.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_arm_gcc_fix.patch deleted file mode 100644 index 4ab50ebcb5e..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_arm_gcc_fix.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/nptl/sysdeps/pthread/unwind-forcedunwind.c -+++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/sysdeps/gnu/unwind-resume.c -+++ b/sysdeps/gnu/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - --- -1.9.4 - diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_arm_gcc_fix.patch new file mode 120000 index 00000000000..13167359553 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_arm_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_arm_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_gcc_version.patch deleted file mode 100644 index 4d894fa9bb4..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_gcc_version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old 2017-07-27 20:01:59.997750069 +0000 -+++ configure 2017-07-27 20:02:54.029053809 +0000 -@@ -5189,7 +5189,7 @@ - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | 4.[0-9]* | 5.[0-9]* | 6.[0-9]* | 7.[0-9]* | 8.[0-9]* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_gcc_version.patch new file mode 120000 index 00000000000..473f7a525d9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_gcc_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_gcc_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_i686_asm.patch deleted file mode 100644 index e2f8c86ec9d..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_i686_asm.patch +++ /dev/null @@ -1,49 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-04-18 -Initial Package Version: 2.11.1 -Upstream Status: Not Submitted -Origin: http://www.eglibc.org/archives/patches/msg00073.html -Description: Fixes the following build problem with GCC-4.5.0: - -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os -./sysdeps/i386/fpu/s_frexp.S: Assembler messages: -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 - -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_i686_asm.patch new file mode 120000 index 00000000000..35f065f0d0d --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_i686_asm.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_i686_asm.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_make_version.patch deleted file mode 100644 index 1c2edd11111..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_make_version.patch +++ /dev/null @@ -1,32 +0,0 @@ -commit 30f1989e789515790343811e1d333a903ffb84a0 -Author: Elliot Saba -Date: Tue Sep 18 08:50:46 2018 +0000 - - Include `make` v4.X as valid in configure version check - -diff --git a/configure b/configure -index 8799b7de78..b8bf4e07f6 100755 ---- a/configure -+++ b/configure -@@ -4972,7 +4972,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | 4*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index d369382264..0417133a5c 100644 ---- a/configure.in -+++ b/configure.in -@@ -935,7 +935,7 @@ AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | 4*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_make_version.patch new file mode 120000 index 00000000000..1c6b268bfab --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_make_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_make_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection.patch deleted file mode 100644 index 49668244d52..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection.patch +++ /dev/null @@ -1,176 +0,0 @@ -commit ee14fe4c606fa577ae4375985b75ec0cb8e79fec -Author: Keno Fischer -Date: Fri Jun 22 18:03:46 2018 -0400 - - dl-load: Reject musl-linked libraries - - This prevents the glibc dynamic linker from considering shared - libraries linked against musl (similar to how it would reject - libraries for other architectures). - - See https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/297 - -diff --git a/elf/dl-load.c b/elf/dl-load.c -index 7554a99..fe9e483 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -46,6 +46,7 @@ - #include - #include - -+#include - - #include - #if BYTE_ORDER == BIG_ENDIAN -@@ -1382,6 +1383,60 @@ print_search_path (struct r_search_path_elem **list, - else - _dl_debug_printf_c ("\t\t(%s)\n", what); - } -+ -+struct known_names -+{ -+ const char *soname; -+ int flag; -+}; -+ -+static struct known_names known_libs[] = -+{ -+#ifdef SYSDEP_KNOWN_LIBRARY_NAMES -+ SYSDEP_KNOWN_LIBRARY_NAMES -+#endif -+}; -+ -+static int validate_lib(int fd, unsigned int dynamic_addr, unsigned int dynamic_size) -+{ -+ ElfW(Dyn) *dyn_entry; -+ ElfW(Dyn) *dynamic_segment = alloca(dynamic_size); -+ char fname[255]; -+ __lseek (fd, dynamic_addr, SEEK_SET); -+ if ((size_t) __libc_read (fd, (void *) dynamic_segment, dynamic_size) != dynamic_size) -+ { -+ return -2; -+ } -+ // Find the string table -+ unsigned int string_offset = 0; -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_STRTAB) { -+ string_offset = dyn_entry->d_un.d_val; -+ } -+ if (string_offset != 0) { -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_NEEDED) { -+ __lseek (fd, string_offset + dyn_entry->d_un.d_val, SEEK_SET); -+ ssize_t nchars = __libc_read (fd, (void *)fname, 254); -+ if (nchars == -1) -+ return -2; -+ fname[nchars] = 0; -+ for (int j = 0; j < sizeof (known_libs) / sizeof (known_libs [0]); ++j) { -+ if (strcmp (fname, known_libs [j].soname) == 0) -+ { -+ if (known_libs [j].flag == FLAG_ELF_MUSL) -+ return 1; -+ } -+ } -+ } -+ } -+ } -+ } -+ return 0; -+} -+ - - /* Open a file and verify it is an ELF file for this architecture. We - ignore only ELF files for other architectures. Non-ELF files and -@@ -1427,6 +1482,8 @@ open_verify (const char *name, int fd, - } expected_note = { 4, 16, 1, "GNU" }; - /* Initialize it to make the compiler happy. */ - const char *errstring = NULL; -+ unsigned int dynamic_addr = 0; -+ unsigned int dynamic_size = 0; - int errval = 0; - - #ifdef SHARED -@@ -1618,8 +1675,15 @@ open_verify (const char *name, int fd, - loader, fd))) - goto close_and_out; - -+ dynamic_addr = 0; -+ dynamic_size = 0; - /* Check .note.ABI-tag if present. */ -- for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) -+ for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) { -+ if (ph->p_type == PT_DYNAMIC) -+ { -+ dynamic_addr = ph->p_offset; -+ dynamic_size = ph->p_filesz; -+ } - if (ph->p_type == PT_NOTE && ph->p_filesz >= 32 && ph->p_align >= 4) - { - ElfW(Addr) size = ph->p_filesz; -@@ -1678,6 +1742,20 @@ open_verify (const char *name, int fd, - - break; - } -+ } -+ /* Check the dynamic section */ -+ if (dynamic_addr != 0) { -+ int err = validate_lib(fd, dynamic_addr, dynamic_size); -+ if (err == -2) { -+ errstring = N_("failed to read file"); -+ goto call_lose; -+ } -+ else if (err != 0) { -+ __close (fd); -+ __set_errno (ENOENT); -+ fd = -1; -+ } -+ } - } - - return fd; -diff --git a/elf/ldconfig.c b/elf/ldconfig.c -index fbdd814..53a1f87 100644 ---- a/elf/ldconfig.c -+++ b/elf/ldconfig.c -@@ -875,6 +875,16 @@ search_dir (const struct dir_entry *entry) - add_to_aux_cache (&lstat_buf, flag, osversion, soname); - } - -+ /* Don't try to load MUSL-dependent libraries */ -+ if ((flag & FLAG_TYPE_MASK) == FLAG_ELF_MUSL) -+ { -+ if (real_name != real_file_name) -+ free (real_name); -+ if (opt_verbose) -+ error (0, 0, _("Skipping musl-linked library %s"), file_name); -+ continue; -+ } -+ - if (soname == NULL) - soname = implicit_soname (direntry->d_name, flag); - -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index 59e20dc..13c4215 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -27,6 +27,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 -diff --git a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -index c7e9ad6..abd724e 100644 ---- a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -+++ b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -@@ -23,4 +23,5 @@ - { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, - #define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ -- { "libm.so.6", FLAG_ELF_LIBC6 }, -+ { "libm.so.6", FLAG_ELF_LIBC6 }, \ -+ { "libc.musl-x86_64.so.1", FLAG_ELF_MUSL } diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection.patch new file mode 120000 index 00000000000..81a4040c7fd --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection_old.patch deleted file mode 100644 index a400df39623..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection_old.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index fadd5ec370..cb6b6d53b7 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -26,6 +26,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection_old.patch new file mode 120000 index 00000000000..31d164c349c --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_musl_rejection_old.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection_old.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_nocommon.patch deleted file mode 100644 index 6fbd074443f..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_nocommon.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./malloc/obstack.c.old 2017-10-27 17:08:52.000000000 -0400 -+++ ./malloc/obstack.c 2017-10-27 17:09:54.000000000 -0400 -@@ -117,7 +117,7 @@ - /* A looong time ago (before 1994, anyway; we're not sure) this global variable - was used by non-GNU-C macros to avoid multiple evaluation. The GNU C - library still exports it because somebody might use it. */ --struct obstack *_obstack_compat; -+struct obstack *_obstack_compat __attribute__((nocommon)); - compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); - # endif - # endif diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_nocommon.patch new file mode 120000 index 00000000000..5b375100acb --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_powerpc64le_gcc_fix.patch deleted file mode 100644 index 8bc77f56d70..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_powerpc64le_gcc_fix.patch +++ /dev/null @@ -1,198 +0,0 @@ -From db8fed87d9741b6b3da6c2257f01d63ef2fe407c Mon Sep 17 00:00:00 2001 -From: Martin Sebor -Date: Mon, 1 Jun 2015 14:12:09 -0300 -Subject: [PATCH] powerpc: setcontext.S uses power6 mtfsf when not supported - [BZ #18116] - -The attached patch fixes a glibc build failure with gcc 5 on powerpc64le -caused by a recent change in gcc where the compiler defines the -_ARCH_PWR6 macro when processing assembly files but doesn't invoke the -assembler in the corresponding machine mode (unless it has been -explicitly configured to target POWER 6 or later). A bug had been filed -with gcc for this (65341) but was closed as won't fix. Glibc relies on -the _ARCH_PWR6 macro in a few .S files to make use of Power ISA 2.5 -instructions (specifically, the four-argument form of the mtfsf insn). -A similar problem had occurred in the past (bug 10118) but the fix that -was committed for it didn't anticipate this new problem. ---- - ChangeLog | 9 ++++++ - .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 30 ++++++++++++++---- - .../sysv/linux/powerpc/powerpc64/swapcontext.S | 36 +++++++++++++++++----- - 3 files changed, 61 insertions(+), 14 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 6d295e7..239a0e6 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,12 @@ -+2015-03-11 Martin Sebor -+ -+ [BZ #18116] -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+ (__setcontext): Use extended four-operand version of mtsf whenever -+ possible. -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+ (__novec_swapcontext): Likewise. -+ - 2015-06-01 Siddhesh Poyarekar - - * benchtests/scripts/compare_bench.py: New file. -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -index e47a57a..8a08dc4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -@@ -81,22 +81,31 @@ ENTRY(__novec_setcontext) - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 5f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -364,22 +373,31 @@ L(has_no_vec): - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 7f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -index bc02a21..2421ca4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -@@ -173,24 +173,34 @@ ENTRY(__novec_swapcontext) - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 5f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -652,24 +662,34 @@ L(has_no_vec2): - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 7f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) --- -2.9.3 - diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_powerpc64le_gcc_fix.patch new file mode 120000 index 00000000000..206ed74aa45 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_powerpc64le_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_powerpc64le_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_regexp_nocommon.patch deleted file mode 100644 index 98bd10251e3..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_regexp_nocommon.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- misc/regexp.c.old 2017-10-28 12:54:11.000000000 -0400 -+++ misc/regexp.c 2017-10-28 12:54:37.000000000 -0400 -@@ -30,13 +30,13 @@ - #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) - - /* Define the variables used for the interface. */ --char *loc1; --char *loc2; -+char *loc1 __attribute__((nocommon)); -+char *loc2 __attribute__((nocommon)); - compat_symbol (libc, loc1, loc1, GLIBC_2_0); - compat_symbol (libc, loc2, loc2, GLIBC_2_0); - - /* Although we do not support the use we define this variable as well. */ --char *locs; -+char *locs __attribute__((nocommon)); - compat_symbol (libc, locs, locs, GLIBC_2_0); - - diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_regexp_nocommon.patch new file mode 120000 index 00000000000..1a10ef2694b --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_regexp_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_regexp_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_sunrpc.patch deleted file mode 100644 index d7fdf48316d..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_sunrpc.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- sunrpc/rpc/types.h.old -+++ sunrpc/rpc/types.h -@@ -69,7 +69,7 @@ - #include - #endif - --#ifndef __u_char_defined -+#if 0 - typedef __u_char u_char; - typedef __u_short u_short; - typedef __u_int u_int; -@@ -79,7 +79,7 @@ - typedef __fsid_t fsid_t; - # define __u_char_defined - #endif --#ifndef __daddr_t_defined -+#if 0 - typedef __daddr_t daddr_t; - typedef __caddr_t caddr_t; - # define __daddr_t_defined diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_sunrpc.patch new file mode 120000 index 00000000000..9359558d4e0 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/glibc_sunrpc.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_sunrpc.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_fullyaml.patch deleted file mode 100644 index fc8b4e8e120..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_fullyaml.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -index ca62890e..6038c13b 100644 ---- a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -+++ b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -@@ -26,7 +26,7 @@ void RefactoringOptionSet::print(llvm::raw_ostream &OS) const { - } - } - --template <> struct CustomMappingTraits { -+template <> struct llvm::yaml::CustomMappingTraits { - static void inputOne(IO &YamlIn, StringRef Key, - RefactoringOptionSet &Result) { - #define HANDLE(Type) \ diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_fullyaml.patch new file mode 120000 index 00000000000..8c24845b566 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_fullyaml.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_fullyaml.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_musl.patch deleted file mode 100644 index d0b09c58c31..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_musl.patch +++ /dev/null @@ -1,3851 +0,0 @@ -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -index 7798e3c8..dc890373 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -@@ -20,7 +20,7 @@ - // One of TLI_DEFINE_ENUM/STRING are defined. - - #if defined(TLI_DEFINE_ENUM) --#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) enum_variant, -+#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) LibFunc_##enum_variant, - #define TLI_DEFINE_STRING_INTERNAL(string_repr) - #else - #define TLI_DEFINE_ENUM_INTERNAL(enum_variant) -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -index 2cba44bc..25ae5449 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -@@ -29,14 +29,12 @@ struct VecDesc { - }; - class PreservedAnalyses; - -- namespace LibFunc { -- enum Func { -+ enum LibFunc { - #define TLI_DEFINE_ENUM - #include "llvm/Analysis/TargetLibraryInfo.def" - - NumLibFuncs - }; -- } - - /// \brief Implementation of the target library information. - /// -@@ -47,20 +45,20 @@ class PreservedAnalyses; - class TargetLibraryInfoImpl { - friend class TargetLibraryInfo; - -- unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4]; -+ unsigned char AvailableArray[(NumLibFuncs+3)/4]; - llvm::DenseMap CustomNames; -- static const char *const StandardNames[LibFunc::NumLibFuncs]; -+ static const char *const StandardNames[NumLibFuncs]; - - enum AvailabilityState { - StandardName = 3, // (memset to all ones) - CustomName = 1, - Unavailable = 0 // (memset to all zeros) - }; -- void setState(LibFunc::Func F, AvailabilityState State) { -+ void setState(LibFunc F, AvailabilityState State) { - AvailableArray[F/4] &= ~(3 << 2*(F&3)); - AvailableArray[F/4] |= State << 2*(F&3); - } -- AvailabilityState getState(LibFunc::Func F) const { -+ AvailabilityState getState(LibFunc F) const { - return static_cast((AvailableArray[F/4] >> 2*(F&3)) & 3); - } - -@@ -72,7 +70,7 @@ class TargetLibraryInfoImpl { - - /// Return true if the function type FTy is valid for the library function - /// F, regardless of whether the function is available. -- bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc::Func F, -+ bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc F, - const DataLayout *DL) const; - - public: -@@ -101,28 +99,28 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const; -+ bool getLibFunc(StringRef funcName, LibFunc &F) const; - - /// Searches for a particular function name, also checking that its type is - /// valid for the library function matching that name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const; -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const; - - /// \brief Forces a function to be marked as unavailable. -- void setUnavailable(LibFunc::Func F) { -+ void setUnavailable(LibFunc F) { - setState(F, Unavailable); - } - - /// \brief Forces a function to be marked as available. -- void setAvailable(LibFunc::Func F) { -+ void setAvailable(LibFunc F) { - setState(F, StandardName); - } - - /// \brief Forces a function to be marked as available and provide an - /// alternate name that must be used. -- void setAvailableWithName(LibFunc::Func F, StringRef Name) { -+ void setAvailableWithName(LibFunc F, StringRef Name) { - if (StandardNames[F] != Name) { - setState(F, CustomName); - CustomNames[F] = Name; -@@ -203,16 +201,16 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const { -+ bool getLibFunc(StringRef funcName, LibFunc &F) const { - return Impl->getLibFunc(funcName, F); - } - -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const { -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const { - return Impl->getLibFunc(FDecl, F); - } - - /// \brief Tests whether a library function is available. -- bool has(LibFunc::Func F) const { -+ bool has(LibFunc F) const { - return Impl->getState(F) != TargetLibraryInfoImpl::Unavailable; - } - bool isFunctionVectorizable(StringRef F, unsigned VF) const { -@@ -227,37 +225,37 @@ public: - - /// \brief Tests if the function is both available and a candidate for - /// optimized code generation. -- bool hasOptimizedCodeGen(LibFunc::Func F) const { -+ bool hasOptimizedCodeGen(LibFunc F) const { - if (Impl->getState(F) == TargetLibraryInfoImpl::Unavailable) - return false; - switch (F) { - default: break; -- case LibFunc::copysign: case LibFunc::copysignf: case LibFunc::copysignl: -- case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: -- case LibFunc::sin: case LibFunc::sinf: case LibFunc::sinl: -- case LibFunc::cos: case LibFunc::cosf: case LibFunc::cosl: -- case LibFunc::sqrt: case LibFunc::sqrtf: case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -- case LibFunc::fmax: case LibFunc::fmaxf: case LibFunc::fmaxl: -- case LibFunc::fmin: case LibFunc::fminf: case LibFunc::fminl: -- case LibFunc::floor: case LibFunc::floorf: case LibFunc::floorl: -- case LibFunc::nearbyint: case LibFunc::nearbyintf: case LibFunc::nearbyintl: -- case LibFunc::ceil: case LibFunc::ceilf: case LibFunc::ceill: -- case LibFunc::rint: case LibFunc::rintf: case LibFunc::rintl: -- case LibFunc::round: case LibFunc::roundf: case LibFunc::roundl: -- case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: -- case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: -- case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: -- case LibFunc::memcmp: case LibFunc::strcmp: case LibFunc::strcpy: -- case LibFunc::stpcpy: case LibFunc::strlen: case LibFunc::strnlen: -- case LibFunc::memchr: -+ case LibFunc_copysign: case LibFunc_copysignf: case LibFunc_copysignl: -+ case LibFunc_fabs: case LibFunc_fabsf: case LibFunc_fabsl: -+ case LibFunc_sin: case LibFunc_sinf: case LibFunc_sinl: -+ case LibFunc_cos: case LibFunc_cosf: case LibFunc_cosl: -+ case LibFunc_sqrt: case LibFunc_sqrtf: case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: -+ case LibFunc_fmax: case LibFunc_fmaxf: case LibFunc_fmaxl: -+ case LibFunc_fmin: case LibFunc_fminf: case LibFunc_fminl: -+ case LibFunc_floor: case LibFunc_floorf: case LibFunc_floorl: -+ case LibFunc_nearbyint: case LibFunc_nearbyintf: case LibFunc_nearbyintl: -+ case LibFunc_ceil: case LibFunc_ceilf: case LibFunc_ceill: -+ case LibFunc_rint: case LibFunc_rintf: case LibFunc_rintl: -+ case LibFunc_round: case LibFunc_roundf: case LibFunc_roundl: -+ case LibFunc_trunc: case LibFunc_truncf: case LibFunc_truncl: -+ case LibFunc_log2: case LibFunc_log2f: case LibFunc_log2l: -+ case LibFunc_exp2: case LibFunc_exp2f: case LibFunc_exp2l: -+ case LibFunc_memcmp: case LibFunc_strcmp: case LibFunc_strcpy: -+ case LibFunc_stpcpy: case LibFunc_strlen: case LibFunc_strnlen: -+ case LibFunc_memchr: - return true; - } - return false; - } - -- StringRef getName(LibFunc::Func F) const { -+ StringRef getName(LibFunc F) const { - auto State = Impl->getState(F); - if (State == TargetLibraryInfoImpl::Unavailable) - return StringRef(); -diff --git a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -index 6ec531f8..e50c779c 100644 ---- a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -+++ b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -@@ -56,8 +56,8 @@ private: - Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B); - - // Str/Stp cpy are similar enough to be handled in the same functions. -- Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -- Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -+ Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); -+ Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); - - /// \brief Checks whether the call \p CI to a fortified libcall is foldable - /// to the non-fortified version. -diff --git a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -index ec712a31..058f1aef 100644 ---- a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -+++ b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -@@ -613,9 +613,9 @@ static bool isWriteOnlyParam(ImmutableCallSite CS, unsigned ArgIdx, - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. Note that all but the missing writeonly attribute are - // handled via InferFunctionAttr. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) -+ F == LibFunc_memset_pattern16 && TLI.has(F)) - if (ArgIdx == 0) - return true; - -diff --git a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -index ccb56631..18ce21de 100644 ---- a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -+++ b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -@@ -1501,51 +1501,51 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - switch (Name[0]) { - case 'a': -- if ((Name == "acos" && TLI->has(LibFunc::acos)) || -- (Name == "acosf" && TLI->has(LibFunc::acosf))) -+ if ((Name == "acos" && TLI->has(LibFunc_acos)) || -+ (Name == "acosf" && TLI->has(LibFunc_acosf))) - return ConstantFoldFP(acos, V, Ty); -- else if ((Name == "asin" && TLI->has(LibFunc::asin)) || -- (Name == "asinf" && TLI->has(LibFunc::asinf))) -+ else if ((Name == "asin" && TLI->has(LibFunc_asin)) || -+ (Name == "asinf" && TLI->has(LibFunc_asinf))) - return ConstantFoldFP(asin, V, Ty); -- else if ((Name == "atan" && TLI->has(LibFunc::atan)) || -- (Name == "atanf" && TLI->has(LibFunc::atanf))) -+ else if ((Name == "atan" && TLI->has(LibFunc_atan)) || -+ (Name == "atanf" && TLI->has(LibFunc_atanf))) - return ConstantFoldFP(atan, V, Ty); - break; - case 'c': -- if ((Name == "ceil" && TLI->has(LibFunc::ceil)) || -- (Name == "ceilf" && TLI->has(LibFunc::ceilf))) -+ if ((Name == "ceil" && TLI->has(LibFunc_ceil)) || -+ (Name == "ceilf" && TLI->has(LibFunc_ceilf))) - return ConstantFoldFP(ceil, V, Ty); -- else if ((Name == "cos" && TLI->has(LibFunc::cos)) || -- (Name == "cosf" && TLI->has(LibFunc::cosf))) -+ else if ((Name == "cos" && TLI->has(LibFunc_cos)) || -+ (Name == "cosf" && TLI->has(LibFunc_cosf))) - return ConstantFoldFP(cos, V, Ty); -- else if ((Name == "cosh" && TLI->has(LibFunc::cosh)) || -- (Name == "coshf" && TLI->has(LibFunc::coshf))) -+ else if ((Name == "cosh" && TLI->has(LibFunc_cosh)) || -+ (Name == "coshf" && TLI->has(LibFunc_coshf))) - return ConstantFoldFP(cosh, V, Ty); - break; - case 'e': -- if ((Name == "exp" && TLI->has(LibFunc::exp)) || -- (Name == "expf" && TLI->has(LibFunc::expf))) -+ if ((Name == "exp" && TLI->has(LibFunc_exp)) || -+ (Name == "expf" && TLI->has(LibFunc_expf))) - return ConstantFoldFP(exp, V, Ty); -- if ((Name == "exp2" && TLI->has(LibFunc::exp2)) || -- (Name == "exp2f" && TLI->has(LibFunc::exp2f))) -+ if ((Name == "exp2" && TLI->has(LibFunc_exp2)) || -+ (Name == "exp2f" && TLI->has(LibFunc_exp2f))) - // Constant fold exp2(x) as pow(2,x) in case the host doesn't have a - // C99 library. - return ConstantFoldBinaryFP(pow, 2.0, V, Ty); - break; - case 'f': -- if ((Name == "fabs" && TLI->has(LibFunc::fabs)) || -- (Name == "fabsf" && TLI->has(LibFunc::fabsf))) -+ if ((Name == "fabs" && TLI->has(LibFunc_fabs)) || -+ (Name == "fabsf" && TLI->has(LibFunc_fabsf))) - return ConstantFoldFP(fabs, V, Ty); -- else if ((Name == "floor" && TLI->has(LibFunc::floor)) || -- (Name == "floorf" && TLI->has(LibFunc::floorf))) -+ else if ((Name == "floor" && TLI->has(LibFunc_floor)) || -+ (Name == "floorf" && TLI->has(LibFunc_floorf))) - return ConstantFoldFP(floor, V, Ty); - break; - case 'l': -- if ((Name == "log" && V > 0 && TLI->has(LibFunc::log)) || -- (Name == "logf" && V > 0 && TLI->has(LibFunc::logf))) -+ if ((Name == "log" && V > 0 && TLI->has(LibFunc_log)) || -+ (Name == "logf" && V > 0 && TLI->has(LibFunc_logf))) - return ConstantFoldFP(log, V, Ty); -- else if ((Name == "log10" && V > 0 && TLI->has(LibFunc::log10)) || -- (Name == "log10f" && V > 0 && TLI->has(LibFunc::log10f))) -+ else if ((Name == "log10" && V > 0 && TLI->has(LibFunc_log10)) || -+ (Name == "log10f" && V > 0 && TLI->has(LibFunc_log10f))) - return ConstantFoldFP(log10, V, Ty); - else if (IntrinsicID == Intrinsic::sqrt && - (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())) { -@@ -1562,22 +1562,22 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - } - break; - case 's': -- if ((Name == "sin" && TLI->has(LibFunc::sin)) || -- (Name == "sinf" && TLI->has(LibFunc::sinf))) -+ if ((Name == "sin" && TLI->has(LibFunc_sin)) || -+ (Name == "sinf" && TLI->has(LibFunc_sinf))) - return ConstantFoldFP(sin, V, Ty); -- else if ((Name == "sinh" && TLI->has(LibFunc::sinh)) || -- (Name == "sinhf" && TLI->has(LibFunc::sinhf))) -+ else if ((Name == "sinh" && TLI->has(LibFunc_sinh)) || -+ (Name == "sinhf" && TLI->has(LibFunc_sinhf))) - return ConstantFoldFP(sinh, V, Ty); -- else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc::sqrt)) || -- (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc::sqrtf))) -+ else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc_sqrt)) || -+ (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc_sqrtf))) - return ConstantFoldFP(sqrt, V, Ty); - break; - case 't': -- if ((Name == "tan" && TLI->has(LibFunc::tan)) || -- (Name == "tanf" && TLI->has(LibFunc::tanf))) -+ if ((Name == "tan" && TLI->has(LibFunc_tan)) || -+ (Name == "tanf" && TLI->has(LibFunc_tanf))) - return ConstantFoldFP(tan, V, Ty); -- else if ((Name == "tanh" && TLI->has(LibFunc::tanh)) || -- (Name == "tanhf" && TLI->has(LibFunc::tanhf))) -+ else if ((Name == "tanh" && TLI->has(LibFunc_tanh)) || -+ (Name == "tanhf" && TLI->has(LibFunc_tanhf))) - return ConstantFoldFP(tanh, V, Ty); - break; - default: -@@ -1680,14 +1680,14 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - if (!TLI) - return nullptr; -- if ((Name == "pow" && TLI->has(LibFunc::pow)) || -- (Name == "powf" && TLI->has(LibFunc::powf))) -+ if ((Name == "pow" && TLI->has(LibFunc_pow)) || -+ (Name == "powf" && TLI->has(LibFunc_powf))) - return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty); -- if ((Name == "fmod" && TLI->has(LibFunc::fmod)) || -- (Name == "fmodf" && TLI->has(LibFunc::fmodf))) -+ if ((Name == "fmod" && TLI->has(LibFunc_fmod)) || -+ (Name == "fmodf" && TLI->has(LibFunc_fmodf))) - return ConstantFoldBinaryFP(fmod, Op1V, Op2V, Ty); -- if ((Name == "atan2" && TLI->has(LibFunc::atan2)) || -- (Name == "atan2f" && TLI->has(LibFunc::atan2f))) -+ if ((Name == "atan2" && TLI->has(LibFunc_atan2)) || -+ (Name == "atan2f" && TLI->has(LibFunc_atan2f))) - return ConstantFoldBinaryFP(atan2, Op1V, Op2V, Ty); - } else if (ConstantInt *Op2C = dyn_cast(Operands[1])) { - if (IntrinsicID == Intrinsic::powi && Ty->isHalfTy()) -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -index 480ab5cd..f6d83716 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -@@ -42,7 +42,7 @@ enum AllocType : uint8_t { - }; - - struct AllocFnsTy { -- LibFunc::Func Func; -+ LibFunc Func; - AllocType AllocTy; - unsigned char NumParams; - // First and Second size parameters (or -1 if unused) -@@ -52,29 +52,29 @@ struct AllocFnsTy { - // FIXME: certain users need more information. E.g., SimplifyLibCalls needs to - // know which functions are nounwind, noalias, nocapture parameters, etc. - static const AllocFnsTy AllocationFnData[] = { -- {LibFunc::malloc, MallocLike, 1, 0, -1}, -- {LibFunc::valloc, MallocLike, 1, 0, -1}, -- {LibFunc::Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -- {LibFunc::ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -- {LibFunc::Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -- {LibFunc::ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -- {LibFunc::msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -- {LibFunc::msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -- {LibFunc::msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -- {LibFunc::msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -- {LibFunc::calloc, CallocLike, 2, 0, 1}, -- {LibFunc::realloc, ReallocLike, 2, 1, -1}, -- {LibFunc::reallocf, ReallocLike, 2, 1, -1}, -- {LibFunc::strdup, StrDupLike, 1, -1, -1}, -- {LibFunc::strndup, StrDupLike, 2, 1, -1} -+ {LibFunc_malloc, MallocLike, 1, 0, -1}, -+ {LibFunc_valloc, MallocLike, 1, 0, -1}, -+ {LibFunc_Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -+ {LibFunc_ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -+ {LibFunc_Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -+ {LibFunc_ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -+ {LibFunc_msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -+ {LibFunc_msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -+ {LibFunc_msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -+ {LibFunc_msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -+ {LibFunc_calloc, CallocLike, 2, 0, 1}, -+ {LibFunc_realloc, ReallocLike, 2, 1, -1}, -+ {LibFunc_reallocf, ReallocLike, 2, 1, -1}, -+ {LibFunc_strdup, StrDupLike, 1, -1, -1}, -+ {LibFunc_strndup, StrDupLike, 2, 1, -1} - // TODO: Handle "int posix_memalign(void **, size_t, size_t)" - }; - -@@ -111,7 +111,7 @@ static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy, - - // Make sure that the function is available. - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - -@@ -295,33 +295,33 @@ const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) { - return nullptr; - - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - - unsigned ExpectedNumParams; -- if (TLIFn == LibFunc::free || -- TLIFn == LibFunc::ZdlPv || // operator delete(void*) -- TLIFn == LibFunc::ZdaPv || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_ptr32 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_ptr64 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_array_ptr32 || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_array_ptr64) // operator delete[](void*) -+ if (TLIFn == LibFunc_free || -+ TLIFn == LibFunc_ZdlPv || // operator delete(void*) -+ TLIFn == LibFunc_ZdaPv || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_ptr32 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_ptr64 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr32 || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr64) // operator delete[](void*) - ExpectedNumParams = 1; -- else if (TLIFn == LibFunc::ZdlPvj || // delete(void*, uint) -- TLIFn == LibFunc::ZdlPvm || // delete(void*, ulong) -- TLIFn == LibFunc::ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -- TLIFn == LibFunc::ZdaPvj || // delete[](void*, uint) -- TLIFn == LibFunc::ZdaPvm || // delete[](void*, ulong) -- TLIFn == LibFunc::ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr32_int || // delete(void*, uint) -- TLIFn == LibFunc::msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr32_int || // delete[](void*, uint) -- TLIFn == LibFunc::msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) -+ else if (TLIFn == LibFunc_ZdlPvj || // delete(void*, uint) -+ TLIFn == LibFunc_ZdlPvm || // delete(void*, ulong) -+ TLIFn == LibFunc_ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -+ TLIFn == LibFunc_ZdaPvj || // delete[](void*, uint) -+ TLIFn == LibFunc_ZdaPvm || // delete[](void*, ulong) -+ TLIFn == LibFunc_ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr32_int || // delete(void*, uint) -+ TLIFn == LibFunc_msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_int || // delete[](void*, uint) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) - ExpectedNumParams = 2; - else - return nullptr; -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -index a0ae72f1..9db6c499 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -@@ -142,9 +142,9 @@ MemoryLocation MemoryLocation::getForArgument(ImmutableCallSite CS, - // for memcpy/memset. This is particularly important because the - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) { -+ F == LibFunc_memset_pattern16 && TLI.has(F)) { - assert((ArgIdx == 0 || ArgIdx == 1) && - "Invalid argument index for memset_pattern16"); - if (ArgIdx == 1) -diff --git a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -index a71d090c..a34174d1 100644 ---- a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -+++ b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -@@ -25,7 +25,7 @@ static cl::opt ClVectorLibrary( - "Accelerate framework"), - clEnumValEnd)); - --const char *const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = { -+const char *const TargetLibraryInfoImpl::StandardNames[NumLibFuncs] = { - #define TLI_DEFINE_STRING - #include "llvm/Analysis/TargetLibraryInfo.def" - }; -@@ -62,9 +62,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - - if (T.getArch() == Triple::r600 || - T.getArch() == Triple::amdgcn) { -- TLI.setUnavailable(LibFunc::ldexp); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -+ TLI.setUnavailable(LibFunc_ldexp); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); - } - - // There are no library implementations of mempcy and memset for AMD gpus and -@@ -73,9 +73,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - T.getArch() == Triple::amdgcn || - T.getArch() == Triple::wasm32 || - T.getArch() == Triple::wasm64) { -- TLI.setUnavailable(LibFunc::memcpy); -- TLI.setUnavailable(LibFunc::memset); -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memcpy); -+ TLI.setUnavailable(LibFunc_memset); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - return; - } - -@@ -83,21 +83,21 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // All versions of watchOS support it. - if (T.isMacOSX()) { - if (T.isMacOSXVersionLT(10, 5)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (T.isiOS()) { - if (T.isOSVersionLT(3, 0)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (!T.isWatchOS()) { -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } - - if (!hasSinCosPiStret(T)) { -- TLI.setUnavailable(LibFunc::sinpi); -- TLI.setUnavailable(LibFunc::sinpif); -- TLI.setUnavailable(LibFunc::cospi); -- TLI.setUnavailable(LibFunc::cospif); -- TLI.setUnavailable(LibFunc::sincospi_stret); -- TLI.setUnavailable(LibFunc::sincospif_stret); -+ TLI.setUnavailable(LibFunc_sinpi); -+ TLI.setUnavailable(LibFunc_sinpif); -+ TLI.setUnavailable(LibFunc_cospi); -+ TLI.setUnavailable(LibFunc_cospif); -+ TLI.setUnavailable(LibFunc_sincospi_stret); -+ TLI.setUnavailable(LibFunc_sincospif_stret); - } - - if (T.isMacOSX() && T.getArch() == Triple::x86 && -@@ -107,177 +107,177 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // has a $UNIX2003 suffix. The two implementations are identical except - // for the return value in some edge cases. However, we don't want to - // generate code that depends on the old symbols. -- TLI.setAvailableWithName(LibFunc::fwrite, "fwrite$UNIX2003"); -- TLI.setAvailableWithName(LibFunc::fputs, "fputs$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fwrite, "fwrite$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fputs, "fputs$UNIX2003"); - } - - // iprintf and friends are only available on XCore and TCE. - if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) { -- TLI.setUnavailable(LibFunc::iprintf); -- TLI.setUnavailable(LibFunc::siprintf); -- TLI.setUnavailable(LibFunc::fiprintf); -+ TLI.setUnavailable(LibFunc_iprintf); -+ TLI.setUnavailable(LibFunc_siprintf); -+ TLI.setUnavailable(LibFunc_fiprintf); - } - - if (T.isOSWindows() && !T.isOSCygMing()) { - // Win32 does not support long double -- TLI.setUnavailable(LibFunc::acosl); -- TLI.setUnavailable(LibFunc::asinl); -- TLI.setUnavailable(LibFunc::atanl); -- TLI.setUnavailable(LibFunc::atan2l); -- TLI.setUnavailable(LibFunc::ceill); -- TLI.setUnavailable(LibFunc::copysignl); -- TLI.setUnavailable(LibFunc::cosl); -- TLI.setUnavailable(LibFunc::coshl); -- TLI.setUnavailable(LibFunc::expl); -- TLI.setUnavailable(LibFunc::fabsf); // Win32 and Win64 both lack fabsf -- TLI.setUnavailable(LibFunc::fabsl); -- TLI.setUnavailable(LibFunc::floorl); -- TLI.setUnavailable(LibFunc::fmaxl); -- TLI.setUnavailable(LibFunc::fminl); -- TLI.setUnavailable(LibFunc::fmodl); -- TLI.setUnavailable(LibFunc::frexpl); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -- TLI.setUnavailable(LibFunc::logl); -- TLI.setUnavailable(LibFunc::modfl); -- TLI.setUnavailable(LibFunc::powl); -- TLI.setUnavailable(LibFunc::sinl); -- TLI.setUnavailable(LibFunc::sinhl); -- TLI.setUnavailable(LibFunc::sqrtl); -- TLI.setUnavailable(LibFunc::tanl); -- TLI.setUnavailable(LibFunc::tanhl); -+ TLI.setUnavailable(LibFunc_acosl); -+ TLI.setUnavailable(LibFunc_asinl); -+ TLI.setUnavailable(LibFunc_atanl); -+ TLI.setUnavailable(LibFunc_atan2l); -+ TLI.setUnavailable(LibFunc_ceill); -+ TLI.setUnavailable(LibFunc_copysignl); -+ TLI.setUnavailable(LibFunc_cosl); -+ TLI.setUnavailable(LibFunc_coshl); -+ TLI.setUnavailable(LibFunc_expl); -+ TLI.setUnavailable(LibFunc_fabsf); // Win32 and Win64 both lack fabsf -+ TLI.setUnavailable(LibFunc_fabsl); -+ TLI.setUnavailable(LibFunc_floorl); -+ TLI.setUnavailable(LibFunc_fmaxl); -+ TLI.setUnavailable(LibFunc_fminl); -+ TLI.setUnavailable(LibFunc_fmodl); -+ TLI.setUnavailable(LibFunc_frexpl); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); -+ TLI.setUnavailable(LibFunc_logl); -+ TLI.setUnavailable(LibFunc_modfl); -+ TLI.setUnavailable(LibFunc_powl); -+ TLI.setUnavailable(LibFunc_sinl); -+ TLI.setUnavailable(LibFunc_sinhl); -+ TLI.setUnavailable(LibFunc_sqrtl); -+ TLI.setUnavailable(LibFunc_tanl); -+ TLI.setUnavailable(LibFunc_tanhl); - - // Win32 only has C89 math -- TLI.setUnavailable(LibFunc::acosh); -- TLI.setUnavailable(LibFunc::acoshf); -- TLI.setUnavailable(LibFunc::acoshl); -- TLI.setUnavailable(LibFunc::asinh); -- TLI.setUnavailable(LibFunc::asinhf); -- TLI.setUnavailable(LibFunc::asinhl); -- TLI.setUnavailable(LibFunc::atanh); -- TLI.setUnavailable(LibFunc::atanhf); -- TLI.setUnavailable(LibFunc::atanhl); -- TLI.setUnavailable(LibFunc::cbrt); -- TLI.setUnavailable(LibFunc::cbrtf); -- TLI.setUnavailable(LibFunc::cbrtl); -- TLI.setUnavailable(LibFunc::exp2); -- TLI.setUnavailable(LibFunc::exp2f); -- TLI.setUnavailable(LibFunc::exp2l); -- TLI.setUnavailable(LibFunc::expm1); -- TLI.setUnavailable(LibFunc::expm1f); -- TLI.setUnavailable(LibFunc::expm1l); -- TLI.setUnavailable(LibFunc::log2); -- TLI.setUnavailable(LibFunc::log2f); -- TLI.setUnavailable(LibFunc::log2l); -- TLI.setUnavailable(LibFunc::log1p); -- TLI.setUnavailable(LibFunc::log1pf); -- TLI.setUnavailable(LibFunc::log1pl); -- TLI.setUnavailable(LibFunc::logb); -- TLI.setUnavailable(LibFunc::logbf); -- TLI.setUnavailable(LibFunc::logbl); -- TLI.setUnavailable(LibFunc::nearbyint); -- TLI.setUnavailable(LibFunc::nearbyintf); -- TLI.setUnavailable(LibFunc::nearbyintl); -- TLI.setUnavailable(LibFunc::rint); -- TLI.setUnavailable(LibFunc::rintf); -- TLI.setUnavailable(LibFunc::rintl); -- TLI.setUnavailable(LibFunc::round); -- TLI.setUnavailable(LibFunc::roundf); -- TLI.setUnavailable(LibFunc::roundl); -- TLI.setUnavailable(LibFunc::trunc); -- TLI.setUnavailable(LibFunc::truncf); -- TLI.setUnavailable(LibFunc::truncl); -+ TLI.setUnavailable(LibFunc_acosh); -+ TLI.setUnavailable(LibFunc_acoshf); -+ TLI.setUnavailable(LibFunc_acoshl); -+ TLI.setUnavailable(LibFunc_asinh); -+ TLI.setUnavailable(LibFunc_asinhf); -+ TLI.setUnavailable(LibFunc_asinhl); -+ TLI.setUnavailable(LibFunc_atanh); -+ TLI.setUnavailable(LibFunc_atanhf); -+ TLI.setUnavailable(LibFunc_atanhl); -+ TLI.setUnavailable(LibFunc_cbrt); -+ TLI.setUnavailable(LibFunc_cbrtf); -+ TLI.setUnavailable(LibFunc_cbrtl); -+ TLI.setUnavailable(LibFunc_exp2); -+ TLI.setUnavailable(LibFunc_exp2f); -+ TLI.setUnavailable(LibFunc_exp2l); -+ TLI.setUnavailable(LibFunc_expm1); -+ TLI.setUnavailable(LibFunc_expm1f); -+ TLI.setUnavailable(LibFunc_expm1l); -+ TLI.setUnavailable(LibFunc_log2); -+ TLI.setUnavailable(LibFunc_log2f); -+ TLI.setUnavailable(LibFunc_log2l); -+ TLI.setUnavailable(LibFunc_log1p); -+ TLI.setUnavailable(LibFunc_log1pf); -+ TLI.setUnavailable(LibFunc_log1pl); -+ TLI.setUnavailable(LibFunc_logb); -+ TLI.setUnavailable(LibFunc_logbf); -+ TLI.setUnavailable(LibFunc_logbl); -+ TLI.setUnavailable(LibFunc_nearbyint); -+ TLI.setUnavailable(LibFunc_nearbyintf); -+ TLI.setUnavailable(LibFunc_nearbyintl); -+ TLI.setUnavailable(LibFunc_rint); -+ TLI.setUnavailable(LibFunc_rintf); -+ TLI.setUnavailable(LibFunc_rintl); -+ TLI.setUnavailable(LibFunc_round); -+ TLI.setUnavailable(LibFunc_roundf); -+ TLI.setUnavailable(LibFunc_roundl); -+ TLI.setUnavailable(LibFunc_trunc); -+ TLI.setUnavailable(LibFunc_truncf); -+ TLI.setUnavailable(LibFunc_truncl); - - // Win32 provides some C99 math with mangled names -- TLI.setAvailableWithName(LibFunc::copysign, "_copysign"); -+ TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); - - if (T.getArch() == Triple::x86) { - // Win32 on x86 implements single-precision math functions as macros -- TLI.setUnavailable(LibFunc::acosf); -- TLI.setUnavailable(LibFunc::asinf); -- TLI.setUnavailable(LibFunc::atanf); -- TLI.setUnavailable(LibFunc::atan2f); -- TLI.setUnavailable(LibFunc::ceilf); -- TLI.setUnavailable(LibFunc::copysignf); -- TLI.setUnavailable(LibFunc::cosf); -- TLI.setUnavailable(LibFunc::coshf); -- TLI.setUnavailable(LibFunc::expf); -- TLI.setUnavailable(LibFunc::floorf); -- TLI.setUnavailable(LibFunc::fminf); -- TLI.setUnavailable(LibFunc::fmaxf); -- TLI.setUnavailable(LibFunc::fmodf); -- TLI.setUnavailable(LibFunc::logf); -- TLI.setUnavailable(LibFunc::powf); -- TLI.setUnavailable(LibFunc::sinf); -- TLI.setUnavailable(LibFunc::sinhf); -- TLI.setUnavailable(LibFunc::sqrtf); -- TLI.setUnavailable(LibFunc::tanf); -- TLI.setUnavailable(LibFunc::tanhf); -+ TLI.setUnavailable(LibFunc_acosf); -+ TLI.setUnavailable(LibFunc_asinf); -+ TLI.setUnavailable(LibFunc_atanf); -+ TLI.setUnavailable(LibFunc_atan2f); -+ TLI.setUnavailable(LibFunc_ceilf); -+ TLI.setUnavailable(LibFunc_copysignf); -+ TLI.setUnavailable(LibFunc_cosf); -+ TLI.setUnavailable(LibFunc_coshf); -+ TLI.setUnavailable(LibFunc_expf); -+ TLI.setUnavailable(LibFunc_floorf); -+ TLI.setUnavailable(LibFunc_fminf); -+ TLI.setUnavailable(LibFunc_fmaxf); -+ TLI.setUnavailable(LibFunc_fmodf); -+ TLI.setUnavailable(LibFunc_logf); -+ TLI.setUnavailable(LibFunc_powf); -+ TLI.setUnavailable(LibFunc_sinf); -+ TLI.setUnavailable(LibFunc_sinhf); -+ TLI.setUnavailable(LibFunc_sqrtf); -+ TLI.setUnavailable(LibFunc_tanf); -+ TLI.setUnavailable(LibFunc_tanhf); - } - - // Win32 does *not* provide provide these functions, but they are - // generally available on POSIX-compliant systems: -- TLI.setUnavailable(LibFunc::access); -- TLI.setUnavailable(LibFunc::bcmp); -- TLI.setUnavailable(LibFunc::bcopy); -- TLI.setUnavailable(LibFunc::bzero); -- TLI.setUnavailable(LibFunc::chmod); -- TLI.setUnavailable(LibFunc::chown); -- TLI.setUnavailable(LibFunc::closedir); -- TLI.setUnavailable(LibFunc::ctermid); -- TLI.setUnavailable(LibFunc::fdopen); -- TLI.setUnavailable(LibFunc::ffs); -- TLI.setUnavailable(LibFunc::fileno); -- TLI.setUnavailable(LibFunc::flockfile); -- TLI.setUnavailable(LibFunc::fseeko); -- TLI.setUnavailable(LibFunc::fstat); -- TLI.setUnavailable(LibFunc::fstatvfs); -- TLI.setUnavailable(LibFunc::ftello); -- TLI.setUnavailable(LibFunc::ftrylockfile); -- TLI.setUnavailable(LibFunc::funlockfile); -- TLI.setUnavailable(LibFunc::getc_unlocked); -- TLI.setUnavailable(LibFunc::getitimer); -- TLI.setUnavailable(LibFunc::getlogin_r); -- TLI.setUnavailable(LibFunc::getpwnam); -- TLI.setUnavailable(LibFunc::gettimeofday); -- TLI.setUnavailable(LibFunc::htonl); -- TLI.setUnavailable(LibFunc::htons); -- TLI.setUnavailable(LibFunc::lchown); -- TLI.setUnavailable(LibFunc::lstat); -- TLI.setUnavailable(LibFunc::memccpy); -- TLI.setUnavailable(LibFunc::mkdir); -- TLI.setUnavailable(LibFunc::ntohl); -- TLI.setUnavailable(LibFunc::ntohs); -- TLI.setUnavailable(LibFunc::open); -- TLI.setUnavailable(LibFunc::opendir); -- TLI.setUnavailable(LibFunc::pclose); -- TLI.setUnavailable(LibFunc::popen); -- TLI.setUnavailable(LibFunc::pread); -- TLI.setUnavailable(LibFunc::pwrite); -- TLI.setUnavailable(LibFunc::read); -- TLI.setUnavailable(LibFunc::readlink); -- TLI.setUnavailable(LibFunc::realpath); -- TLI.setUnavailable(LibFunc::rmdir); -- TLI.setUnavailable(LibFunc::setitimer); -- TLI.setUnavailable(LibFunc::stat); -- TLI.setUnavailable(LibFunc::statvfs); -- TLI.setUnavailable(LibFunc::stpcpy); -- TLI.setUnavailable(LibFunc::stpncpy); -- TLI.setUnavailable(LibFunc::strcasecmp); -- TLI.setUnavailable(LibFunc::strncasecmp); -- TLI.setUnavailable(LibFunc::times); -- TLI.setUnavailable(LibFunc::uname); -- TLI.setUnavailable(LibFunc::unlink); -- TLI.setUnavailable(LibFunc::unsetenv); -- TLI.setUnavailable(LibFunc::utime); -- TLI.setUnavailable(LibFunc::utimes); -- TLI.setUnavailable(LibFunc::write); -+ TLI.setUnavailable(LibFunc_access); -+ TLI.setUnavailable(LibFunc_bcmp); -+ TLI.setUnavailable(LibFunc_bcopy); -+ TLI.setUnavailable(LibFunc_bzero); -+ TLI.setUnavailable(LibFunc_chmod); -+ TLI.setUnavailable(LibFunc_chown); -+ TLI.setUnavailable(LibFunc_closedir); -+ TLI.setUnavailable(LibFunc_ctermid); -+ TLI.setUnavailable(LibFunc_fdopen); -+ TLI.setUnavailable(LibFunc_ffs); -+ TLI.setUnavailable(LibFunc_fileno); -+ TLI.setUnavailable(LibFunc_flockfile); -+ TLI.setUnavailable(LibFunc_fseeko); -+ TLI.setUnavailable(LibFunc_fstat); -+ TLI.setUnavailable(LibFunc_fstatvfs); -+ TLI.setUnavailable(LibFunc_ftello); -+ TLI.setUnavailable(LibFunc_ftrylockfile); -+ TLI.setUnavailable(LibFunc_funlockfile); -+ TLI.setUnavailable(LibFunc_getc_unlocked); -+ TLI.setUnavailable(LibFunc_getitimer); -+ TLI.setUnavailable(LibFunc_getlogin_r); -+ TLI.setUnavailable(LibFunc_getpwnam); -+ TLI.setUnavailable(LibFunc_gettimeofday); -+ TLI.setUnavailable(LibFunc_htonl); -+ TLI.setUnavailable(LibFunc_htons); -+ TLI.setUnavailable(LibFunc_lchown); -+ TLI.setUnavailable(LibFunc_lstat); -+ TLI.setUnavailable(LibFunc_memccpy); -+ TLI.setUnavailable(LibFunc_mkdir); -+ TLI.setUnavailable(LibFunc_ntohl); -+ TLI.setUnavailable(LibFunc_ntohs); -+ TLI.setUnavailable(LibFunc_open); -+ TLI.setUnavailable(LibFunc_opendir); -+ TLI.setUnavailable(LibFunc_pclose); -+ TLI.setUnavailable(LibFunc_popen); -+ TLI.setUnavailable(LibFunc_pread); -+ TLI.setUnavailable(LibFunc_pwrite); -+ TLI.setUnavailable(LibFunc_read); -+ TLI.setUnavailable(LibFunc_readlink); -+ TLI.setUnavailable(LibFunc_realpath); -+ TLI.setUnavailable(LibFunc_rmdir); -+ TLI.setUnavailable(LibFunc_setitimer); -+ TLI.setUnavailable(LibFunc_stat); -+ TLI.setUnavailable(LibFunc_statvfs); -+ TLI.setUnavailable(LibFunc_stpcpy); -+ TLI.setUnavailable(LibFunc_stpncpy); -+ TLI.setUnavailable(LibFunc_strcasecmp); -+ TLI.setUnavailable(LibFunc_strncasecmp); -+ TLI.setUnavailable(LibFunc_times); -+ TLI.setUnavailable(LibFunc_uname); -+ TLI.setUnavailable(LibFunc_unlink); -+ TLI.setUnavailable(LibFunc_unsetenv); -+ TLI.setUnavailable(LibFunc_utime); -+ TLI.setUnavailable(LibFunc_utimes); -+ TLI.setUnavailable(LibFunc_write); - - // Win32 does *not* provide provide these functions, but they are - // specified by C99: -- TLI.setUnavailable(LibFunc::atoll); -- TLI.setUnavailable(LibFunc::frexpf); -- TLI.setUnavailable(LibFunc::llabs); -+ TLI.setUnavailable(LibFunc_atoll); -+ TLI.setUnavailable(LibFunc_frexpf); -+ TLI.setUnavailable(LibFunc_llabs); - } - - switch (T.getOS()) { -@@ -287,28 +287,28 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // for Intel processors (both OS X and iOS simulator) was incorrect for - // some values until OS X 10.11 and iOS 9.0. exp10l is not available on - // OS X or iOS. -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (T.isMacOSXVersionLT(10, 11)) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::IOS: - case Triple::TvOS: - case Triple::WatchOS: -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (!T.isWatchOS() && (T.isOSVersionLT(7, 0) || - (T.isOSVersionLT(9, 0) && - (T.getArch() == Triple::x86 || - T.getArch() == Triple::x86_64)))) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::Linux: -@@ -319,9 +319,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // - // Fall through to disable all of them. - default: -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); -+ TLI.setUnavailable(LibFunc_exp10l); - } - - // ffsl is available on at least Darwin, Mac OS X, iOS, FreeBSD, and -@@ -339,7 +339,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsl); -+ TLI.setUnavailable(LibFunc_ffsl); - } - - // ffsll is available on at least FreeBSD and Linux (GLIBC): -@@ -355,7 +355,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsll); -+ TLI.setUnavailable(LibFunc_ffsll); - } - - // The following functions are available on at least FreeBSD: -@@ -363,30 +363,30 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // http://svn.freebsd.org/base/head/lib/libc/string/flsl.c - // http://svn.freebsd.org/base/head/lib/libc/string/flsll.c - if (!T.isOSFreeBSD()) { -- TLI.setUnavailable(LibFunc::fls); -- TLI.setUnavailable(LibFunc::flsl); -- TLI.setUnavailable(LibFunc::flsll); -+ TLI.setUnavailable(LibFunc_fls); -+ TLI.setUnavailable(LibFunc_flsl); -+ TLI.setUnavailable(LibFunc_flsll); - } - - // The following functions are available on at least Linux: - if (!T.isOSLinux()) { -- TLI.setUnavailable(LibFunc::dunder_strdup); -- TLI.setUnavailable(LibFunc::dunder_strtok_r); -- TLI.setUnavailable(LibFunc::dunder_isoc99_scanf); -- TLI.setUnavailable(LibFunc::dunder_isoc99_sscanf); -- TLI.setUnavailable(LibFunc::under_IO_getc); -- TLI.setUnavailable(LibFunc::under_IO_putc); -- TLI.setUnavailable(LibFunc::memalign); -- TLI.setUnavailable(LibFunc::fopen64); -- TLI.setUnavailable(LibFunc::fseeko64); -- TLI.setUnavailable(LibFunc::fstat64); -- TLI.setUnavailable(LibFunc::fstatvfs64); -- TLI.setUnavailable(LibFunc::ftello64); -- TLI.setUnavailable(LibFunc::lstat64); -- TLI.setUnavailable(LibFunc::open64); -- TLI.setUnavailable(LibFunc::stat64); -- TLI.setUnavailable(LibFunc::statvfs64); -- TLI.setUnavailable(LibFunc::tmpfile64); -+ TLI.setUnavailable(LibFunc_dunder_strdup); -+ TLI.setUnavailable(LibFunc_dunder_strtok_r); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_scanf); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf); -+ TLI.setUnavailable(LibFunc_under_IO_getc); -+ TLI.setUnavailable(LibFunc_under_IO_putc); -+ TLI.setUnavailable(LibFunc_memalign); -+ TLI.setUnavailable(LibFunc_fopen64); -+ TLI.setUnavailable(LibFunc_fseeko64); -+ TLI.setUnavailable(LibFunc_fstat64); -+ TLI.setUnavailable(LibFunc_fstatvfs64); -+ TLI.setUnavailable(LibFunc_ftello64); -+ TLI.setUnavailable(LibFunc_lstat64); -+ TLI.setUnavailable(LibFunc_open64); -+ TLI.setUnavailable(LibFunc_stat64); -+ TLI.setUnavailable(LibFunc_statvfs64); -+ TLI.setUnavailable(LibFunc_tmpfile64); - } - - TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary); -@@ -446,9 +446,9 @@ static StringRef sanitizeFunctionName(StringRef funcName) { - } - - bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const char *const *Start = &StandardNames[0]; -- const char *const *End = &StandardNames[LibFunc::NumLibFuncs]; -+ const char *const *End = &StandardNames[NumLibFuncs]; - - funcName = sanitizeFunctionName(funcName); - if (funcName.empty()) -@@ -459,14 +459,14 @@ bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, - return std::strncmp(LHS, RHS.data(), RHS.size()) < 0; - }); - if (I != End && *I == funcName) { -- F = (LibFunc::Func)(I - Start); -+ F = (LibFunc)(I - Start); - return true; - } - return false; - } - - bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, -- LibFunc::Func F, -+ LibFunc F, - const DataLayout *DL) const { - LLVMContext &Ctx = FTy.getContext(); - Type *PCharTy = Type::getInt8PtrTy(Ctx); -@@ -477,489 +477,489 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - unsigned NumParams = FTy.getNumParams(); - - switch (F) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1)->isIntegerTy()); - -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return ((NumParams == 2 || NumParams == 3) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::strcat: -+ case LibFunc_strcat: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType()); - -- case LibFunc::strncat: -+ case LibFunc_strncat: - return (NumParams == 3 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType() && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strcpy_chk: -- case LibFunc::stpcpy_chk: -+ case LibFunc_strcpy_chk: -+ case LibFunc_stpcpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: - return (NumParams == 2 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy); - -- case LibFunc::strncpy_chk: -- case LibFunc::stpncpy_chk: -+ case LibFunc_strncpy_chk: -+ case LibFunc_stpncpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return (NumParams == 2 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strspn: -- case LibFunc::strcspn: -+ case LibFunc_strspn: -+ case LibFunc_strcspn: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strcoll: -- case LibFunc::strcasecmp: -- case LibFunc::strncasecmp: -+ case LibFunc_strcoll: -+ case LibFunc_strcasecmp: -+ case LibFunc_strncasecmp: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strstr: -+ case LibFunc_strstr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::scanf: -+ case LibFunc_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::system: -+ case LibFunc_system: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::malloc: -+ case LibFunc_malloc: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy()); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getReturnType()->isIntegerTy(32)); - -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy(32) && - FTy.getParamType(2)->isIntegerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::memcpy_chk: -- case LibFunc::memmove_chk: -+ case LibFunc_memcpy_chk: -+ case LibFunc_memmove_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memcpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memmove: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memset: -+ case LibFunc_memset: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memccpy: -+ case LibFunc_memccpy: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::memalign: -+ case LibFunc_memalign: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::realloc: -+ case LibFunc_realloc: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::read: -+ case LibFunc_read: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::rewind: -+ case LibFunc_rewind: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rename: -+ case LibFunc_rename: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::readlink: -+ case LibFunc_readlink: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::write: -+ case LibFunc_write: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bzero: -+ case LibFunc_bzero: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::calloc: -+ case LibFunc_calloc: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy()); - -- case LibFunc::atof: -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atoll: -- case LibFunc::ferror: -- case LibFunc::getenv: -- case LibFunc::getpwnam: -- case LibFunc::pclose: -- case LibFunc::perror: -- case LibFunc::printf: -- case LibFunc::puts: -- case LibFunc::uname: -- case LibFunc::under_IO_getc: -- case LibFunc::unlink: -- case LibFunc::unsetenv: -+ case LibFunc_atof: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atoll: -+ case LibFunc_ferror: -+ case LibFunc_getenv: -+ case LibFunc_getpwnam: -+ case LibFunc_pclose: -+ case LibFunc_perror: -+ case LibFunc_printf: -+ case LibFunc_puts: -+ case LibFunc_uname: -+ case LibFunc_under_IO_getc: -+ case LibFunc_unlink: -+ case LibFunc_unsetenv: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::chmod: -- case LibFunc::chown: -- case LibFunc::clearerr: -- case LibFunc::closedir: -- case LibFunc::ctermid: -- case LibFunc::fclose: -- case LibFunc::feof: -- case LibFunc::fflush: -- case LibFunc::fgetc: -- case LibFunc::fileno: -- case LibFunc::flockfile: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::fseeko64: -- case LibFunc::fseeko: -- case LibFunc::fsetpos: -- case LibFunc::ftell: -- case LibFunc::ftello64: -- case LibFunc::ftello: -- case LibFunc::ftrylockfile: -- case LibFunc::funlockfile: -- case LibFunc::getc: -- case LibFunc::getc_unlocked: -- case LibFunc::getlogin_r: -- case LibFunc::mkdir: -- case LibFunc::mktime: -- case LibFunc::times: -+ case LibFunc_chmod: -+ case LibFunc_chown: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: -+ case LibFunc_ctermid: -+ case LibFunc_fclose: -+ case LibFunc_feof: -+ case LibFunc_fflush: -+ case LibFunc_fgetc: -+ case LibFunc_fileno: -+ case LibFunc_flockfile: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_fseeko64: -+ case LibFunc_fseeko: -+ case LibFunc_fsetpos: -+ case LibFunc_ftell: -+ case LibFunc_ftello64: -+ case LibFunc_ftello: -+ case LibFunc_ftrylockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_getc: -+ case LibFunc_getc_unlocked: -+ case LibFunc_getlogin_r: -+ case LibFunc_mkdir: -+ case LibFunc_mktime: -+ case LibFunc_times: - return (NumParams != 0 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::access: -+ case LibFunc_access: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::fopen: -+ case LibFunc_fopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgets: -+ case LibFunc_fgets: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::fread: -+ case LibFunc_fread: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return (NumParams == 4 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::gets: -- case LibFunc::getchar: -- case LibFunc::getitimer: -+ case LibFunc_gets: -+ case LibFunc_getchar: -+ case LibFunc_getitimer: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::putc: -+ case LibFunc_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::pread: -- case LibFunc::pwrite: -+ case LibFunc_pread: -+ case LibFunc_pwrite: - return (NumParams == 4 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::popen: -+ case LibFunc_popen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::valloc: -+ case LibFunc_valloc: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::open: -+ case LibFunc_open: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::opendir: -+ case LibFunc_opendir: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -- case LibFunc::lstat: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: -+ case LibFunc_lstat: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::lchown: -+ case LibFunc_lchown: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::qsort: -+ case LibFunc_qsort: - return (NumParams == 4 && FTy.getParamType(3)->isPointerTy()); -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::open64: -+ case LibFunc_open64: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::Znwj: // new(unsigned int); -- case LibFunc::Znwm: // new(unsigned long); -- case LibFunc::Znaj: // new[](unsigned int); -- case LibFunc::Znam: // new[](unsigned long); -- case LibFunc::msvc_new_int: // new(unsigned int); -- case LibFunc::msvc_new_longlong: // new(unsigned long long); -- case LibFunc::msvc_new_array_int: // new[](unsigned int); -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long); -+ case LibFunc_Znwj: // new(unsigned int); -+ case LibFunc_Znwm: // new(unsigned long); -+ case LibFunc_Znaj: // new[](unsigned int); -+ case LibFunc_Znam: // new[](unsigned long); -+ case LibFunc_msvc_new_int: // new(unsigned int); -+ case LibFunc_msvc_new_longlong: // new(unsigned long long); -+ case LibFunc_msvc_new_array_int: // new[](unsigned int); -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long); - return (NumParams == 1); - -- case LibFunc::memset_pattern16: -+ case LibFunc_memset_pattern16: - return (!FTy.isVarArg() && NumParams == 3 && - isa(FTy.getParamType(0)) && - isa(FTy.getParamType(1)) && - isa(FTy.getParamType(2))); - -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - return (NumParams == 1 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return (NumParams == 2 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getReturnType() == FTy.getParamType(1)); - -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -- case LibFunc::isdigit: -- case LibFunc::isascii: -- case LibFunc::toascii: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: -+ case LibFunc_isdigit: -+ case LibFunc_isascii: -+ case LibFunc_toascii: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isIntegerTy()); - -- case LibFunc::fls: -- case LibFunc::flsl: -- case LibFunc::flsll: -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_fls: -+ case LibFunc_flsl: -+ case LibFunc_flsll: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::cxa_atexit: -+ case LibFunc_cxa_atexit: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); - -- case LibFunc::sinpi: -- case LibFunc::cospi: -+ case LibFunc_sinpi: -+ case LibFunc_cospi: - return (NumParams == 1 && FTy.getReturnType()->isDoubleTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::sinpif: -- case LibFunc::cospif: -+ case LibFunc_sinpif: -+ case LibFunc_cospif: - return (NumParams == 1 && FTy.getReturnType()->isFloatTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -@@ -971,7 +971,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - } - - bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const DataLayout *DL = - FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; - return getLibFunc(FDecl.getName(), F) && -diff --git a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -index b3bc885c..945acb8b 100644 ---- a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -+++ b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -@@ -135,7 +135,7 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - if (!TLI) - return Intrinsic::not_intrinsic; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = CI->getCalledFunction(); - // We're going to make assumptions on the semantics of the functions, check - // that the target knows that it's available in this environment and it does -@@ -148,77 +148,77 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - switch (Func) { - default: - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - return checkUnaryFloatSignature(*CI, Intrinsic::sin); -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - return checkUnaryFloatSignature(*CI, Intrinsic::cos); -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: - return checkUnaryFloatSignature(*CI, Intrinsic::exp); -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - return checkUnaryFloatSignature(*CI, Intrinsic::exp2); -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: - return checkUnaryFloatSignature(*CI, Intrinsic::log); -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: - return checkUnaryFloatSignature(*CI, Intrinsic::log10); -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - return checkUnaryFloatSignature(*CI, Intrinsic::log2); -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - return checkUnaryFloatSignature(*CI, Intrinsic::fabs); -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - return checkBinaryFloatSignature(*CI, Intrinsic::minnum); -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - return checkBinaryFloatSignature(*CI, Intrinsic::maxnum); -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - return checkBinaryFloatSignature(*CI, Intrinsic::copysign); -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - return checkUnaryFloatSignature(*CI, Intrinsic::floor); -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - return checkUnaryFloatSignature(*CI, Intrinsic::ceil); -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - return checkUnaryFloatSignature(*CI, Intrinsic::trunc); -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - return checkUnaryFloatSignature(*CI, Intrinsic::rint); -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - return checkUnaryFloatSignature(*CI, Intrinsic::nearbyint); -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - return checkUnaryFloatSignature(*CI, Intrinsic::round); -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return checkBinaryFloatSignature(*CI, Intrinsic::pow); - } - -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -index a8d4d296..da81eabd 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -@@ -1379,7 +1379,7 @@ bool FastISel::selectInstruction(const Instruction *I) { - - if (const auto *Call = dyn_cast(I)) { - const Function *F = Call->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - - // As a special case, don't handle calls to builtin library functions that - // may be translated directly to target instructions. -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -index 7f64d7b4..44800eca 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -@@ -6125,15 +6125,15 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - - // Check for well-known libc/libm calls. If the function is internal, it - // can't be a library call. -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { - switch (Func) { - default: break; -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - if (I.getNumArgOperands() == 2 && // Basic sanity checks. - I.getArgOperand(0)->getType()->isFloatingPointTy() && - I.getType() == I.getArgOperand(0)->getType() && -@@ -6146,118 +6146,118 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - return; - } - break; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - if (visitUnaryFloatCall(I, ISD::FABS)) - return; - break; -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - if (visitBinaryFloatCall(I, ISD::FMINNUM)) - return; - break; -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - if (visitBinaryFloatCall(I, ISD::FMAXNUM)) - return; - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - if (visitUnaryFloatCall(I, ISD::FSIN)) - return; - break; -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - if (visitUnaryFloatCall(I, ISD::FCOS)) - return; - break; -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: -- case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: -+ case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: - if (visitUnaryFloatCall(I, ISD::FSQRT)) - return; - break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - if (visitUnaryFloatCall(I, ISD::FFLOOR)) - return; - break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - if (visitUnaryFloatCall(I, ISD::FNEARBYINT)) - return; - break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - if (visitUnaryFloatCall(I, ISD::FCEIL)) - return; - break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - if (visitUnaryFloatCall(I, ISD::FRINT)) - return; - break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - if (visitUnaryFloatCall(I, ISD::FROUND)) - return; - break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - if (visitUnaryFloatCall(I, ISD::FTRUNC)) - return; - break; -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - if (visitUnaryFloatCall(I, ISD::FLOG2)) - return; - break; -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - if (visitUnaryFloatCall(I, ISD::FEXP2)) - return; - break; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - if (visitMemCmpCall(I)) - return; - break; -- case LibFunc::memchr: -+ case LibFunc_memchr: - if (visitMemChrCall(I)) - return; - break; -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - if (visitStrCpyCall(I, false)) - return; - break; -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - if (visitStrCpyCall(I, true)) - return; - break; -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - if (visitStrCmpCall(I)) - return; - break; -- case LibFunc::strlen: -+ case LibFunc_strlen: - if (visitStrLenCall(I)) - return; - break; -- case LibFunc::strnlen: -+ case LibFunc_strnlen: - if (visitStrNLenCall(I)) - return; - break; -diff --git a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -index bed784a5..5110cddd 100644 ---- a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -+++ b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -@@ -63,9 +63,9 @@ private: - - // TargetLibraryInfo has info on C runtime library calls on the current - // target. -- for (unsigned I = 0, E = static_cast(LibFunc::NumLibFuncs); -+ for (unsigned I = 0, E = static_cast(NumLibFuncs); - I != E; ++I) { -- LibFunc::Func F = static_cast(I); -+ LibFunc F = static_cast(I); - if (TLI.has(F)) - Libcalls.insert(TLI.getName(F)); - } -diff --git a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -index b6ac4d54..10f1f20e 100644 ---- a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -+++ b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -@@ -313,7 +313,7 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - // (i.e. soft float or atomics). If adapting for targets that do, - // additional care is required here. - -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && LibInfo && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { -@@ -327,42 +327,42 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - - switch (Func) { - default: return true; -- case LibFunc::copysign: -- case LibFunc::copysignf: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: - continue; // ISD::FCOPYSIGN is never a library call. -- case LibFunc::copysignl: -+ case LibFunc_copysignl: - return true; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - continue; // ISD::FABS is never a library call. -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - Opcode = ISD::FSQRT; break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - Opcode = ISD::FFLOOR; break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - Opcode = ISD::FNEARBYINT; break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - Opcode = ISD::FCEIL; break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - Opcode = ISD::FRINT; break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - Opcode = ISD::FROUND; break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - Opcode = ISD::FTRUNC; break; - } - -diff --git a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -index 29d2c99f..f258f38a 100644 ---- a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -+++ b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -@@ -3067,7 +3067,7 @@ bool GlobalOpt::OptimizeGlobalAliases(Module &M) { - } - - static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { -- LibFunc::Func F = LibFunc::cxa_atexit; -+ LibFunc F = LibFunc_cxa_atexit; - if (!TLI->has(F)) - return nullptr; - -@@ -3076,7 +3076,7 @@ static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { - return nullptr; - - // Make sure that the function has the correct prototype. -- if (!TLI->getLibFunc(*Fn, F) || F != LibFunc::cxa_atexit) -+ if (!TLI->getLibFunc(*Fn, F) || F != LibFunc_cxa_atexit) - return nullptr; - - return Fn; -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -index 36ad0a5f..2a644844 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -@@ -176,20 +176,20 @@ static bool hasMemoryWrite(Instruction *I, const TargetLibraryInfo &TLI) { - } - if (auto CS = CallSite(I)) { - if (Function *F = CS.getCalledFunction()) { -- if (TLI.has(LibFunc::strcpy) && -- F->getName() == TLI.getName(LibFunc::strcpy)) { -+ if (TLI.has(LibFunc_strcpy) && -+ F->getName() == TLI.getName(LibFunc_strcpy)) { - return true; - } -- if (TLI.has(LibFunc::strncpy) && -- F->getName() == TLI.getName(LibFunc::strncpy)) { -+ if (TLI.has(LibFunc_strncpy) && -+ F->getName() == TLI.getName(LibFunc_strncpy)) { - return true; - } -- if (TLI.has(LibFunc::strcat) && -- F->getName() == TLI.getName(LibFunc::strcat)) { -+ if (TLI.has(LibFunc_strcat) && -+ F->getName() == TLI.getName(LibFunc_strcat)) { - return true; - } -- if (TLI.has(LibFunc::strncat) && -- F->getName() == TLI.getName(LibFunc::strncat)) { -+ if (TLI.has(LibFunc_strncat) && -+ F->getName() == TLI.getName(LibFunc_strncat)) { - return true; - } - } -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -index fa87b5b1..e13fd802 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -@@ -210,9 +210,9 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L, LPPassManager &LPM) { - *CurLoop->getHeader()->getParent()); - DL = &CurLoop->getHeader()->getModule()->getDataLayout(); - -- HasMemset = TLI->has(LibFunc::memset); -- HasMemsetPattern = TLI->has(LibFunc::memset_pattern16); -- HasMemcpy = TLI->has(LibFunc::memcpy); -+ HasMemset = TLI->has(LibFunc_memset); -+ HasMemsetPattern = TLI->has(LibFunc_memset_pattern16); -+ HasMemcpy = TLI->has(LibFunc_memcpy); - - if (HasMemset || HasMemsetPattern || HasMemcpy) - if (SE->hasLoopInvariantBackedgeTakenCount(L)) -@@ -489,7 +489,7 @@ bool LoopIdiomRecognize::processLoopMemSet(MemSetInst *MSI, - return false; - - // If we're not allowed to hack on memset, we fail. -- if (!TLI->has(LibFunc::memset)) -+ if (!TLI->has(LibFunc_memset)) - return false; - - Value *Pointer = MSI->getDest(); -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -index 6b43b0f7..d4fd8ce4 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -@@ -1144,7 +1144,7 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) { - bool MemCpyOpt::processMemMove(MemMoveInst *M) { - AliasAnalysis &AA = getAnalysis().getAAResults(); - -- if (!TLI->has(LibFunc::memmove)) -+ if (!TLI->has(LibFunc_memmove)) - return false; - - // See if the pointers alias. -@@ -1290,7 +1290,7 @@ bool MemCpyOpt::runOnFunction(Function &F) { - // If we don't have at least memset and memcpy, there is little point of doing - // anything here. These are required by a freestanding implementation, so if - // even they are disabled, there is no point in trying hard. -- if (!TLI->has(LibFunc::memset) || !TLI->has(LibFunc::memcpy)) -+ if (!TLI->has(LibFunc_memset) || !TLI->has(LibFunc_memcpy)) - return false; - - while (1) { -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -index 9f26f788..aa08538a 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -@@ -77,14 +77,14 @@ bool PartiallyInlineLibCalls::runOnFunction(Function &F) { - - // Skip if function either has local linkage or is not a known library - // function. -- LibFunc::Func LibFunc; -+ LibFunc LF; - if (CalledFunc->hasLocalLinkage() || !CalledFunc->hasName() || -- !TLI->getLibFunc(CalledFunc->getName(), LibFunc)) -+ !TLI->getLibFunc(CalledFunc->getName(), LF)) - continue; - -- switch (LibFunc) { -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -+ switch (LF) { -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: - if (TTI->haveFastSqrt(Call->getType()) && - optimizeSQRT(Call, CalledFunc, *CurrBB, BB)) - break; -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -index 85d0299d..5b6dbdfd 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -@@ -107,254 +107,254 @@ static bool setNonNull(Function &F, unsigned n) { - } - - bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { -- LibFunc::Func TheLibFunc; -+ LibFunc TheLibFunc; - if (!(TLI.getLibFunc(F, TheLibFunc) && TLI.has(TheLibFunc))) - return false; - - bool Changed = false; - switch (TheLibFunc) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -- case LibFunc::strcat: -- case LibFunc::strncat: -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: -+ case LibFunc_strcat: -+ case LibFunc_strncat: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strcmp: // 0,1 -- case LibFunc::strspn: // 0,1 -- case LibFunc::strncmp: // 0,1 -- case LibFunc::strcspn: // 0,1 -- case LibFunc::strcoll: // 0,1 -- case LibFunc::strcasecmp: // 0,1 -- case LibFunc::strncasecmp: // -+ case LibFunc_strcmp: // 0,1 -+ case LibFunc_strspn: // 0,1 -+ case LibFunc_strncmp: // 0,1 -+ case LibFunc_strcspn: // 0,1 -+ case LibFunc_strcoll: // 0,1 -+ case LibFunc_strcasecmp: // 0,1 -+ case LibFunc_strncasecmp: // - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strstr: -- case LibFunc::strpbrk: -+ case LibFunc_strstr: -+ case LibFunc_strpbrk: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::scanf: -+ case LibFunc_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::system: -+ case LibFunc_system: - // May throw; "system" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::malloc: -+ case LibFunc_malloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memcpy: -- case LibFunc::memccpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memccpy: -+ case LibFunc_memmove: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::memalign: -+ case LibFunc_memalign: - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::mkdir: -+ case LibFunc_mkdir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::mktime: -+ case LibFunc_mktime: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::realloc: -+ case LibFunc_realloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::read: -+ case LibFunc_read: - // May throw; "read" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::rewind: -+ case LibFunc_rewind: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::rename: -+ case LibFunc_rename: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::readlink: -+ case LibFunc_readlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::write: -+ case LibFunc_write: - // May throw; "write" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::bzero: -+ case LibFunc_bzero: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::calloc: -+ case LibFunc_calloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::chmod: -- case LibFunc::chown: -+ case LibFunc_chmod: -+ case LibFunc_chown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ctermid: -- case LibFunc::clearerr: -- case LibFunc::closedir: -+ case LibFunc_ctermid: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atof: -- case LibFunc::atoll: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atof: -+ case LibFunc_atoll: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::access: -+ case LibFunc_access: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fopen: -+ case LibFunc_fopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -362,150 +362,150 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::feof: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::ftell: -- case LibFunc::fgetc: -- case LibFunc::fseeko: -- case LibFunc::ftello: -- case LibFunc::fileno: -- case LibFunc::fflush: -- case LibFunc::fclose: -- case LibFunc::fsetpos: -- case LibFunc::flockfile: -- case LibFunc::funlockfile: -- case LibFunc::ftrylockfile: -+ case LibFunc_feof: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_ftell: -+ case LibFunc_fgetc: -+ case LibFunc_fseeko: -+ case LibFunc_ftello: -+ case LibFunc_fileno: -+ case LibFunc_fflush: -+ case LibFunc_fclose: -+ case LibFunc_fsetpos: -+ case LibFunc_flockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_ftrylockfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::ferror: -+ case LibFunc_ferror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F); - return Changed; -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::fgets: -+ case LibFunc_fgets: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 3); - return Changed; -- case LibFunc::fread: -+ case LibFunc_fread: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - // FIXME: readonly #1? - return Changed; -- case LibFunc::fputs: -+ case LibFunc_fputs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getc: -- case LibFunc::getlogin_r: -- case LibFunc::getc_unlocked: -+ case LibFunc_getc: -+ case LibFunc_getlogin_r: -+ case LibFunc_getc_unlocked: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::getenv: -+ case LibFunc_getenv: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::gets: -- case LibFunc::getchar: -+ case LibFunc_gets: -+ case LibFunc_getchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::getitimer: -+ case LibFunc_getitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getpwnam: -+ case LibFunc_getpwnam: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::uname: -+ case LibFunc_uname: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::unlink: -+ case LibFunc_unlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::unsetenv: -+ case LibFunc_unsetenv: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putc: -+ case LibFunc_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::puts: -- case LibFunc::printf: -- case LibFunc::perror: -+ case LibFunc_puts: -+ case LibFunc_printf: -+ case LibFunc_perror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::pread: -+ case LibFunc_pread: - // May throw; "pread" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::pwrite: -+ case LibFunc_pwrite: - // May throw; "pwrite" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putchar: -+ case LibFunc_putchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::popen: -+ case LibFunc_popen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -513,132 +513,132 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::pclose: -+ case LibFunc_pclose: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::valloc: -+ case LibFunc_valloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::open: -+ case LibFunc_open: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::opendir: -+ case LibFunc_opendir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::times: -+ case LibFunc_times: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAccessMemory(F); - return Changed; -- case LibFunc::lstat: -+ case LibFunc_lstat: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::lchown: -+ case LibFunc_lchown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::qsort: -+ case LibFunc_qsort: - // May throw; places call through function pointer. - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::under_IO_getc: -+ case LibFunc_under_IO_getc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -646,26 +646,26 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fseeko64: -- case LibFunc::ftello64: -+ case LibFunc_fseeko64: -+ case LibFunc_ftello64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::open64: -+ case LibFunc_open64: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - // Currently some platforms have the restrict keyword on the arguments to - // gettimeofday. To be conservative, do not add noalias to gettimeofday's - // arguments. -@@ -673,22 +673,22 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::Znwj: // new(unsigned int) -- case LibFunc::Znwm: // new(unsigned long) -- case LibFunc::Znaj: // new[](unsigned int) -- case LibFunc::Znam: // new[](unsigned long) -- case LibFunc::msvc_new_int: // new(unsigned int) -- case LibFunc::msvc_new_longlong: // new(unsigned long long) -- case LibFunc::msvc_new_array_int: // new[](unsigned int) -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long) -+ case LibFunc_Znwj: // new(unsigned int) -+ case LibFunc_Znwm: // new(unsigned long) -+ case LibFunc_Znaj: // new[](unsigned int) -+ case LibFunc_Znam: // new[](unsigned long) -+ case LibFunc_msvc_new_int: // new(unsigned int) -+ case LibFunc_msvc_new_longlong: // new(unsigned long long) -+ case LibFunc_msvc_new_array_int: // new[](unsigned int) -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long) - // Operator new always returns a nonnull noalias pointer - Changed |= setNonNull(F, AttributeSet::ReturnIndex); - Changed |= setDoesNotAlias(F, AttributeSet::ReturnIndex); - return Changed; - //TODO: add LibFunc entries for: -- //case LibFunc::memset_pattern4: -- //case LibFunc::memset_pattern8: -- case LibFunc::memset_pattern16: -+ //case LibFunc_memset_pattern4: -+ //case LibFunc_memset_pattern8: -+ case LibFunc_memset_pattern16: - Changed |= setOnlyAccessesArgMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); -@@ -711,7 +711,7 @@ Value *llvm::castToCStr(Value *V, IRBuilder<> &B) { - - Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strlen)) -+ if (!TLI->has(LibFunc_strlen)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -728,7 +728,7 @@ Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - - Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strchr)) -+ if (!TLI->has(LibFunc_strchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -746,7 +746,7 @@ Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - - Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strncmp)) -+ if (!TLI->has(LibFunc_strncmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -766,7 +766,7 @@ Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - - Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strcpy)) -+ if (!TLI->has(LibFunc_strcpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -782,7 +782,7 @@ Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - - Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strncpy)) -+ if (!TLI->has(LibFunc_strncpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -800,7 +800,7 @@ Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcpy_chk)) -+ if (!TLI->has(LibFunc_memcpy_chk)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -822,7 +822,7 @@ Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - - Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memchr)) -+ if (!TLI->has(LibFunc_memchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -841,7 +841,7 @@ Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - - Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcmp)) -+ if (!TLI->has(LibFunc_memcmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -909,7 +909,7 @@ Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name, - - Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::putchar)) -+ if (!TLI->has(LibFunc_putchar)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -929,7 +929,7 @@ Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - - Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::puts)) -+ if (!TLI->has(LibFunc_puts)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -944,7 +944,7 @@ Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - - Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputc)) -+ if (!TLI->has(LibFunc_fputc)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -963,11 +963,11 @@ Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - - Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputs)) -+ if (!TLI->has(LibFunc_fputs)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -- StringRef FPutsName = TLI->getName(LibFunc::fputs); -+ StringRef FPutsName = TLI->getName(LibFunc_fputs); - Constant *F = M->getOrInsertFunction( - FPutsName, B.getInt32Ty(), B.getInt8PtrTy(), File->getType(), nullptr); - if (File->getType()->isPointerTy()) -@@ -981,12 +981,12 @@ Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - - Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fwrite)) -+ if (!TLI->has(LibFunc_fwrite)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); - LLVMContext &Context = B.GetInsertBlock()->getContext(); -- StringRef FWriteName = TLI->getName(LibFunc::fwrite); -+ StringRef FWriteName = TLI->getName(LibFunc_fwrite); - Constant *F = M->getOrInsertFunction( - FWriteName, DL.getIntPtrType(Context), B.getInt8PtrTy(), - DL.getIntPtrType(Context), DL.getIntPtrType(Context), File->getType(), -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -index 7bdc00c7..ec7937fc 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -@@ -308,7 +308,7 @@ bool llvm::obfuscateModule(Module &M, const TargetMachine *TM, Obfuscator &obfs, - TargetLibraryInfoImpl TLII(Triple(M.getTargetTriple())); - TargetLibraryInfo TLI(TLII); - auto isLibName = [&TLI](StringRef &S) { -- LibFunc::Func F; -+ LibFunc F; - return TLI.getLibFunc(S, F); - }; - -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -index fecded3c..b3238cbb 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -@@ -52,9 +52,9 @@ static cl::opt - // Helper Functions - //===----------------------------------------------------------------------===// - --static bool ignoreCallingConv(LibFunc::Func Func) { -- return Func == LibFunc::abs || Func == LibFunc::labs || -- Func == LibFunc::llabs || Func == LibFunc::strlen; -+static bool ignoreCallingConv(LibFunc Func) { -+ return Func == LibFunc_abs || Func == LibFunc_labs || -+ Func == LibFunc_llabs || Func == LibFunc_strlen; - } - - /// Return true if it only matters that the value is equal or not-equal to zero. -@@ -92,8 +92,8 @@ static bool callHasFloatingPointArgument(const CallInst *CI) { - /// \brief Check whether the overloaded unary floating point function - /// corresponding to \a Ty is available. - static bool hasUnaryFloatFn(const TargetLibraryInfo *TLI, Type *Ty, -- LibFunc::Func DoubleFn, LibFunc::Func FloatFn, -- LibFunc::Func LongDoubleFn) { -+ LibFunc DoubleFn, LibFunc FloatFn, -+ LibFunc LongDoubleFn) { - switch (Ty->getTypeID()) { - case Type::FloatTyID: - return TLI->has(FloatFn); -@@ -896,15 +896,15 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return Op1C; - // pow(2.0, x) -> exp2(x) - if (Op1C->isExactlyValue(2.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f, -- LibFunc::exp2l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp2), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp2, LibFunc_exp2f, -+ LibFunc_exp2l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp2), B, - Callee->getAttributes()); - // pow(10.0, x) -> exp10(x) - if (Op1C->isExactlyValue(10.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f, -- LibFunc::exp10l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp10, LibFunc_exp10f, -+ LibFunc_exp10l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp10), B, - Callee->getAttributes()); - } - -@@ -916,10 +916,10 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - // pow(exp(x), y) = pow(inf, 0.001) = inf, whereas exp(x*y) = exp(1). - auto *OpC = dyn_cast(Op1); - if (OpC && OpC->hasUnsafeAlgebra() && CI->hasUnsafeAlgebra()) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *OpCCallee = OpC->getCalledFunction(); - if (OpCCallee && TLI->getLibFunc(OpCCallee->getName(), Func) && -- TLI->has(Func) && (Func == LibFunc::exp || Func == LibFunc::exp2)) { -+ TLI->has(Func) && (Func == LibFunc_exp || Func == LibFunc_exp2)) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); - Value *FMul = B.CreateFMul(OpC->getArgOperand(0), Op2, "mul"); -@@ -936,16 +936,16 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return ConstantFP::get(CI->getType(), 1.0); - - if (Op2C->isExactlyValue(0.5) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::sqrt, LibFunc::sqrtf, -- LibFunc::sqrtl) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::fabs, LibFunc::fabsf, -- LibFunc::fabsl)) { -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_sqrt, LibFunc_sqrtf, -+ LibFunc_sqrtl) && -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_fabs, LibFunc_fabsf, -+ LibFunc_fabsl)) { - - // In -ffast-math, pow(x, 0.5) -> sqrt(x). - if (CI->hasUnsafeAlgebra()) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); -- return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B, -+ return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc_sqrt), B, - Callee->getAttributes()); - } - -@@ -1018,11 +1018,11 @@ Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilder<> &B) { - Value *Op = CI->getArgOperand(0); - // Turn exp2(sitofp(x)) -> ldexp(1.0, sext(x)) if sizeof(x) <= 32 - // Turn exp2(uitofp(x)) -> ldexp(1.0, zext(x)) if sizeof(x) < 32 -- LibFunc::Func LdExp = LibFunc::ldexpl; -+ LibFunc LdExp = LibFunc_ldexpl; - if (Op->getType()->isFloatTy()) -- LdExp = LibFunc::ldexpf; -+ LdExp = LibFunc_ldexpf; - else if (Op->getType()->isDoubleTy()) -- LdExp = LibFunc::ldexp; -+ LdExp = LibFunc_ldexp; - - if (TLI->has(LdExp)) { - Value *LdExpArg = nullptr; -@@ -1153,17 +1153,17 @@ Value *LibCallSimplifier::optimizeLog(CallInst *CI, IRBuilder<> &B) { - FMF.setUnsafeAlgebra(); - B.setFastMathFlags(FMF); - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && ((TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- Func == LibFunc::pow) || F->getIntrinsicID() == Intrinsic::pow)) -+ Func == LibFunc_pow) || F->getIntrinsicID() == Intrinsic::pow)) - return B.CreateFMul(OpC->getArgOperand(1), - emitUnaryFloatFnCall(OpC->getOperand(0), Callee->getName(), B, - Callee->getAttributes()), "mul"); - - // log(exp2(y)) -> y*log(2) - if (F && Name == "log" && TLI->getLibFunc(F->getName(), Func) && -- TLI->has(Func) && Func == LibFunc::exp2) -+ TLI->has(Func) && Func == LibFunc_exp2) - return B.CreateFMul( - OpC->getArgOperand(0), - emitUnaryFloatFnCall(ConstantFP::get(CI->getType(), 2.0), -@@ -1176,7 +1176,7 @@ Value *LibCallSimplifier::optimizeSqrt(CallInst *CI, IRBuilder<> &B) { - Function *Callee = CI->getCalledFunction(); - - Value *Ret = nullptr; -- if (TLI->has(LibFunc::sqrtf) && (Callee->getName() == "sqrt" || -+ if (TLI->has(LibFunc_sqrtf) && (Callee->getName() == "sqrt" || - Callee->getIntrinsicID() == Intrinsic::sqrt)) - Ret = optimizeUnaryDoubleFP(CI, B, true); - -@@ -1275,12 +1275,12 @@ Value *LibCallSimplifier::optimizeTan(CallInst *CI, IRBuilder<> &B) { - // tan(atan(x)) -> x - // tanf(atanf(x)) -> x - // tanl(atanl(x)) -> x -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- ((Func == LibFunc::atan && Callee->getName() == "tan") || -- (Func == LibFunc::atanf && Callee->getName() == "tanf") || -- (Func == LibFunc::atanl && Callee->getName() == "tanl"))) -+ ((Func == LibFunc_atan && Callee->getName() == "tan") || -+ (Func == LibFunc_atanf && Callee->getName() == "tanf") || -+ (Func == LibFunc_atanl && Callee->getName() == "tanl"))) - Ret = OpC->getArgOperand(0); - return Ret; - } -@@ -1348,24 +1348,24 @@ LibCallSimplifier::classifyArgUse(Value *Val, Function *F, bool IsFloat, - return; - - Function *Callee = CI->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - if (!Callee || !TLI->getLibFunc(*Callee, Func) || !TLI->has(Func) || - !isTrigLibCall(CI)) - return; - - if (IsFloat) { -- if (Func == LibFunc::sinpif) -+ if (Func == LibFunc_sinpif) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospif) -+ else if (Func == LibFunc_cospif) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospif_stret) -+ else if (Func == LibFunc_sincospif_stret) - SinCosCalls.push_back(CI); - } else { -- if (Func == LibFunc::sinpi) -+ if (Func == LibFunc_sinpi) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospi) -+ else if (Func == LibFunc_cospi) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospi_stret) -+ else if (Func == LibFunc_sincospi_stret) - SinCosCalls.push_back(CI); - } - } -@@ -1595,7 +1595,7 @@ Value *LibCallSimplifier::optimizePrintF(CallInst *CI, IRBuilder<> &B) { - - // printf(format, ...) -> iprintf(format, ...) if no floating point - // arguments. -- if (TLI->has(LibFunc::iprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_iprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *IPrintFFn = - M->getOrInsertFunction("iprintf", FT, Callee->getAttributes()); -@@ -1676,7 +1676,7 @@ Value *LibCallSimplifier::optimizeSPrintF(CallInst *CI, IRBuilder<> &B) { - - // sprintf(str, format, ...) -> siprintf(str, format, ...) if no floating - // point arguments. -- if (TLI->has(LibFunc::siprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_siprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *SIPrintFFn = - M->getOrInsertFunction("siprintf", FT, Callee->getAttributes()); -@@ -1746,7 +1746,7 @@ Value *LibCallSimplifier::optimizeFPrintF(CallInst *CI, IRBuilder<> &B) { - - // fprintf(stream, format, ...) -> fiprintf(stream, format, ...) if no - // floating point arguments. -- if (TLI->has(LibFunc::fiprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_fiprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *FIPrintFFn = - M->getOrInsertFunction("fiprintf", FT, Callee->getAttributes()); -@@ -1820,7 +1820,7 @@ Value *LibCallSimplifier::optimizePuts(CallInst *CI, IRBuilder<> &B) { - } - - bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { -- LibFunc::Func Func; -+ LibFunc Func; - SmallString<20> FloatFuncName = FuncName; - FloatFuncName += 'f'; - if (TLI->getLibFunc(FloatFuncName, Func)) -@@ -1830,7 +1830,7 @@ bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { - - Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - IRBuilder<> &Builder) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - // Check for string/memory library functions. - if (TLI->getLibFunc(*Callee, Func) && TLI->has(Func)) { -@@ -1839,51 +1839,51 @@ Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - CI->getCallingConv() == llvm::CallingConv::C) && - "Optimizing string/memory libcall would change the calling convention"); - switch (Func) { -- case LibFunc::strcat: -+ case LibFunc_strcat: - return optimizeStrCat(CI, Builder); -- case LibFunc::strncat: -+ case LibFunc_strncat: - return optimizeStrNCat(CI, Builder); -- case LibFunc::strchr: -+ case LibFunc_strchr: - return optimizeStrChr(CI, Builder); -- case LibFunc::strrchr: -+ case LibFunc_strrchr: - return optimizeStrRChr(CI, Builder); -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return optimizeStrCmp(CI, Builder); -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return optimizeStrNCmp(CI, Builder); -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - return optimizeStrCpy(CI, Builder); -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - return optimizeStpCpy(CI, Builder); -- case LibFunc::strncpy: -+ case LibFunc_strncpy: - return optimizeStrNCpy(CI, Builder); -- case LibFunc::strlen: -+ case LibFunc_strlen: - return optimizeStrLen(CI, Builder); -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return optimizeStrPBrk(CI, Builder); -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return optimizeStrTo(CI, Builder); -- case LibFunc::strspn: -+ case LibFunc_strspn: - return optimizeStrSpn(CI, Builder); -- case LibFunc::strcspn: -+ case LibFunc_strcspn: - return optimizeStrCSpn(CI, Builder); -- case LibFunc::strstr: -+ case LibFunc_strstr: - return optimizeStrStr(CI, Builder); -- case LibFunc::memchr: -+ case LibFunc_memchr: - return optimizeMemChr(CI, Builder); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return optimizeMemCmp(CI, Builder); -- case LibFunc::memcpy: -+ case LibFunc_memcpy: - return optimizeMemCpy(CI, Builder); -- case LibFunc::memmove: -+ case LibFunc_memmove: - return optimizeMemMove(CI, Builder); -- case LibFunc::memset: -+ case LibFunc_memset: - return optimizeMemSet(CI, Builder); - default: - break; -@@ -1896,7 +1896,7 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (CI->isNoBuiltin()) - return nullptr; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - StringRef FuncName = Callee->getName(); - -@@ -1957,110 +1957,110 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (Value *V = optimizeStringMemoryLibCall(CI, Builder)) - return V; - switch (Func) { -- case LibFunc::cosf: -- case LibFunc::cos: -- case LibFunc::cosl: -+ case LibFunc_cosf: -+ case LibFunc_cos: -+ case LibFunc_cosl: - return optimizeCos(CI, Builder); -- case LibFunc::sinpif: -- case LibFunc::sinpi: -- case LibFunc::cospif: -- case LibFunc::cospi: -+ case LibFunc_sinpif: -+ case LibFunc_sinpi: -+ case LibFunc_cospif: -+ case LibFunc_cospi: - return optimizeSinCosPi(CI, Builder); -- case LibFunc::powf: -- case LibFunc::pow: -- case LibFunc::powl: -+ case LibFunc_powf: -+ case LibFunc_pow: -+ case LibFunc_powl: - return optimizePow(CI, Builder); -- case LibFunc::exp2l: -- case LibFunc::exp2: -- case LibFunc::exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: - return optimizeExp2(CI, Builder); -- case LibFunc::fabsf: -- case LibFunc::fabs: -- case LibFunc::fabsl: -+ case LibFunc_fabsf: -+ case LibFunc_fabs: -+ case LibFunc_fabsl: - return optimizeFabs(CI, Builder); -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -- case LibFunc::sqrtl: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtl: - return optimizeSqrt(CI, Builder); -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: - return optimizeFFS(CI, Builder); -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return optimizeAbs(CI, Builder); -- case LibFunc::isdigit: -+ case LibFunc_isdigit: - return optimizeIsDigit(CI, Builder); -- case LibFunc::isascii: -+ case LibFunc_isascii: - return optimizeIsAscii(CI, Builder); -- case LibFunc::toascii: -+ case LibFunc_toascii: - return optimizeToAscii(CI, Builder); -- case LibFunc::printf: -+ case LibFunc_printf: - return optimizePrintF(CI, Builder); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return optimizeSPrintF(CI, Builder); -- case LibFunc::fprintf: -+ case LibFunc_fprintf: - return optimizeFPrintF(CI, Builder); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return optimizeFWrite(CI, Builder); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return optimizeFPuts(CI, Builder); -- case LibFunc::log: -- case LibFunc::log10: -- case LibFunc::log1p: -- case LibFunc::log2: -- case LibFunc::logb: -+ case LibFunc_log: -+ case LibFunc_log10: -+ case LibFunc_log1p: -+ case LibFunc_log2: -+ case LibFunc_logb: - return optimizeLog(CI, Builder); -- case LibFunc::puts: -+ case LibFunc_puts: - return optimizePuts(CI, Builder); -- case LibFunc::tan: -- case LibFunc::tanf: -- case LibFunc::tanl: -+ case LibFunc_tan: -+ case LibFunc_tanf: -+ case LibFunc_tanl: - return optimizeTan(CI, Builder); -- case LibFunc::perror: -+ case LibFunc_perror: - return optimizeErrorReporting(CI, Builder); -- case LibFunc::vfprintf: -- case LibFunc::fiprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_fiprintf: - return optimizeErrorReporting(CI, Builder, 0); -- case LibFunc::fputc: -+ case LibFunc_fputc: - return optimizeErrorReporting(CI, Builder, 1); -- case LibFunc::ceil: -- case LibFunc::floor: -- case LibFunc::rint: -- case LibFunc::round: -- case LibFunc::nearbyint: -- case LibFunc::trunc: -+ case LibFunc_ceil: -+ case LibFunc_floor: -+ case LibFunc_rint: -+ case LibFunc_round: -+ case LibFunc_nearbyint: -+ case LibFunc_trunc: - if (hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, false); - return nullptr; -- case LibFunc::acos: -- case LibFunc::acosh: -- case LibFunc::asin: -- case LibFunc::asinh: -- case LibFunc::atan: -- case LibFunc::atanh: -- case LibFunc::cbrt: -- case LibFunc::cosh: -- case LibFunc::exp: -- case LibFunc::exp10: -- case LibFunc::expm1: -- case LibFunc::sin: -- case LibFunc::sinh: -- case LibFunc::tanh: -+ case LibFunc_acos: -+ case LibFunc_acosh: -+ case LibFunc_asin: -+ case LibFunc_asinh: -+ case LibFunc_atan: -+ case LibFunc_atanh: -+ case LibFunc_cbrt: -+ case LibFunc_cosh: -+ case LibFunc_exp: -+ case LibFunc_exp10: -+ case LibFunc_expm1: -+ case LibFunc_sin: -+ case LibFunc_sinh: -+ case LibFunc_tanh: - if (UnsafeFPShrink && hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, true); - return nullptr; -- case LibFunc::copysign: -+ case LibFunc_copysign: - if (hasFloatVersion(FuncName)) - return optimizeBinaryDoubleFP(CI, Builder); - return nullptr; -- case LibFunc::fminf: -- case LibFunc::fmin: -- case LibFunc::fminl: -- case LibFunc::fmaxf: -- case LibFunc::fmax: -- case LibFunc::fmaxl: -+ case LibFunc_fminf: -+ case LibFunc_fmin: -+ case LibFunc_fminl: -+ case LibFunc_fmaxf: -+ case LibFunc_fmax: -+ case LibFunc_fmaxl: - return optimizeFMinFMax(CI, Builder); - default: - return nullptr; -@@ -2184,7 +2184,7 @@ Value *FortifiedLibCallSimplifier::optimizeMemSetChk(CallInst *CI, - - Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - const DataLayout &DL = CI->getModule()->getDataLayout(); -@@ -2192,7 +2192,7 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - *ObjSize = CI->getArgOperand(2); - - // __stpcpy_chk(x,x,...) -> x+strlen(x) -- if (Func == LibFunc::stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { -+ if (Func == LibFunc_stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { - Value *StrLen = emitStrLen(Src, B, DL, TLI); - return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr; - } -@@ -2218,14 +2218,14 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - Value *Ret = emitMemCpyChk(Dst, Src, LenV, ObjSize, B, DL, TLI); - // If the function was an __stpcpy_chk, and we were able to fold it into - // a __memcpy_chk, we still need to return the correct end pointer. -- if (Ret && Func == LibFunc::stpcpy_chk) -+ if (Ret && Func == LibFunc_stpcpy_chk) - return B.CreateGEP(B.getInt8Ty(), Dst, ConstantInt::get(SizeTTy, Len - 1)); - return Ret; - } - - Value *FortifiedLibCallSimplifier::optimizeStrpNCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - if (isFortifiedCallFoldable(CI, 3, 2, false)) { -@@ -2250,7 +2250,7 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - // - // PR23093. - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - - SmallVector OpBundles; -@@ -2268,17 +2268,17 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - return nullptr; - - switch (Func) { -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - return optimizeMemCpyChk(CI, Builder); -- case LibFunc::memmove_chk: -+ case LibFunc_memmove_chk: - return optimizeMemMoveChk(CI, Builder); -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - return optimizeMemSetChk(CI, Builder); -- case LibFunc::stpcpy_chk: -- case LibFunc::strcpy_chk: -+ case LibFunc_stpcpy_chk: -+ case LibFunc_strcpy_chk: - return optimizeStrpCpyChk(CI, Builder, Func); -- case LibFunc::stpncpy_chk: -- case LibFunc::strncpy_chk: -+ case LibFunc_stpncpy_chk: -+ case LibFunc_strncpy_chk: - return optimizeStrpNCpyChk(CI, Builder, Func); - default: - break; diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_musl.patch new file mode 120000 index 00000000000..435ae951cdc --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/libtapi_musl.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_musl.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/mingw_gcc710_i686.patch deleted file mode 100644 index 954f6ce3d60..00000000000 --- a/0_RootFS/GCCBootstrap@8/bundled/patches/mingw_gcc710_i686.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 431ac2a912708546cd7271332e9331399e66bc62 Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Wed, 3 May 2017 15:52:32 +0800 -Subject: [PATCH] winpthreads/src/dll_math.c: Implement `__divmoddi4()' for GCC - 7. - -GCC targeting i686 _may_ generate an external call to the function in -question when divding a 64-bit (DIMode) integer with another one. -Since we are linking against a fake libgcc, we have to implement it too. - -Signed-off-by: Liu Hao ---- - .../winpthreads/src/libgcc/dll_math.c | 27 ++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -index e09b481..aeec068 100644 ---- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -@@ -120,6 +120,7 @@ u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); - u_quad_t __udivdi3(u_quad_t a, u_quad_t b); - u_quad_t __umoddi3(u_quad_t a, u_quad_t b); - int __ucmpdi2(u_quad_t a, u_quad_t b); -+quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); - - #endif /* !_LIBKERN_QUAD_H_ */ - -@@ -546,6 +547,32 @@ __umoddi3(a, b) - (void)__qdivrem(a, b, &r); - return (r); - } -+ -+/* -+ * Divide two signed quads. -+ * This function is new in GCC 7. -+ */ -+quad_t -+__divmoddi4(a, b, rem) -+ quad_t a, b, *rem; -+{ -+ u_quad_t ua, ub, uq, ur; -+ int negq, negr; -+ -+ if (a < 0) -+ ua = -(u_quad_t)a, negq = 1, negr = 1; -+ else -+ ua = a, negq = 0, negr = 0; -+ if (b < 0) -+ ub = -(u_quad_t)b, negq ^= 1; -+ else -+ ub = b; -+ uq = __qdivrem(ua, ub, &ur); -+ if (rem) -+ *rem = (negr ? -ur : ur); -+ return (negq ? -uq : uq); -+} -+ - #else - static int __attribute__((unused)) dummy; - #endif /*deined (_X86_) && !defined (__x86_64__)*/ --- -2.7.4 - diff --git a/0_RootFS/GCCBootstrap@8/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@8/bundled/patches/mingw_gcc710_i686.patch new file mode 120000 index 00000000000..94de400d805 --- /dev/null +++ b/0_RootFS/GCCBootstrap@8/bundled/patches/mingw_gcc710_i686.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/mingw_gcc710_i686.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/binutils_freebsd_symbol_versioning.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/binutils_freebsd_symbol_versioning.patch deleted file mode 100644 index 02a73504795..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/binutils_freebsd_symbol_versioning.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc -index 444aef2942..8a3858d32b 100644 ---- a/ld/scripttempl/elf.sc -+++ b/ld/scripttempl/elf.sc -@@ -637,9 +637,9 @@ cat < -Date: Mon Sep 17 10:15:44 2018 +0000 - - GCC 4.8.X is too old to understand the `configure` argument `--with-native-system-header-dir=` - -diff --git a/gcc/config.gcc b/gcc/config.gcc -index b09a763d525..afe7ec1579d 100644 ---- a/gcc/config.gcc -+++ b/gcc/config.gcc -@@ -1504,7 +1504,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) - tmake_file="${tmake_file} i386/t-mingw-w32" - ;; - esac -- native_system_header_dir=/mingw/include -+ native_system_header_dir=/include - target_gtfiles="\$(srcdir)/config/i386/winnt.c" - extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" - case ${target} in -diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h -index 1ac55441725..74641126007 100644 ---- a/gcc/config/i386/mingw32.h -+++ b/gcc/config/i386/mingw32.h -@@ -152,7 +152,7 @@ along with GCC; see the file COPYING3. If not see - - /* Override startfile prefix defaults. */ - #ifndef STANDARD_STARTFILE_PREFIX_1 --#define STANDARD_STARTFILE_PREFIX_1 "/mingw/lib/" -+#define STANDARD_STARTFILE_PREFIX_1 "/lib/" - #endif - #ifndef STANDARD_STARTFILE_PREFIX_2 - #define STANDARD_STARTFILE_PREFIX_2 "" -@@ -161,7 +161,7 @@ along with GCC; see the file COPYING3. If not see - /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR - macro contains POSIX-style path. See bug 52947. */ - #undef NATIVE_SYSTEM_HEADER_DIR --#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include" -+#define NATIVE_SYSTEM_HEADER_DIR "/include" - - /* Output STRING, a string representing a filename, to FILE. - We canonicalize it to be in Unix format (backslashes are replaced diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/gcc485_mingw_include.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/gcc485_mingw_include.patch new file mode 120000 index 00000000000..a2b50298a2a --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/gcc485_mingw_include.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/gcc485_mingw_include.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-01.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-01.patch new file mode 120000 index 00000000000..c750d5a8835 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-01.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-01.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-02.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-02.patch new file mode 120000 index 00000000000..c2f8ca9cddb --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-02.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-02.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-03.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-03.patch new file mode 120000 index 00000000000..7f9b18ab810 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-03.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-03.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-04.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-04.patch new file mode 120000 index 00000000000..82f535d0ef6 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-04.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-04.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-05.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-05.patch new file mode 120000 index 00000000000..629c1a71ca7 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-05.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-05.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-06.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-06.patch new file mode 120000 index 00000000000..4682d7d2638 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-06.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-06.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-07.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-07.patch new file mode 120000 index 00000000000..ec0ff4fc245 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-07.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-07.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-08.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-08.patch new file mode 120000 index 00000000000..dd3d8002d07 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-08.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-08.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-09.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-09.patch new file mode 120000 index 00000000000..6160e1ff6c9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-09.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-09.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-10.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-10.patch new file mode 120000 index 00000000000..3b0eb446435 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-10.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-10.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-11.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-11.patch new file mode 120000 index 00000000000..1a8b2b1874a --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-11.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-11.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-12.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-12.patch new file mode 120000 index 00000000000..5c61ae4d308 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-12.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-12.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-13.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-13.patch new file mode 120000 index 00000000000..9fcd14da248 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-13.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-13.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-14.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-14.patch new file mode 120000 index 00000000000..2c105860a79 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-14.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-14.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-15.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-15.patch new file mode 120000 index 00000000000..553e804d24c --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-15.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-15.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-16.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-16.patch new file mode 120000 index 00000000000..45b396e6e16 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-16.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-16.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-17.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-17.patch new file mode 120000 index 00000000000..381198312d8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-17.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-17.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-18.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-18.patch new file mode 120000 index 00000000000..75da139edca --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-18.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-18.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-19.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-19.patch new file mode 120000 index 00000000000..15b94428f84 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-19.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-19.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-20.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-20.patch new file mode 120000 index 00000000000..363da6ff21d --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-20.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-20.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-21.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-21.patch new file mode 120000 index 00000000000..d0b5d34df23 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-21.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-21.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-22.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-22.patch new file mode 120000 index 00000000000..e33401a61ec --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-22.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-22.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-23.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-23.patch new file mode 120000 index 00000000000..e17c24162a4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-23.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-23.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-24.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-24.patch new file mode 120000 index 00000000000..dabf39e7b9c --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-24.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-24.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-25.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-25.patch new file mode 120000 index 00000000000..a1013682f68 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-25.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-25.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-26.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-26.patch new file mode 120000 index 00000000000..9d6541b9b82 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-26.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-26.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-27.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-27.patch new file mode 120000 index 00000000000..b4b0172a637 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-27.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-27.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-28.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-28.patch new file mode 120000 index 00000000000..422f6eab38f --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-28.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-28.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-29.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-29.patch new file mode 120000 index 00000000000..29c53da8ea3 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-29.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-29.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-30.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-30.patch new file mode 120000 index 00000000000..6d532a56d8d --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-30.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-30.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-31.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-31.patch new file mode 120000 index 00000000000..9b06be66e43 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-31.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-31.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-32.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-32.patch new file mode 120000 index 00000000000..ed3e7f02517 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-32.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-32.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-33.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-33.patch new file mode 120000 index 00000000000..468c085f789 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-33.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-33.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-34.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-34.patch new file mode 120000 index 00000000000..58778f0e720 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-34.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-34.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-35.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-35.patch new file mode 120000 index 00000000000..07ea002e01f --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-35.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-35.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-36.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-36.patch new file mode 120000 index 00000000000..3bc5b0034c8 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-36.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-36.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-37.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-37.patch new file mode 120000 index 00000000000..84f35423e52 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-37.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-37.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-38.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-38.patch new file mode 120000 index 00000000000..dc2041a6dfe --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-38.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-38.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-39.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-39.patch new file mode 120000 index 00000000000..edcdb4e0660 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-39.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-39.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-40.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-40.patch new file mode 120000 index 00000000000..d6664bac3ae --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-40.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-40.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-41.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-41.patch new file mode 120000 index 00000000000..024e01a1d93 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-41.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-41.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-42.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-42.patch new file mode 120000 index 00000000000..cc626e8bd3e --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-42.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-42.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-43.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-43.patch new file mode 120000 index 00000000000..78508bdced4 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-43.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-43.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-44.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-44.patch new file mode 120000 index 00000000000..abc87cc7705 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-44.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-44.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-45.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-45.patch new file mode 120000 index 00000000000..546a75ecf8b --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-45.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-45.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-46.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-46.patch new file mode 120000 index 00000000000..651cb9e3cca --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-46.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-46.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch new file mode 120000 index 00000000000..8c086355317 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-47-pwr6-mtfsf.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-48-ldbl_high.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-48-ldbl_high.patch new file mode 120000 index 00000000000..d6f0ec0b0f2 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc-ppc64le-48-ldbl_high.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc-ppc64le-48-ldbl_high.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_aarch64_relocation.patch deleted file mode 100644 index bb9ce8d4e06..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_aarch64_relocation.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c -index d8cdb7e24b..5e6e70a5bf 100644 ---- a/elf/dl-sysdep.c -+++ b/elf/dl-sysdep.c -@@ -108,7 +108,7 @@ _dl_sysdep_start (void **start_argptr, - #endif - - __libc_stack_end = DL_STACK_END (start_argptr); -- DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, INTUSE(_dl_argv), _environ, -+ DL_FIND_ARG_COMPONENTS (start_argptr, _dl_argc, _dl_argv, _environ, - GLRO(dl_auxv)); - - user_entry = (ElfW(Addr)) ENTRY_POINT; -diff --git a/elf/rtld.c b/elf/rtld.c -index 6dcbabc284..03209d695a 100644 ---- a/elf/rtld.c -+++ b/elf/rtld.c -@@ -83,7 +83,7 @@ int _dl_argc attribute_relro attribute_hidden; - char **_dl_argv attribute_relro = NULL; - unsigned int _dl_skip_args attribute_relro attribute_hidden; - #endif --INTDEF(_dl_argv) -+rtld_hidden_data_def (_dl_argv) - - #ifndef THREAD_SET_STACK_GUARD - /* Only exported for architectures that don't store the stack guard canary -@@ -634,7 +634,7 @@ dlmopen_doit (void *a) - args->map = _dl_open (args->fname, - (RTLD_LAZY | __RTLD_DLOPEN | __RTLD_AUDIT - | __RTLD_SECURE), -- dl_main, LM_ID_NEWLM, _dl_argc, INTUSE(_dl_argv), -+ dl_main, LM_ID_NEWLM, _dl_argc, _dl_argv, - __environ); - } - -@@ -952,55 +952,55 @@ dl_main (const ElfW(Phdr) *phdr, - GL(dl_rtld_map).l_name = rtld_progname; - - while (_dl_argc > 1) -- if (! strcmp (INTUSE(_dl_argv)[1], "--list")) -+ if (! strcmp (_dl_argv[1], "--list")) - { - mode = list; - GLRO(dl_lazy) = -1; /* This means do no dependency analysis. */ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--verify")) -+ else if (! strcmp (_dl_argv[1], "--verify")) - { - mode = verify; - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-cache")) -+ else if (! strcmp (_dl_argv[1], "--inhibit-cache")) - { - GLRO(dl_inhibit_cache) = 1; - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--library-path") -+ else if (! strcmp (_dl_argv[1], "--library-path") - && _dl_argc > 2) - { -- library_path = INTUSE(_dl_argv)[2]; -+ library_path = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--inhibit-rpath") -+ else if (! strcmp (_dl_argv[1], "--inhibit-rpath") - && _dl_argc > 2) - { -- GLRO(dl_inhibit_rpath) = INTUSE(_dl_argv)[2]; -+ GLRO(dl_inhibit_rpath) = _dl_argv[2]; - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } -- else if (! strcmp (INTUSE(_dl_argv)[1], "--audit") && _dl_argc > 2) -+ else if (! strcmp (_dl_argv[1], "--audit") && _dl_argc > 2) - { -- process_dl_audit (INTUSE(_dl_argv)[2]); -+ process_dl_audit (_dl_argv[2]); - - _dl_skip_args += 2; - _dl_argc -= 2; -- INTUSE(_dl_argv) += 2; -+ _dl_argv += 2; - } - else - break; -@@ -1034,7 +1034,7 @@ of this helper program; chances are you did not intend to run this program.\n\ - - ++_dl_skip_args; - --_dl_argc; -- ++INTUSE(_dl_argv); -+ ++_dl_argv; - - /* The initialization of _dl_stack_flags done below assumes the - executable's PT_GNU_STACK may have been honored by the kernel, and -@@ -1929,7 +1929,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - ElfW(Addr) loadbase; - lookup_t result; - -- result = _dl_lookup_symbol_x (INTUSE(_dl_argv)[i], main_map, -+ result = _dl_lookup_symbol_x (_dl_argv[i], main_map, - &ref, main_map->l_scope, - NULL, ELF_RTYPE_CLASS_PLT, - DL_LOOKUP_ADD_DEPENDENCY, NULL); -@@ -1937,7 +1937,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n", - loadbase = LOOKUP_VALUE_ADDRESS (result); - - _dl_printf ("%s found at 0x%0*Zd in object at 0x%0*Zd\n", -- INTUSE(_dl_argv)[i], -+ _dl_argv[i], - (int) sizeof ref->st_value * 2, - (size_t) ref->st_value, - (int) sizeof loadbase * 2, (size_t) loadbase); -diff --git a/ports/sysdeps/aarch64/dl-machine.h b/ports/sysdeps/aarch64/dl-machine.h -index 997c860ccb..09fb09c164 100644 ---- a/ports/sysdeps/aarch64/dl-machine.h -+++ b/ports/sysdeps/aarch64/dl-machine.h -@@ -49,23 +49,10 @@ elf_machine_load_address (void) - /* To figure out the load address we use the definition that for any symbol: - dynamic_addr(symbol) = static_addr(symbol) + load_addr - -- The choice of symbol is arbitrary. The static address we obtain -- by constructing a non GOT reference to the symbol, the dynamic -- address of the symbol we compute using adrp/add to compute the -- symbol's address relative to the PC. */ -- -- ElfW(Addr) static_addr; -- ElfW(Addr) dynamic_addr; -- -- asm (" \n\ -- adrp %1, _dl_start; \n\ -- add %1, %1, #:lo12:_dl_start \n\ -- ldr %w0, 1f \n\ -- b 2f \n\ --1: .word _dl_start \n\ --2: \n\ -- " : "=r" (static_addr), "=r" (dynamic_addr)); -- return dynamic_addr - static_addr; -+ _DYNAMIC sysmbol is used here as its link-time address stored in -+ the special unrelocated first GOT entry. */ -+ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; -+ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic (); - } - - /* Set up the loaded object described by L so its unrelocated PLT -@@ -169,8 +156,8 @@ _dl_start_user: \n\ - cmp x0, #0 \n\ - bne 1b \n\ - // Update _dl_argv \n\ -- adrp x3, _dl_argv \n\ -- str x2, [x3, #:lo12:_dl_argv] \n\ -+ adrp x3, __GI__dl_argv \n\ -+ str x2, [x3, #:lo12:__GI__dl_argv] \n\ - .L_done_stack_adjust: \n\ - // compute envp \n\ - add x3, x2, x1, lsl #3 \n\ -diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h -index ffeb093887..051bb4d954 100644 ---- a/sysdeps/generic/ldsodefs.h -+++ b/sysdeps/generic/ldsodefs.h -@@ -649,6 +649,7 @@ extern char **_dl_argv - attribute_relro - #endif - ; -+rtld_hidden_proto (_dl_argv) - #ifdef IS_IN_rtld - extern unsigned int _dl_skip_args attribute_hidden - # ifndef DL_ARGV_NOT_RELRO -@@ -660,15 +661,8 @@ extern unsigned int _dl_skip_args_internal attribute_hidden - attribute_relro - # endif - ; --extern char **_dl_argv_internal attribute_hidden --# ifndef DL_ARGV_NOT_RELRO -- attribute_relro --# endif -- ; --# define rtld_progname (INTUSE(_dl_argv)[0]) --#else --# define rtld_progname _dl_argv[0] - #endif -+# define rtld_progname _dl_argv[0] - - /* Flag set at startup and cleared when the last initializer has run. */ - extern int _dl_starting_up; diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_aarch64_relocation.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_aarch64_relocation.patch new file mode 120000 index 00000000000..23af0beaecb --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_aarch64_relocation.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_aarch64_relocation.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_arm_gcc_fix.patch deleted file mode 100644 index 4ab50ebcb5e..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_arm_gcc_fix.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 175cef4163dd60f95106cfd5f593b8a4e09d02c9 Mon Sep 17 00:00:00 2001 -From: Joseph Myers -Date: Tue, 20 May 2014 21:27:13 +0000 -Subject: [PATCH] Fix ARM build with GCC trunk. - -sysdeps/unix/sysv/linux/arm/unwind-resume.c and -sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c have static -variables that are written in C code but only read from toplevel asms. -Current GCC trunk now optimizes away such apparently write-only static -variables, so causing a build failure. This patch marks those -variables with __attribute_used__ to avoid that optimization. - -Tested that this fixes the build for ARM. - - * sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c - (libgcc_s_resume): Use __attribute_used__. - * sysdeps/unix/sysv/linux/arm/unwind-resume.c (libgcc_s_resume): - Likewise. ---- - sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c | 3 ++- - sysdeps/unix/sysv/linux/arm/unwind-resume.c | 3 ++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/nptl/sysdeps/pthread/unwind-forcedunwind.c b/nptl/sysdeps/pthread/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/nptl/sysdeps/pthread/unwind-forcedunwind.c -+++ b/nptl/sysdeps/pthread/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/gnu/unwind-resume.c b/sysdeps/gnu/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/sysdeps/gnu/unwind-resume.c -+++ b/sysdeps/gnu/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/unwind-forcedunwind.c -index 6ccd9b4..660d148 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c -@@ -22,7 +22,8 @@ - #include - - static void *libgcc_s_handle; --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - static _Unwind_Reason_Code (*libgcc_s_forcedunwind) -diff --git a/sysdeps/unix/sysv/linux/arm/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/unwind-resume.c -index bff3e2b..1f1eb71 100644 ---- a/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -+++ b/ports/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c -@@ -20,7 +20,8 @@ - #include - #include - --static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -+static void (*libgcc_s_resume) (struct _Unwind_Exception *exc) -+ __attribute_used__; - static _Unwind_Reason_Code (*libgcc_s_personality) - (_Unwind_State, struct _Unwind_Exception *, struct _Unwind_Context *); - --- -1.9.4 - diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_arm_gcc_fix.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_arm_gcc_fix.patch new file mode 120000 index 00000000000..13167359553 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_arm_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_arm_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_gcc_version.patch deleted file mode 100644 index 876e0585fda..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_gcc_version.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.old 2017-07-27 20:01:59.997750069 +0000 -+++ configure 2017-07-27 20:02:54.029053809 +0000 -@@ -5189,7 +5189,7 @@ - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.4* | 4.[0-9]* ) -+ 3.4* | 4.[0-9]* | 5.[0-9]* | 6.[0-9]* | 7.[0-9]* | 8.[0-9]* | 9.[0-9]* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_gcc_version.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_gcc_version.patch new file mode 120000 index 00000000000..473f7a525d9 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_gcc_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_gcc_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_i686_asm.patch deleted file mode 100644 index e2f8c86ec9d..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_i686_asm.patch +++ /dev/null @@ -1,49 +0,0 @@ -Submitted By: Matt Burgess -Date: 2010-04-18 -Initial Package Version: 2.11.1 -Upstream Status: Not Submitted -Origin: http://www.eglibc.org/archives/patches/msg00073.html -Description: Fixes the following build problem with GCC-4.5.0: - -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os -./sysdeps/i386/fpu/s_frexp.S: Assembler messages: -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.' -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1' -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if" -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1 - -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c 2010-04-17 11:34:06.882681001 +0000 -@@ -45,6 +45,11 @@ - /* Embed an #include to pull in the alignment and .end directives. */ - asm ("\n#include \"defs.h\""); - -+asm ("\n#if defined __i686 && defined __ASSEMBLER__"); -+asm ("\n#undef __i686"); -+asm ("\n#define __i686 __i686"); -+asm ("\n#endif"); -+ - /* The initial common code ends here. */ - asm ("\n/*@HEADER_ENDS*/"); - -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h 2009-12-08 20:10:20.000000000 +0000 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h 2010-04-17 11:34:06.882681001 +0000 -@@ -29,6 +29,10 @@ - #include - #include - -+#if defined __i686 && defined __ASSEMBLER__ -+#undef __i686 -+#define __i686 __i686 -+#endif - - /* For Linux we can use the system call table in the header file - /usr/include/asm/unistd.h diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_i686_asm.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_i686_asm.patch new file mode 120000 index 00000000000..35f065f0d0d --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_i686_asm.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_i686_asm.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_make_version.patch deleted file mode 100644 index 97d671c35b8..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_make_version.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/configure b/configure -index 8c9413b14c..2db4f2a481 100755 ---- a/configure -+++ b/configure -@@ -5252,7 +5252,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } - ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 3.79* | 3.[89]*) -+ 3.79* | 3.[89]* | 4*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - -diff --git a/configure.in b/configure.in -index 098adf4d35..35bf06e08b 100644 ---- a/configure.in -+++ b/configure.in -@@ -1026,11 +1026,11 @@ fi - # These programs are version sensitive. - AC_CHECK_TOOL_PREFIX - AC_CHECK_PROG_VER(CC, ${ac_tool_prefix}gcc ${ac_tool_prefix}cc, -v, -- [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* ], -+ [version \([egcygnustpi-]*[0-9.]*\)], [3.4* | 4.[0-9]* | 5.[0-9]* | 6.[0-9]* | 7.[0-9]* | 8.[0-9]* | 9.[0-9]* ], - critic_missing="$critic_missing gcc") - AC_CHECK_PROG_VER(MAKE, gnumake gmake make, --version, - [GNU Make[^0-9]*\([0-9][0-9.]*\)], -- [3.79* | 3.[89]*], critic_missing="$critic_missing make") -+ [3.79* | 3.[89]* | 4*], critic_missing="$critic_missing make") - - AC_CHECK_PROG_VER(MSGFMT, gnumsgfmt gmsgfmt msgfmt, --version, - [GNU gettext.* \([0-9]*\.[0-9.]*\)], diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_make_version.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_make_version.patch new file mode 120000 index 00000000000..1c6b268bfab --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_make_version.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_make_version.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection.patch deleted file mode 100644 index 49668244d52..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection.patch +++ /dev/null @@ -1,176 +0,0 @@ -commit ee14fe4c606fa577ae4375985b75ec0cb8e79fec -Author: Keno Fischer -Date: Fri Jun 22 18:03:46 2018 -0400 - - dl-load: Reject musl-linked libraries - - This prevents the glibc dynamic linker from considering shared - libraries linked against musl (similar to how it would reject - libraries for other architectures). - - See https://github.com/JuliaPackaging/BinaryBuilder.jl/issues/297 - -diff --git a/elf/dl-load.c b/elf/dl-load.c -index 7554a99..fe9e483 100644 ---- a/elf/dl-load.c -+++ b/elf/dl-load.c -@@ -46,6 +46,7 @@ - #include - #include - -+#include - - #include - #if BYTE_ORDER == BIG_ENDIAN -@@ -1382,6 +1383,60 @@ print_search_path (struct r_search_path_elem **list, - else - _dl_debug_printf_c ("\t\t(%s)\n", what); - } -+ -+struct known_names -+{ -+ const char *soname; -+ int flag; -+}; -+ -+static struct known_names known_libs[] = -+{ -+#ifdef SYSDEP_KNOWN_LIBRARY_NAMES -+ SYSDEP_KNOWN_LIBRARY_NAMES -+#endif -+}; -+ -+static int validate_lib(int fd, unsigned int dynamic_addr, unsigned int dynamic_size) -+{ -+ ElfW(Dyn) *dyn_entry; -+ ElfW(Dyn) *dynamic_segment = alloca(dynamic_size); -+ char fname[255]; -+ __lseek (fd, dynamic_addr, SEEK_SET); -+ if ((size_t) __libc_read (fd, (void *) dynamic_segment, dynamic_size) != dynamic_size) -+ { -+ return -2; -+ } -+ // Find the string table -+ unsigned int string_offset = 0; -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_STRTAB) { -+ string_offset = dyn_entry->d_un.d_val; -+ } -+ if (string_offset != 0) { -+ for (dyn_entry = dynamic_segment; dyn_entry->d_tag != DT_NULL; ++dyn_entry) -+ { -+ if (dyn_entry->d_tag == DT_NEEDED) { -+ __lseek (fd, string_offset + dyn_entry->d_un.d_val, SEEK_SET); -+ ssize_t nchars = __libc_read (fd, (void *)fname, 254); -+ if (nchars == -1) -+ return -2; -+ fname[nchars] = 0; -+ for (int j = 0; j < sizeof (known_libs) / sizeof (known_libs [0]); ++j) { -+ if (strcmp (fname, known_libs [j].soname) == 0) -+ { -+ if (known_libs [j].flag == FLAG_ELF_MUSL) -+ return 1; -+ } -+ } -+ } -+ } -+ } -+ } -+ return 0; -+} -+ - - /* Open a file and verify it is an ELF file for this architecture. We - ignore only ELF files for other architectures. Non-ELF files and -@@ -1427,6 +1482,8 @@ open_verify (const char *name, int fd, - } expected_note = { 4, 16, 1, "GNU" }; - /* Initialize it to make the compiler happy. */ - const char *errstring = NULL; -+ unsigned int dynamic_addr = 0; -+ unsigned int dynamic_size = 0; - int errval = 0; - - #ifdef SHARED -@@ -1618,8 +1675,15 @@ open_verify (const char *name, int fd, - loader, fd))) - goto close_and_out; - -+ dynamic_addr = 0; -+ dynamic_size = 0; - /* Check .note.ABI-tag if present. */ -- for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) -+ for (ph = phdr; ph < &phdr[ehdr->e_phnum]; ++ph) { -+ if (ph->p_type == PT_DYNAMIC) -+ { -+ dynamic_addr = ph->p_offset; -+ dynamic_size = ph->p_filesz; -+ } - if (ph->p_type == PT_NOTE && ph->p_filesz >= 32 && ph->p_align >= 4) - { - ElfW(Addr) size = ph->p_filesz; -@@ -1678,6 +1742,20 @@ open_verify (const char *name, int fd, - - break; - } -+ } -+ /* Check the dynamic section */ -+ if (dynamic_addr != 0) { -+ int err = validate_lib(fd, dynamic_addr, dynamic_size); -+ if (err == -2) { -+ errstring = N_("failed to read file"); -+ goto call_lose; -+ } -+ else if (err != 0) { -+ __close (fd); -+ __set_errno (ENOENT); -+ fd = -1; -+ } -+ } - } - - return fd; -diff --git a/elf/ldconfig.c b/elf/ldconfig.c -index fbdd814..53a1f87 100644 ---- a/elf/ldconfig.c -+++ b/elf/ldconfig.c -@@ -875,6 +875,16 @@ search_dir (const struct dir_entry *entry) - add_to_aux_cache (&lstat_buf, flag, osversion, soname); - } - -+ /* Don't try to load MUSL-dependent libraries */ -+ if ((flag & FLAG_TYPE_MASK) == FLAG_ELF_MUSL) -+ { -+ if (real_name != real_file_name) -+ free (real_name); -+ if (opt_verbose) -+ error (0, 0, _("Skipping musl-linked library %s"), file_name); -+ continue; -+ } -+ - if (soname == NULL) - soname = implicit_soname (direntry->d_name, flag); - -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index 59e20dc..13c4215 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -27,6 +27,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 -diff --git a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -index c7e9ad6..abd724e 100644 ---- a/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -+++ b/sysdeps/unix/sysv/linux/x86_64/ldconfig.h -@@ -23,4 +23,5 @@ - { "/lib64/ld-linux-x86-64.so.2", FLAG_ELF_LIBC6 }, - #define SYSDEP_KNOWN_LIBRARY_NAMES \ - { "libc.so.6", FLAG_ELF_LIBC6 }, \ -- { "libm.so.6", FLAG_ELF_LIBC6 }, -+ { "libm.so.6", FLAG_ELF_LIBC6 }, \ -+ { "libc.musl-x86_64.so.1", FLAG_ELF_MUSL } diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection.patch new file mode 120000 index 00000000000..81a4040c7fd --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection_old.patch deleted file mode 100644 index a400df39623..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection_old.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/sysdeps/generic/ldconfig.h b/sysdeps/generic/ldconfig.h -index fadd5ec370..cb6b6d53b7 100644 ---- a/sysdeps/generic/ldconfig.h -+++ b/sysdeps/generic/ldconfig.h -@@ -26,6 +26,7 @@ - #define FLAG_ELF 0x0001 - #define FLAG_ELF_LIBC5 0x0002 - #define FLAG_ELF_LIBC6 0x0003 -+#define FLAG_ELF_MUSL 0x0004 - #define FLAG_REQUIRED_MASK 0xff00 - #define FLAG_SPARC_LIB64 0x0100 - #define FLAG_IA64_LIB64 0x0200 diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection_old.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection_old.patch new file mode 120000 index 00000000000..31d164c349c --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_musl_rejection_old.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_musl_rejection_old.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_nocommon.patch deleted file mode 100644 index 6fbd074443f..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_nocommon.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- ./malloc/obstack.c.old 2017-10-27 17:08:52.000000000 -0400 -+++ ./malloc/obstack.c 2017-10-27 17:09:54.000000000 -0400 -@@ -117,7 +117,7 @@ - /* A looong time ago (before 1994, anyway; we're not sure) this global variable - was used by non-GNU-C macros to avoid multiple evaluation. The GNU C - library still exports it because somebody might use it. */ --struct obstack *_obstack_compat; -+struct obstack *_obstack_compat __attribute__((nocommon)); - compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0); - # endif - # endif diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_nocommon.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_nocommon.patch new file mode 120000 index 00000000000..5b375100acb --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_powerpc64le_gcc_fix.patch deleted file mode 100644 index 8bc77f56d70..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_powerpc64le_gcc_fix.patch +++ /dev/null @@ -1,198 +0,0 @@ -From db8fed87d9741b6b3da6c2257f01d63ef2fe407c Mon Sep 17 00:00:00 2001 -From: Martin Sebor -Date: Mon, 1 Jun 2015 14:12:09 -0300 -Subject: [PATCH] powerpc: setcontext.S uses power6 mtfsf when not supported - [BZ #18116] - -The attached patch fixes a glibc build failure with gcc 5 on powerpc64le -caused by a recent change in gcc where the compiler defines the -_ARCH_PWR6 macro when processing assembly files but doesn't invoke the -assembler in the corresponding machine mode (unless it has been -explicitly configured to target POWER 6 or later). A bug had been filed -with gcc for this (65341) but was closed as won't fix. Glibc relies on -the _ARCH_PWR6 macro in a few .S files to make use of Power ISA 2.5 -instructions (specifically, the four-argument form of the mtfsf insn). -A similar problem had occurred in the past (bug 10118) but the fix that -was committed for it didn't anticipate this new problem. ---- - ChangeLog | 9 ++++++ - .../unix/sysv/linux/powerpc/powerpc64/setcontext.S | 30 ++++++++++++++---- - .../sysv/linux/powerpc/powerpc64/swapcontext.S | 36 +++++++++++++++++----- - 3 files changed, 61 insertions(+), 14 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 6d295e7..239a0e6 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,12 @@ -+2015-03-11 Martin Sebor -+ -+ [BZ #18116] -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+ (__setcontext): Use extended four-operand version of mtsf whenever -+ possible. -+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+ (__novec_swapcontext): Likewise. -+ - 2015-06-01 Siddhesh Poyarekar - - * benchtests/scripts/compare_bench.py: New file. -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -index e47a57a..8a08dc4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S -@@ -81,22 +81,31 @@ ENTRY(__novec_setcontext) - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 5f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -364,22 +373,31 @@ L(has_no_vec): - - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r5,PPC_FEATURE_HAS_DFP - beq 7f - /* Use the extended four-operand version of the mtfsf insn. */ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - # endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -index bc02a21..2421ca4 100644 ---- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S -@@ -173,24 +173,34 @@ ENTRY(__novec_swapcontext) - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 5f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 6f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 5: - mtfsf 0xff,fp0 - 6: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) -@@ -652,24 +662,34 @@ L(has_no_vec2): - lfd fp0,(SIGCONTEXT_FP_REGS+(32*8))(r31) - lfd fp31,(SIGCONTEXT_FP_REGS+(PT_R31*8))(r31) - lfd fp30,(SIGCONTEXT_FP_REGS+(PT_R30*8))(r31) -+ - # ifdef _ARCH_PWR6 - /* Use the extended four-operand version of the mtfsf insn. */ -- mtfsf 0xff,fp0,1,0 --# else - .machine push - .machine "power6" -+ -+ mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+# else - /* Availability of DFP indicates a 64-bit FPSCR. */ - andi. r6,r8,PPC_FEATURE_HAS_DFP - beq 7f -- /* Use the extended four-operand version of the mtfsf insn. */ -+ -+ .machine push -+ .machine "power6" -+ - mtfsf 0xff,fp0,1,0 -+ -+ .machine pop -+ - b 8f - /* Continue to operate on the FPSCR as if it were 32-bits. */ - 7: - mtfsf 0xff,fp0 - 8: -- .machine pop - #endif /* _ARCH_PWR6 */ -+ - lfd fp29,(SIGCONTEXT_FP_REGS+(PT_R29*8))(r31) - lfd fp28,(SIGCONTEXT_FP_REGS+(PT_R28*8))(r31) - lfd fp27,(SIGCONTEXT_FP_REGS+(PT_R27*8))(r31) --- -2.9.3 - diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_powerpc64le_gcc_fix.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_powerpc64le_gcc_fix.patch new file mode 120000 index 00000000000..206ed74aa45 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_powerpc64le_gcc_fix.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_powerpc64le_gcc_fix.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_regexp_nocommon.patch deleted file mode 100644 index 98bd10251e3..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_regexp_nocommon.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- misc/regexp.c.old 2017-10-28 12:54:11.000000000 -0400 -+++ misc/regexp.c 2017-10-28 12:54:37.000000000 -0400 -@@ -30,13 +30,13 @@ - #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_23) - - /* Define the variables used for the interface. */ --char *loc1; --char *loc2; -+char *loc1 __attribute__((nocommon)); -+char *loc2 __attribute__((nocommon)); - compat_symbol (libc, loc1, loc1, GLIBC_2_0); - compat_symbol (libc, loc2, loc2, GLIBC_2_0); - - /* Although we do not support the use we define this variable as well. */ --char *locs; -+char *locs __attribute__((nocommon)); - compat_symbol (libc, locs, locs, GLIBC_2_0); - - diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_regexp_nocommon.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_regexp_nocommon.patch new file mode 120000 index 00000000000..1a10ef2694b --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_regexp_nocommon.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_regexp_nocommon.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_sunrpc.patch deleted file mode 100644 index d7fdf48316d..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_sunrpc.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- sunrpc/rpc/types.h.old -+++ sunrpc/rpc/types.h -@@ -69,7 +69,7 @@ - #include - #endif - --#ifndef __u_char_defined -+#if 0 - typedef __u_char u_char; - typedef __u_short u_short; - typedef __u_int u_int; -@@ -79,7 +79,7 @@ - typedef __fsid_t fsid_t; - # define __u_char_defined - #endif --#ifndef __daddr_t_defined -+#if 0 - typedef __daddr_t daddr_t; - typedef __caddr_t caddr_t; - # define __daddr_t_defined diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_sunrpc.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_sunrpc.patch new file mode 120000 index 00000000000..9359558d4e0 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/glibc_sunrpc.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/glibc_sunrpc.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_fullyaml.patch deleted file mode 100644 index fc8b4e8e120..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_fullyaml.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -index ca62890e..6038c13b 100644 ---- a/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -+++ b/src/llvm/projects/clang/lib/Tooling/Refactor/RefactoringOptions.cpp -@@ -26,7 +26,7 @@ void RefactoringOptionSet::print(llvm::raw_ostream &OS) const { - } - } - --template <> struct CustomMappingTraits { -+template <> struct llvm::yaml::CustomMappingTraits { - static void inputOne(IO &YamlIn, StringRef Key, - RefactoringOptionSet &Result) { - #define HANDLE(Type) \ diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_fullyaml.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_fullyaml.patch new file mode 120000 index 00000000000..8c24845b566 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_fullyaml.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_fullyaml.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_musl.patch deleted file mode 100644 index d0b09c58c31..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_musl.patch +++ /dev/null @@ -1,3851 +0,0 @@ -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -index 7798e3c8..dc890373 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.def -@@ -20,7 +20,7 @@ - // One of TLI_DEFINE_ENUM/STRING are defined. - - #if defined(TLI_DEFINE_ENUM) --#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) enum_variant, -+#define TLI_DEFINE_ENUM_INTERNAL(enum_variant) LibFunc_##enum_variant, - #define TLI_DEFINE_STRING_INTERNAL(string_repr) - #else - #define TLI_DEFINE_ENUM_INTERNAL(enum_variant) -diff --git a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -index 2cba44bc..25ae5449 100644 ---- a/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -+++ b/src/apple-llvm/src/include/llvm/Analysis/TargetLibraryInfo.h -@@ -29,14 +29,12 @@ struct VecDesc { - }; - class PreservedAnalyses; - -- namespace LibFunc { -- enum Func { -+ enum LibFunc { - #define TLI_DEFINE_ENUM - #include "llvm/Analysis/TargetLibraryInfo.def" - - NumLibFuncs - }; -- } - - /// \brief Implementation of the target library information. - /// -@@ -47,20 +45,20 @@ class PreservedAnalyses; - class TargetLibraryInfoImpl { - friend class TargetLibraryInfo; - -- unsigned char AvailableArray[(LibFunc::NumLibFuncs+3)/4]; -+ unsigned char AvailableArray[(NumLibFuncs+3)/4]; - llvm::DenseMap CustomNames; -- static const char *const StandardNames[LibFunc::NumLibFuncs]; -+ static const char *const StandardNames[NumLibFuncs]; - - enum AvailabilityState { - StandardName = 3, // (memset to all ones) - CustomName = 1, - Unavailable = 0 // (memset to all zeros) - }; -- void setState(LibFunc::Func F, AvailabilityState State) { -+ void setState(LibFunc F, AvailabilityState State) { - AvailableArray[F/4] &= ~(3 << 2*(F&3)); - AvailableArray[F/4] |= State << 2*(F&3); - } -- AvailabilityState getState(LibFunc::Func F) const { -+ AvailabilityState getState(LibFunc F) const { - return static_cast((AvailableArray[F/4] >> 2*(F&3)) & 3); - } - -@@ -72,7 +70,7 @@ class TargetLibraryInfoImpl { - - /// Return true if the function type FTy is valid for the library function - /// F, regardless of whether the function is available. -- bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc::Func F, -+ bool isValidProtoForLibFunc(const FunctionType &FTy, LibFunc F, - const DataLayout *DL) const; - - public: -@@ -101,28 +99,28 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const; -+ bool getLibFunc(StringRef funcName, LibFunc &F) const; - - /// Searches for a particular function name, also checking that its type is - /// valid for the library function matching that name. - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const; -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const; - - /// \brief Forces a function to be marked as unavailable. -- void setUnavailable(LibFunc::Func F) { -+ void setUnavailable(LibFunc F) { - setState(F, Unavailable); - } - - /// \brief Forces a function to be marked as available. -- void setAvailable(LibFunc::Func F) { -+ void setAvailable(LibFunc F) { - setState(F, StandardName); - } - - /// \brief Forces a function to be marked as available and provide an - /// alternate name that must be used. -- void setAvailableWithName(LibFunc::Func F, StringRef Name) { -+ void setAvailableWithName(LibFunc F, StringRef Name) { - if (StandardNames[F] != Name) { - setState(F, CustomName); - CustomNames[F] = Name; -@@ -203,16 +201,16 @@ public: - /// - /// If it is one of the known library functions, return true and set F to the - /// corresponding value. -- bool getLibFunc(StringRef funcName, LibFunc::Func &F) const { -+ bool getLibFunc(StringRef funcName, LibFunc &F) const { - return Impl->getLibFunc(funcName, F); - } - -- bool getLibFunc(const Function &FDecl, LibFunc::Func &F) const { -+ bool getLibFunc(const Function &FDecl, LibFunc &F) const { - return Impl->getLibFunc(FDecl, F); - } - - /// \brief Tests whether a library function is available. -- bool has(LibFunc::Func F) const { -+ bool has(LibFunc F) const { - return Impl->getState(F) != TargetLibraryInfoImpl::Unavailable; - } - bool isFunctionVectorizable(StringRef F, unsigned VF) const { -@@ -227,37 +225,37 @@ public: - - /// \brief Tests if the function is both available and a candidate for - /// optimized code generation. -- bool hasOptimizedCodeGen(LibFunc::Func F) const { -+ bool hasOptimizedCodeGen(LibFunc F) const { - if (Impl->getState(F) == TargetLibraryInfoImpl::Unavailable) - return false; - switch (F) { - default: break; -- case LibFunc::copysign: case LibFunc::copysignf: case LibFunc::copysignl: -- case LibFunc::fabs: case LibFunc::fabsf: case LibFunc::fabsl: -- case LibFunc::sin: case LibFunc::sinf: case LibFunc::sinl: -- case LibFunc::cos: case LibFunc::cosf: case LibFunc::cosl: -- case LibFunc::sqrt: case LibFunc::sqrtf: case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -- case LibFunc::fmax: case LibFunc::fmaxf: case LibFunc::fmaxl: -- case LibFunc::fmin: case LibFunc::fminf: case LibFunc::fminl: -- case LibFunc::floor: case LibFunc::floorf: case LibFunc::floorl: -- case LibFunc::nearbyint: case LibFunc::nearbyintf: case LibFunc::nearbyintl: -- case LibFunc::ceil: case LibFunc::ceilf: case LibFunc::ceill: -- case LibFunc::rint: case LibFunc::rintf: case LibFunc::rintl: -- case LibFunc::round: case LibFunc::roundf: case LibFunc::roundl: -- case LibFunc::trunc: case LibFunc::truncf: case LibFunc::truncl: -- case LibFunc::log2: case LibFunc::log2f: case LibFunc::log2l: -- case LibFunc::exp2: case LibFunc::exp2f: case LibFunc::exp2l: -- case LibFunc::memcmp: case LibFunc::strcmp: case LibFunc::strcpy: -- case LibFunc::stpcpy: case LibFunc::strlen: case LibFunc::strnlen: -- case LibFunc::memchr: -+ case LibFunc_copysign: case LibFunc_copysignf: case LibFunc_copysignl: -+ case LibFunc_fabs: case LibFunc_fabsf: case LibFunc_fabsl: -+ case LibFunc_sin: case LibFunc_sinf: case LibFunc_sinl: -+ case LibFunc_cos: case LibFunc_cosf: case LibFunc_cosl: -+ case LibFunc_sqrt: case LibFunc_sqrtf: case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: -+ case LibFunc_fmax: case LibFunc_fmaxf: case LibFunc_fmaxl: -+ case LibFunc_fmin: case LibFunc_fminf: case LibFunc_fminl: -+ case LibFunc_floor: case LibFunc_floorf: case LibFunc_floorl: -+ case LibFunc_nearbyint: case LibFunc_nearbyintf: case LibFunc_nearbyintl: -+ case LibFunc_ceil: case LibFunc_ceilf: case LibFunc_ceill: -+ case LibFunc_rint: case LibFunc_rintf: case LibFunc_rintl: -+ case LibFunc_round: case LibFunc_roundf: case LibFunc_roundl: -+ case LibFunc_trunc: case LibFunc_truncf: case LibFunc_truncl: -+ case LibFunc_log2: case LibFunc_log2f: case LibFunc_log2l: -+ case LibFunc_exp2: case LibFunc_exp2f: case LibFunc_exp2l: -+ case LibFunc_memcmp: case LibFunc_strcmp: case LibFunc_strcpy: -+ case LibFunc_stpcpy: case LibFunc_strlen: case LibFunc_strnlen: -+ case LibFunc_memchr: - return true; - } - return false; - } - -- StringRef getName(LibFunc::Func F) const { -+ StringRef getName(LibFunc F) const { - auto State = Impl->getState(F); - if (State == TargetLibraryInfoImpl::Unavailable) - return StringRef(); -diff --git a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -index 6ec531f8..e50c779c 100644 ---- a/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -+++ b/src/apple-llvm/src/include/llvm/Transforms/Utils/SimplifyLibCalls.h -@@ -56,8 +56,8 @@ private: - Value *optimizeMemSetChk(CallInst *CI, IRBuilder<> &B); - - // Str/Stp cpy are similar enough to be handled in the same functions. -- Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -- Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc::Func Func); -+ Value *optimizeStrpCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); -+ Value *optimizeStrpNCpyChk(CallInst *CI, IRBuilder<> &B, LibFunc Func); - - /// \brief Checks whether the call \p CI to a fortified libcall is foldable - /// to the non-fortified version. -diff --git a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -index ec712a31..058f1aef 100644 ---- a/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -+++ b/src/apple-llvm/src/lib/Analysis/BasicAliasAnalysis.cpp -@@ -613,9 +613,9 @@ static bool isWriteOnlyParam(ImmutableCallSite CS, unsigned ArgIdx, - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. Note that all but the missing writeonly attribute are - // handled via InferFunctionAttr. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) -+ F == LibFunc_memset_pattern16 && TLI.has(F)) - if (ArgIdx == 0) - return true; - -diff --git a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -index ccb56631..18ce21de 100644 ---- a/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -+++ b/src/apple-llvm/src/lib/Analysis/ConstantFolding.cpp -@@ -1501,51 +1501,51 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - switch (Name[0]) { - case 'a': -- if ((Name == "acos" && TLI->has(LibFunc::acos)) || -- (Name == "acosf" && TLI->has(LibFunc::acosf))) -+ if ((Name == "acos" && TLI->has(LibFunc_acos)) || -+ (Name == "acosf" && TLI->has(LibFunc_acosf))) - return ConstantFoldFP(acos, V, Ty); -- else if ((Name == "asin" && TLI->has(LibFunc::asin)) || -- (Name == "asinf" && TLI->has(LibFunc::asinf))) -+ else if ((Name == "asin" && TLI->has(LibFunc_asin)) || -+ (Name == "asinf" && TLI->has(LibFunc_asinf))) - return ConstantFoldFP(asin, V, Ty); -- else if ((Name == "atan" && TLI->has(LibFunc::atan)) || -- (Name == "atanf" && TLI->has(LibFunc::atanf))) -+ else if ((Name == "atan" && TLI->has(LibFunc_atan)) || -+ (Name == "atanf" && TLI->has(LibFunc_atanf))) - return ConstantFoldFP(atan, V, Ty); - break; - case 'c': -- if ((Name == "ceil" && TLI->has(LibFunc::ceil)) || -- (Name == "ceilf" && TLI->has(LibFunc::ceilf))) -+ if ((Name == "ceil" && TLI->has(LibFunc_ceil)) || -+ (Name == "ceilf" && TLI->has(LibFunc_ceilf))) - return ConstantFoldFP(ceil, V, Ty); -- else if ((Name == "cos" && TLI->has(LibFunc::cos)) || -- (Name == "cosf" && TLI->has(LibFunc::cosf))) -+ else if ((Name == "cos" && TLI->has(LibFunc_cos)) || -+ (Name == "cosf" && TLI->has(LibFunc_cosf))) - return ConstantFoldFP(cos, V, Ty); -- else if ((Name == "cosh" && TLI->has(LibFunc::cosh)) || -- (Name == "coshf" && TLI->has(LibFunc::coshf))) -+ else if ((Name == "cosh" && TLI->has(LibFunc_cosh)) || -+ (Name == "coshf" && TLI->has(LibFunc_coshf))) - return ConstantFoldFP(cosh, V, Ty); - break; - case 'e': -- if ((Name == "exp" && TLI->has(LibFunc::exp)) || -- (Name == "expf" && TLI->has(LibFunc::expf))) -+ if ((Name == "exp" && TLI->has(LibFunc_exp)) || -+ (Name == "expf" && TLI->has(LibFunc_expf))) - return ConstantFoldFP(exp, V, Ty); -- if ((Name == "exp2" && TLI->has(LibFunc::exp2)) || -- (Name == "exp2f" && TLI->has(LibFunc::exp2f))) -+ if ((Name == "exp2" && TLI->has(LibFunc_exp2)) || -+ (Name == "exp2f" && TLI->has(LibFunc_exp2f))) - // Constant fold exp2(x) as pow(2,x) in case the host doesn't have a - // C99 library. - return ConstantFoldBinaryFP(pow, 2.0, V, Ty); - break; - case 'f': -- if ((Name == "fabs" && TLI->has(LibFunc::fabs)) || -- (Name == "fabsf" && TLI->has(LibFunc::fabsf))) -+ if ((Name == "fabs" && TLI->has(LibFunc_fabs)) || -+ (Name == "fabsf" && TLI->has(LibFunc_fabsf))) - return ConstantFoldFP(fabs, V, Ty); -- else if ((Name == "floor" && TLI->has(LibFunc::floor)) || -- (Name == "floorf" && TLI->has(LibFunc::floorf))) -+ else if ((Name == "floor" && TLI->has(LibFunc_floor)) || -+ (Name == "floorf" && TLI->has(LibFunc_floorf))) - return ConstantFoldFP(floor, V, Ty); - break; - case 'l': -- if ((Name == "log" && V > 0 && TLI->has(LibFunc::log)) || -- (Name == "logf" && V > 0 && TLI->has(LibFunc::logf))) -+ if ((Name == "log" && V > 0 && TLI->has(LibFunc_log)) || -+ (Name == "logf" && V > 0 && TLI->has(LibFunc_logf))) - return ConstantFoldFP(log, V, Ty); -- else if ((Name == "log10" && V > 0 && TLI->has(LibFunc::log10)) || -- (Name == "log10f" && V > 0 && TLI->has(LibFunc::log10f))) -+ else if ((Name == "log10" && V > 0 && TLI->has(LibFunc_log10)) || -+ (Name == "log10f" && V > 0 && TLI->has(LibFunc_log10f))) - return ConstantFoldFP(log10, V, Ty); - else if (IntrinsicID == Intrinsic::sqrt && - (Ty->isHalfTy() || Ty->isFloatTy() || Ty->isDoubleTy())) { -@@ -1562,22 +1562,22 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - } - break; - case 's': -- if ((Name == "sin" && TLI->has(LibFunc::sin)) || -- (Name == "sinf" && TLI->has(LibFunc::sinf))) -+ if ((Name == "sin" && TLI->has(LibFunc_sin)) || -+ (Name == "sinf" && TLI->has(LibFunc_sinf))) - return ConstantFoldFP(sin, V, Ty); -- else if ((Name == "sinh" && TLI->has(LibFunc::sinh)) || -- (Name == "sinhf" && TLI->has(LibFunc::sinhf))) -+ else if ((Name == "sinh" && TLI->has(LibFunc_sinh)) || -+ (Name == "sinhf" && TLI->has(LibFunc_sinhf))) - return ConstantFoldFP(sinh, V, Ty); -- else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc::sqrt)) || -- (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc::sqrtf))) -+ else if ((Name == "sqrt" && V >= 0 && TLI->has(LibFunc_sqrt)) || -+ (Name == "sqrtf" && V >= 0 && TLI->has(LibFunc_sqrtf))) - return ConstantFoldFP(sqrt, V, Ty); - break; - case 't': -- if ((Name == "tan" && TLI->has(LibFunc::tan)) || -- (Name == "tanf" && TLI->has(LibFunc::tanf))) -+ if ((Name == "tan" && TLI->has(LibFunc_tan)) || -+ (Name == "tanf" && TLI->has(LibFunc_tanf))) - return ConstantFoldFP(tan, V, Ty); -- else if ((Name == "tanh" && TLI->has(LibFunc::tanh)) || -- (Name == "tanhf" && TLI->has(LibFunc::tanhf))) -+ else if ((Name == "tanh" && TLI->has(LibFunc_tanh)) || -+ (Name == "tanhf" && TLI->has(LibFunc_tanhf))) - return ConstantFoldFP(tanh, V, Ty); - break; - default: -@@ -1680,14 +1680,14 @@ static Constant *ConstantFoldScalarCall(StringRef Name, unsigned IntrinsicID, - - if (!TLI) - return nullptr; -- if ((Name == "pow" && TLI->has(LibFunc::pow)) || -- (Name == "powf" && TLI->has(LibFunc::powf))) -+ if ((Name == "pow" && TLI->has(LibFunc_pow)) || -+ (Name == "powf" && TLI->has(LibFunc_powf))) - return ConstantFoldBinaryFP(pow, Op1V, Op2V, Ty); -- if ((Name == "fmod" && TLI->has(LibFunc::fmod)) || -- (Name == "fmodf" && TLI->has(LibFunc::fmodf))) -+ if ((Name == "fmod" && TLI->has(LibFunc_fmod)) || -+ (Name == "fmodf" && TLI->has(LibFunc_fmodf))) - return ConstantFoldBinaryFP(fmod, Op1V, Op2V, Ty); -- if ((Name == "atan2" && TLI->has(LibFunc::atan2)) || -- (Name == "atan2f" && TLI->has(LibFunc::atan2f))) -+ if ((Name == "atan2" && TLI->has(LibFunc_atan2)) || -+ (Name == "atan2f" && TLI->has(LibFunc_atan2f))) - return ConstantFoldBinaryFP(atan2, Op1V, Op2V, Ty); - } else if (ConstantInt *Op2C = dyn_cast(Operands[1])) { - if (IntrinsicID == Intrinsic::powi && Ty->isHalfTy()) -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -index 480ab5cd..f6d83716 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryBuiltins.cpp -@@ -42,7 +42,7 @@ enum AllocType : uint8_t { - }; - - struct AllocFnsTy { -- LibFunc::Func Func; -+ LibFunc Func; - AllocType AllocTy; - unsigned char NumParams; - // First and Second size parameters (or -1 if unused) -@@ -52,29 +52,29 @@ struct AllocFnsTy { - // FIXME: certain users need more information. E.g., SimplifyLibCalls needs to - // know which functions are nounwind, noalias, nocapture parameters, etc. - static const AllocFnsTy AllocationFnData[] = { -- {LibFunc::malloc, MallocLike, 1, 0, -1}, -- {LibFunc::valloc, MallocLike, 1, 0, -1}, -- {LibFunc::Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -- {LibFunc::ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -- {LibFunc::Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -- {LibFunc::ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -- {LibFunc::msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -- {LibFunc::msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -- {LibFunc::msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -- {LibFunc::msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -- {LibFunc::msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -- {LibFunc::msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -- {LibFunc::msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -- {LibFunc::msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -- {LibFunc::calloc, CallocLike, 2, 0, 1}, -- {LibFunc::realloc, ReallocLike, 2, 1, -1}, -- {LibFunc::reallocf, ReallocLike, 2, 1, -1}, -- {LibFunc::strdup, StrDupLike, 1, -1, -1}, -- {LibFunc::strndup, StrDupLike, 2, 1, -1} -+ {LibFunc_malloc, MallocLike, 1, 0, -1}, -+ {LibFunc_valloc, MallocLike, 1, 0, -1}, -+ {LibFunc_Znwj, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_ZnwjRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_Znwm, OpNewLike, 1, 0, -1}, // new(unsigned long) -+ {LibFunc_ZnwmRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new(unsigned long, nothrow) -+ {LibFunc_Znaj, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_ZnajRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_Znam, OpNewLike, 1, 0, -1}, // new[](unsigned long) -+ {LibFunc_ZnamRKSt9nothrow_t, MallocLike, 2, 0, -1}, // new[](unsigned long, nothrow) -+ {LibFunc_msvc_new_int, OpNewLike, 1, 0, -1}, // new(unsigned int) -+ {LibFunc_msvc_new_int_nothrow, MallocLike, 2, 0, -1}, // new(unsigned int, nothrow) -+ {LibFunc_msvc_new_longlong, OpNewLike, 1, 0, -1}, // new(unsigned long long) -+ {LibFunc_msvc_new_longlong_nothrow, MallocLike, 2, 0, -1}, // new(unsigned long long, nothrow) -+ {LibFunc_msvc_new_array_int, OpNewLike, 1, 0, -1}, // new[](unsigned int) -+ {LibFunc_msvc_new_array_int_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned int, nothrow) -+ {LibFunc_msvc_new_array_longlong, OpNewLike, 1, 0, -1}, // new[](unsigned long long) -+ {LibFunc_msvc_new_array_longlong_nothrow, MallocLike, 2, 0, -1}, // new[](unsigned long long, nothrow) -+ {LibFunc_calloc, CallocLike, 2, 0, 1}, -+ {LibFunc_realloc, ReallocLike, 2, 1, -1}, -+ {LibFunc_reallocf, ReallocLike, 2, 1, -1}, -+ {LibFunc_strdup, StrDupLike, 1, -1, -1}, -+ {LibFunc_strndup, StrDupLike, 2, 1, -1} - // TODO: Handle "int posix_memalign(void **, size_t, size_t)" - }; - -@@ -111,7 +111,7 @@ static const AllocFnsTy *getAllocationData(const Value *V, AllocType AllocTy, - - // Make sure that the function is available. - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - -@@ -295,33 +295,33 @@ const CallInst *llvm::isFreeCall(const Value *I, const TargetLibraryInfo *TLI) { - return nullptr; - - StringRef FnName = Callee->getName(); -- LibFunc::Func TLIFn; -+ LibFunc TLIFn; - if (!TLI || !TLI->getLibFunc(FnName, TLIFn) || !TLI->has(TLIFn)) - return nullptr; - - unsigned ExpectedNumParams; -- if (TLIFn == LibFunc::free || -- TLIFn == LibFunc::ZdlPv || // operator delete(void*) -- TLIFn == LibFunc::ZdaPv || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_ptr32 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_ptr64 || // operator delete(void*) -- TLIFn == LibFunc::msvc_delete_array_ptr32 || // operator delete[](void*) -- TLIFn == LibFunc::msvc_delete_array_ptr64) // operator delete[](void*) -+ if (TLIFn == LibFunc_free || -+ TLIFn == LibFunc_ZdlPv || // operator delete(void*) -+ TLIFn == LibFunc_ZdaPv || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_ptr32 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_ptr64 || // operator delete(void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr32 || // operator delete[](void*) -+ TLIFn == LibFunc_msvc_delete_array_ptr64) // operator delete[](void*) - ExpectedNumParams = 1; -- else if (TLIFn == LibFunc::ZdlPvj || // delete(void*, uint) -- TLIFn == LibFunc::ZdlPvm || // delete(void*, ulong) -- TLIFn == LibFunc::ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -- TLIFn == LibFunc::ZdaPvj || // delete[](void*, uint) -- TLIFn == LibFunc::ZdaPvm || // delete[](void*, ulong) -- TLIFn == LibFunc::ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr32_int || // delete(void*, uint) -- TLIFn == LibFunc::msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr32_int || // delete[](void*, uint) -- TLIFn == LibFunc::msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -- TLIFn == LibFunc::msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -- TLIFn == LibFunc::msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) -+ else if (TLIFn == LibFunc_ZdlPvj || // delete(void*, uint) -+ TLIFn == LibFunc_ZdlPvm || // delete(void*, ulong) -+ TLIFn == LibFunc_ZdlPvRKSt9nothrow_t || // delete(void*, nothrow) -+ TLIFn == LibFunc_ZdaPvj || // delete[](void*, uint) -+ TLIFn == LibFunc_ZdaPvm || // delete[](void*, ulong) -+ TLIFn == LibFunc_ZdaPvRKSt9nothrow_t || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr32_int || // delete(void*, uint) -+ TLIFn == LibFunc_msvc_delete_ptr64_longlong || // delete(void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_ptr32_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_ptr64_nothrow || // delete(void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_int || // delete[](void*, uint) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_longlong || // delete[](void*, ulonglong) -+ TLIFn == LibFunc_msvc_delete_array_ptr32_nothrow || // delete[](void*, nothrow) -+ TLIFn == LibFunc_msvc_delete_array_ptr64_nothrow) // delete[](void*, nothrow) - ExpectedNumParams = 2; - else - return nullptr; -diff --git a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -index a0ae72f1..9db6c499 100644 ---- a/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -+++ b/src/apple-llvm/src/lib/Analysis/MemoryLocation.cpp -@@ -142,9 +142,9 @@ MemoryLocation MemoryLocation::getForArgument(ImmutableCallSite CS, - // for memcpy/memset. This is particularly important because the - // LoopIdiomRecognizer likes to turn loops into calls to memset_pattern16 - // whenever possible. -- LibFunc::Func F; -+ LibFunc F; - if (CS.getCalledFunction() && TLI.getLibFunc(*CS.getCalledFunction(), F) && -- F == LibFunc::memset_pattern16 && TLI.has(F)) { -+ F == LibFunc_memset_pattern16 && TLI.has(F)) { - assert((ArgIdx == 0 || ArgIdx == 1) && - "Invalid argument index for memset_pattern16"); - if (ArgIdx == 1) -diff --git a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -index a71d090c..a34174d1 100644 ---- a/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -+++ b/src/apple-llvm/src/lib/Analysis/TargetLibraryInfo.cpp -@@ -25,7 +25,7 @@ static cl::opt ClVectorLibrary( - "Accelerate framework"), - clEnumValEnd)); - --const char *const TargetLibraryInfoImpl::StandardNames[LibFunc::NumLibFuncs] = { -+const char *const TargetLibraryInfoImpl::StandardNames[NumLibFuncs] = { - #define TLI_DEFINE_STRING - #include "llvm/Analysis/TargetLibraryInfo.def" - }; -@@ -62,9 +62,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - - if (T.getArch() == Triple::r600 || - T.getArch() == Triple::amdgcn) { -- TLI.setUnavailable(LibFunc::ldexp); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -+ TLI.setUnavailable(LibFunc_ldexp); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); - } - - // There are no library implementations of mempcy and memset for AMD gpus and -@@ -73,9 +73,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - T.getArch() == Triple::amdgcn || - T.getArch() == Triple::wasm32 || - T.getArch() == Triple::wasm64) { -- TLI.setUnavailable(LibFunc::memcpy); -- TLI.setUnavailable(LibFunc::memset); -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memcpy); -+ TLI.setUnavailable(LibFunc_memset); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - return; - } - -@@ -83,21 +83,21 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // All versions of watchOS support it. - if (T.isMacOSX()) { - if (T.isMacOSXVersionLT(10, 5)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (T.isiOS()) { - if (T.isOSVersionLT(3, 0)) -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } else if (!T.isWatchOS()) { -- TLI.setUnavailable(LibFunc::memset_pattern16); -+ TLI.setUnavailable(LibFunc_memset_pattern16); - } - - if (!hasSinCosPiStret(T)) { -- TLI.setUnavailable(LibFunc::sinpi); -- TLI.setUnavailable(LibFunc::sinpif); -- TLI.setUnavailable(LibFunc::cospi); -- TLI.setUnavailable(LibFunc::cospif); -- TLI.setUnavailable(LibFunc::sincospi_stret); -- TLI.setUnavailable(LibFunc::sincospif_stret); -+ TLI.setUnavailable(LibFunc_sinpi); -+ TLI.setUnavailable(LibFunc_sinpif); -+ TLI.setUnavailable(LibFunc_cospi); -+ TLI.setUnavailable(LibFunc_cospif); -+ TLI.setUnavailable(LibFunc_sincospi_stret); -+ TLI.setUnavailable(LibFunc_sincospif_stret); - } - - if (T.isMacOSX() && T.getArch() == Triple::x86 && -@@ -107,177 +107,177 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // has a $UNIX2003 suffix. The two implementations are identical except - // for the return value in some edge cases. However, we don't want to - // generate code that depends on the old symbols. -- TLI.setAvailableWithName(LibFunc::fwrite, "fwrite$UNIX2003"); -- TLI.setAvailableWithName(LibFunc::fputs, "fputs$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fwrite, "fwrite$UNIX2003"); -+ TLI.setAvailableWithName(LibFunc_fputs, "fputs$UNIX2003"); - } - - // iprintf and friends are only available on XCore and TCE. - if (T.getArch() != Triple::xcore && T.getArch() != Triple::tce) { -- TLI.setUnavailable(LibFunc::iprintf); -- TLI.setUnavailable(LibFunc::siprintf); -- TLI.setUnavailable(LibFunc::fiprintf); -+ TLI.setUnavailable(LibFunc_iprintf); -+ TLI.setUnavailable(LibFunc_siprintf); -+ TLI.setUnavailable(LibFunc_fiprintf); - } - - if (T.isOSWindows() && !T.isOSCygMing()) { - // Win32 does not support long double -- TLI.setUnavailable(LibFunc::acosl); -- TLI.setUnavailable(LibFunc::asinl); -- TLI.setUnavailable(LibFunc::atanl); -- TLI.setUnavailable(LibFunc::atan2l); -- TLI.setUnavailable(LibFunc::ceill); -- TLI.setUnavailable(LibFunc::copysignl); -- TLI.setUnavailable(LibFunc::cosl); -- TLI.setUnavailable(LibFunc::coshl); -- TLI.setUnavailable(LibFunc::expl); -- TLI.setUnavailable(LibFunc::fabsf); // Win32 and Win64 both lack fabsf -- TLI.setUnavailable(LibFunc::fabsl); -- TLI.setUnavailable(LibFunc::floorl); -- TLI.setUnavailable(LibFunc::fmaxl); -- TLI.setUnavailable(LibFunc::fminl); -- TLI.setUnavailable(LibFunc::fmodl); -- TLI.setUnavailable(LibFunc::frexpl); -- TLI.setUnavailable(LibFunc::ldexpf); -- TLI.setUnavailable(LibFunc::ldexpl); -- TLI.setUnavailable(LibFunc::logl); -- TLI.setUnavailable(LibFunc::modfl); -- TLI.setUnavailable(LibFunc::powl); -- TLI.setUnavailable(LibFunc::sinl); -- TLI.setUnavailable(LibFunc::sinhl); -- TLI.setUnavailable(LibFunc::sqrtl); -- TLI.setUnavailable(LibFunc::tanl); -- TLI.setUnavailable(LibFunc::tanhl); -+ TLI.setUnavailable(LibFunc_acosl); -+ TLI.setUnavailable(LibFunc_asinl); -+ TLI.setUnavailable(LibFunc_atanl); -+ TLI.setUnavailable(LibFunc_atan2l); -+ TLI.setUnavailable(LibFunc_ceill); -+ TLI.setUnavailable(LibFunc_copysignl); -+ TLI.setUnavailable(LibFunc_cosl); -+ TLI.setUnavailable(LibFunc_coshl); -+ TLI.setUnavailable(LibFunc_expl); -+ TLI.setUnavailable(LibFunc_fabsf); // Win32 and Win64 both lack fabsf -+ TLI.setUnavailable(LibFunc_fabsl); -+ TLI.setUnavailable(LibFunc_floorl); -+ TLI.setUnavailable(LibFunc_fmaxl); -+ TLI.setUnavailable(LibFunc_fminl); -+ TLI.setUnavailable(LibFunc_fmodl); -+ TLI.setUnavailable(LibFunc_frexpl); -+ TLI.setUnavailable(LibFunc_ldexpf); -+ TLI.setUnavailable(LibFunc_ldexpl); -+ TLI.setUnavailable(LibFunc_logl); -+ TLI.setUnavailable(LibFunc_modfl); -+ TLI.setUnavailable(LibFunc_powl); -+ TLI.setUnavailable(LibFunc_sinl); -+ TLI.setUnavailable(LibFunc_sinhl); -+ TLI.setUnavailable(LibFunc_sqrtl); -+ TLI.setUnavailable(LibFunc_tanl); -+ TLI.setUnavailable(LibFunc_tanhl); - - // Win32 only has C89 math -- TLI.setUnavailable(LibFunc::acosh); -- TLI.setUnavailable(LibFunc::acoshf); -- TLI.setUnavailable(LibFunc::acoshl); -- TLI.setUnavailable(LibFunc::asinh); -- TLI.setUnavailable(LibFunc::asinhf); -- TLI.setUnavailable(LibFunc::asinhl); -- TLI.setUnavailable(LibFunc::atanh); -- TLI.setUnavailable(LibFunc::atanhf); -- TLI.setUnavailable(LibFunc::atanhl); -- TLI.setUnavailable(LibFunc::cbrt); -- TLI.setUnavailable(LibFunc::cbrtf); -- TLI.setUnavailable(LibFunc::cbrtl); -- TLI.setUnavailable(LibFunc::exp2); -- TLI.setUnavailable(LibFunc::exp2f); -- TLI.setUnavailable(LibFunc::exp2l); -- TLI.setUnavailable(LibFunc::expm1); -- TLI.setUnavailable(LibFunc::expm1f); -- TLI.setUnavailable(LibFunc::expm1l); -- TLI.setUnavailable(LibFunc::log2); -- TLI.setUnavailable(LibFunc::log2f); -- TLI.setUnavailable(LibFunc::log2l); -- TLI.setUnavailable(LibFunc::log1p); -- TLI.setUnavailable(LibFunc::log1pf); -- TLI.setUnavailable(LibFunc::log1pl); -- TLI.setUnavailable(LibFunc::logb); -- TLI.setUnavailable(LibFunc::logbf); -- TLI.setUnavailable(LibFunc::logbl); -- TLI.setUnavailable(LibFunc::nearbyint); -- TLI.setUnavailable(LibFunc::nearbyintf); -- TLI.setUnavailable(LibFunc::nearbyintl); -- TLI.setUnavailable(LibFunc::rint); -- TLI.setUnavailable(LibFunc::rintf); -- TLI.setUnavailable(LibFunc::rintl); -- TLI.setUnavailable(LibFunc::round); -- TLI.setUnavailable(LibFunc::roundf); -- TLI.setUnavailable(LibFunc::roundl); -- TLI.setUnavailable(LibFunc::trunc); -- TLI.setUnavailable(LibFunc::truncf); -- TLI.setUnavailable(LibFunc::truncl); -+ TLI.setUnavailable(LibFunc_acosh); -+ TLI.setUnavailable(LibFunc_acoshf); -+ TLI.setUnavailable(LibFunc_acoshl); -+ TLI.setUnavailable(LibFunc_asinh); -+ TLI.setUnavailable(LibFunc_asinhf); -+ TLI.setUnavailable(LibFunc_asinhl); -+ TLI.setUnavailable(LibFunc_atanh); -+ TLI.setUnavailable(LibFunc_atanhf); -+ TLI.setUnavailable(LibFunc_atanhl); -+ TLI.setUnavailable(LibFunc_cbrt); -+ TLI.setUnavailable(LibFunc_cbrtf); -+ TLI.setUnavailable(LibFunc_cbrtl); -+ TLI.setUnavailable(LibFunc_exp2); -+ TLI.setUnavailable(LibFunc_exp2f); -+ TLI.setUnavailable(LibFunc_exp2l); -+ TLI.setUnavailable(LibFunc_expm1); -+ TLI.setUnavailable(LibFunc_expm1f); -+ TLI.setUnavailable(LibFunc_expm1l); -+ TLI.setUnavailable(LibFunc_log2); -+ TLI.setUnavailable(LibFunc_log2f); -+ TLI.setUnavailable(LibFunc_log2l); -+ TLI.setUnavailable(LibFunc_log1p); -+ TLI.setUnavailable(LibFunc_log1pf); -+ TLI.setUnavailable(LibFunc_log1pl); -+ TLI.setUnavailable(LibFunc_logb); -+ TLI.setUnavailable(LibFunc_logbf); -+ TLI.setUnavailable(LibFunc_logbl); -+ TLI.setUnavailable(LibFunc_nearbyint); -+ TLI.setUnavailable(LibFunc_nearbyintf); -+ TLI.setUnavailable(LibFunc_nearbyintl); -+ TLI.setUnavailable(LibFunc_rint); -+ TLI.setUnavailable(LibFunc_rintf); -+ TLI.setUnavailable(LibFunc_rintl); -+ TLI.setUnavailable(LibFunc_round); -+ TLI.setUnavailable(LibFunc_roundf); -+ TLI.setUnavailable(LibFunc_roundl); -+ TLI.setUnavailable(LibFunc_trunc); -+ TLI.setUnavailable(LibFunc_truncf); -+ TLI.setUnavailable(LibFunc_truncl); - - // Win32 provides some C99 math with mangled names -- TLI.setAvailableWithName(LibFunc::copysign, "_copysign"); -+ TLI.setAvailableWithName(LibFunc_copysign, "_copysign"); - - if (T.getArch() == Triple::x86) { - // Win32 on x86 implements single-precision math functions as macros -- TLI.setUnavailable(LibFunc::acosf); -- TLI.setUnavailable(LibFunc::asinf); -- TLI.setUnavailable(LibFunc::atanf); -- TLI.setUnavailable(LibFunc::atan2f); -- TLI.setUnavailable(LibFunc::ceilf); -- TLI.setUnavailable(LibFunc::copysignf); -- TLI.setUnavailable(LibFunc::cosf); -- TLI.setUnavailable(LibFunc::coshf); -- TLI.setUnavailable(LibFunc::expf); -- TLI.setUnavailable(LibFunc::floorf); -- TLI.setUnavailable(LibFunc::fminf); -- TLI.setUnavailable(LibFunc::fmaxf); -- TLI.setUnavailable(LibFunc::fmodf); -- TLI.setUnavailable(LibFunc::logf); -- TLI.setUnavailable(LibFunc::powf); -- TLI.setUnavailable(LibFunc::sinf); -- TLI.setUnavailable(LibFunc::sinhf); -- TLI.setUnavailable(LibFunc::sqrtf); -- TLI.setUnavailable(LibFunc::tanf); -- TLI.setUnavailable(LibFunc::tanhf); -+ TLI.setUnavailable(LibFunc_acosf); -+ TLI.setUnavailable(LibFunc_asinf); -+ TLI.setUnavailable(LibFunc_atanf); -+ TLI.setUnavailable(LibFunc_atan2f); -+ TLI.setUnavailable(LibFunc_ceilf); -+ TLI.setUnavailable(LibFunc_copysignf); -+ TLI.setUnavailable(LibFunc_cosf); -+ TLI.setUnavailable(LibFunc_coshf); -+ TLI.setUnavailable(LibFunc_expf); -+ TLI.setUnavailable(LibFunc_floorf); -+ TLI.setUnavailable(LibFunc_fminf); -+ TLI.setUnavailable(LibFunc_fmaxf); -+ TLI.setUnavailable(LibFunc_fmodf); -+ TLI.setUnavailable(LibFunc_logf); -+ TLI.setUnavailable(LibFunc_powf); -+ TLI.setUnavailable(LibFunc_sinf); -+ TLI.setUnavailable(LibFunc_sinhf); -+ TLI.setUnavailable(LibFunc_sqrtf); -+ TLI.setUnavailable(LibFunc_tanf); -+ TLI.setUnavailable(LibFunc_tanhf); - } - - // Win32 does *not* provide provide these functions, but they are - // generally available on POSIX-compliant systems: -- TLI.setUnavailable(LibFunc::access); -- TLI.setUnavailable(LibFunc::bcmp); -- TLI.setUnavailable(LibFunc::bcopy); -- TLI.setUnavailable(LibFunc::bzero); -- TLI.setUnavailable(LibFunc::chmod); -- TLI.setUnavailable(LibFunc::chown); -- TLI.setUnavailable(LibFunc::closedir); -- TLI.setUnavailable(LibFunc::ctermid); -- TLI.setUnavailable(LibFunc::fdopen); -- TLI.setUnavailable(LibFunc::ffs); -- TLI.setUnavailable(LibFunc::fileno); -- TLI.setUnavailable(LibFunc::flockfile); -- TLI.setUnavailable(LibFunc::fseeko); -- TLI.setUnavailable(LibFunc::fstat); -- TLI.setUnavailable(LibFunc::fstatvfs); -- TLI.setUnavailable(LibFunc::ftello); -- TLI.setUnavailable(LibFunc::ftrylockfile); -- TLI.setUnavailable(LibFunc::funlockfile); -- TLI.setUnavailable(LibFunc::getc_unlocked); -- TLI.setUnavailable(LibFunc::getitimer); -- TLI.setUnavailable(LibFunc::getlogin_r); -- TLI.setUnavailable(LibFunc::getpwnam); -- TLI.setUnavailable(LibFunc::gettimeofday); -- TLI.setUnavailable(LibFunc::htonl); -- TLI.setUnavailable(LibFunc::htons); -- TLI.setUnavailable(LibFunc::lchown); -- TLI.setUnavailable(LibFunc::lstat); -- TLI.setUnavailable(LibFunc::memccpy); -- TLI.setUnavailable(LibFunc::mkdir); -- TLI.setUnavailable(LibFunc::ntohl); -- TLI.setUnavailable(LibFunc::ntohs); -- TLI.setUnavailable(LibFunc::open); -- TLI.setUnavailable(LibFunc::opendir); -- TLI.setUnavailable(LibFunc::pclose); -- TLI.setUnavailable(LibFunc::popen); -- TLI.setUnavailable(LibFunc::pread); -- TLI.setUnavailable(LibFunc::pwrite); -- TLI.setUnavailable(LibFunc::read); -- TLI.setUnavailable(LibFunc::readlink); -- TLI.setUnavailable(LibFunc::realpath); -- TLI.setUnavailable(LibFunc::rmdir); -- TLI.setUnavailable(LibFunc::setitimer); -- TLI.setUnavailable(LibFunc::stat); -- TLI.setUnavailable(LibFunc::statvfs); -- TLI.setUnavailable(LibFunc::stpcpy); -- TLI.setUnavailable(LibFunc::stpncpy); -- TLI.setUnavailable(LibFunc::strcasecmp); -- TLI.setUnavailable(LibFunc::strncasecmp); -- TLI.setUnavailable(LibFunc::times); -- TLI.setUnavailable(LibFunc::uname); -- TLI.setUnavailable(LibFunc::unlink); -- TLI.setUnavailable(LibFunc::unsetenv); -- TLI.setUnavailable(LibFunc::utime); -- TLI.setUnavailable(LibFunc::utimes); -- TLI.setUnavailable(LibFunc::write); -+ TLI.setUnavailable(LibFunc_access); -+ TLI.setUnavailable(LibFunc_bcmp); -+ TLI.setUnavailable(LibFunc_bcopy); -+ TLI.setUnavailable(LibFunc_bzero); -+ TLI.setUnavailable(LibFunc_chmod); -+ TLI.setUnavailable(LibFunc_chown); -+ TLI.setUnavailable(LibFunc_closedir); -+ TLI.setUnavailable(LibFunc_ctermid); -+ TLI.setUnavailable(LibFunc_fdopen); -+ TLI.setUnavailable(LibFunc_ffs); -+ TLI.setUnavailable(LibFunc_fileno); -+ TLI.setUnavailable(LibFunc_flockfile); -+ TLI.setUnavailable(LibFunc_fseeko); -+ TLI.setUnavailable(LibFunc_fstat); -+ TLI.setUnavailable(LibFunc_fstatvfs); -+ TLI.setUnavailable(LibFunc_ftello); -+ TLI.setUnavailable(LibFunc_ftrylockfile); -+ TLI.setUnavailable(LibFunc_funlockfile); -+ TLI.setUnavailable(LibFunc_getc_unlocked); -+ TLI.setUnavailable(LibFunc_getitimer); -+ TLI.setUnavailable(LibFunc_getlogin_r); -+ TLI.setUnavailable(LibFunc_getpwnam); -+ TLI.setUnavailable(LibFunc_gettimeofday); -+ TLI.setUnavailable(LibFunc_htonl); -+ TLI.setUnavailable(LibFunc_htons); -+ TLI.setUnavailable(LibFunc_lchown); -+ TLI.setUnavailable(LibFunc_lstat); -+ TLI.setUnavailable(LibFunc_memccpy); -+ TLI.setUnavailable(LibFunc_mkdir); -+ TLI.setUnavailable(LibFunc_ntohl); -+ TLI.setUnavailable(LibFunc_ntohs); -+ TLI.setUnavailable(LibFunc_open); -+ TLI.setUnavailable(LibFunc_opendir); -+ TLI.setUnavailable(LibFunc_pclose); -+ TLI.setUnavailable(LibFunc_popen); -+ TLI.setUnavailable(LibFunc_pread); -+ TLI.setUnavailable(LibFunc_pwrite); -+ TLI.setUnavailable(LibFunc_read); -+ TLI.setUnavailable(LibFunc_readlink); -+ TLI.setUnavailable(LibFunc_realpath); -+ TLI.setUnavailable(LibFunc_rmdir); -+ TLI.setUnavailable(LibFunc_setitimer); -+ TLI.setUnavailable(LibFunc_stat); -+ TLI.setUnavailable(LibFunc_statvfs); -+ TLI.setUnavailable(LibFunc_stpcpy); -+ TLI.setUnavailable(LibFunc_stpncpy); -+ TLI.setUnavailable(LibFunc_strcasecmp); -+ TLI.setUnavailable(LibFunc_strncasecmp); -+ TLI.setUnavailable(LibFunc_times); -+ TLI.setUnavailable(LibFunc_uname); -+ TLI.setUnavailable(LibFunc_unlink); -+ TLI.setUnavailable(LibFunc_unsetenv); -+ TLI.setUnavailable(LibFunc_utime); -+ TLI.setUnavailable(LibFunc_utimes); -+ TLI.setUnavailable(LibFunc_write); - - // Win32 does *not* provide provide these functions, but they are - // specified by C99: -- TLI.setUnavailable(LibFunc::atoll); -- TLI.setUnavailable(LibFunc::frexpf); -- TLI.setUnavailable(LibFunc::llabs); -+ TLI.setUnavailable(LibFunc_atoll); -+ TLI.setUnavailable(LibFunc_frexpf); -+ TLI.setUnavailable(LibFunc_llabs); - } - - switch (T.getOS()) { -@@ -287,28 +287,28 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // for Intel processors (both OS X and iOS simulator) was incorrect for - // some values until OS X 10.11 and iOS 9.0. exp10l is not available on - // OS X or iOS. -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (T.isMacOSXVersionLT(10, 11)) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::IOS: - case Triple::TvOS: - case Triple::WatchOS: -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10l); - if (!T.isWatchOS() && (T.isOSVersionLT(7, 0) || - (T.isOSVersionLT(9, 0) && - (T.getArch() == Triple::x86 || - T.getArch() == Triple::x86_64)))) { -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); - } else { -- TLI.setAvailableWithName(LibFunc::exp10, "__exp10"); -- TLI.setAvailableWithName(LibFunc::exp10f, "__exp10f"); -+ TLI.setAvailableWithName(LibFunc_exp10, "__exp10"); -+ TLI.setAvailableWithName(LibFunc_exp10f, "__exp10f"); - } - break; - case Triple::Linux: -@@ -319,9 +319,9 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // - // Fall through to disable all of them. - default: -- TLI.setUnavailable(LibFunc::exp10); -- TLI.setUnavailable(LibFunc::exp10f); -- TLI.setUnavailable(LibFunc::exp10l); -+ TLI.setUnavailable(LibFunc_exp10); -+ TLI.setUnavailable(LibFunc_exp10f); -+ TLI.setUnavailable(LibFunc_exp10l); - } - - // ffsl is available on at least Darwin, Mac OS X, iOS, FreeBSD, and -@@ -339,7 +339,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsl); -+ TLI.setUnavailable(LibFunc_ffsl); - } - - // ffsll is available on at least FreeBSD and Linux (GLIBC): -@@ -355,7 +355,7 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - case Triple::Linux: - break; - default: -- TLI.setUnavailable(LibFunc::ffsll); -+ TLI.setUnavailable(LibFunc_ffsll); - } - - // The following functions are available on at least FreeBSD: -@@ -363,30 +363,30 @@ static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, - // http://svn.freebsd.org/base/head/lib/libc/string/flsl.c - // http://svn.freebsd.org/base/head/lib/libc/string/flsll.c - if (!T.isOSFreeBSD()) { -- TLI.setUnavailable(LibFunc::fls); -- TLI.setUnavailable(LibFunc::flsl); -- TLI.setUnavailable(LibFunc::flsll); -+ TLI.setUnavailable(LibFunc_fls); -+ TLI.setUnavailable(LibFunc_flsl); -+ TLI.setUnavailable(LibFunc_flsll); - } - - // The following functions are available on at least Linux: - if (!T.isOSLinux()) { -- TLI.setUnavailable(LibFunc::dunder_strdup); -- TLI.setUnavailable(LibFunc::dunder_strtok_r); -- TLI.setUnavailable(LibFunc::dunder_isoc99_scanf); -- TLI.setUnavailable(LibFunc::dunder_isoc99_sscanf); -- TLI.setUnavailable(LibFunc::under_IO_getc); -- TLI.setUnavailable(LibFunc::under_IO_putc); -- TLI.setUnavailable(LibFunc::memalign); -- TLI.setUnavailable(LibFunc::fopen64); -- TLI.setUnavailable(LibFunc::fseeko64); -- TLI.setUnavailable(LibFunc::fstat64); -- TLI.setUnavailable(LibFunc::fstatvfs64); -- TLI.setUnavailable(LibFunc::ftello64); -- TLI.setUnavailable(LibFunc::lstat64); -- TLI.setUnavailable(LibFunc::open64); -- TLI.setUnavailable(LibFunc::stat64); -- TLI.setUnavailable(LibFunc::statvfs64); -- TLI.setUnavailable(LibFunc::tmpfile64); -+ TLI.setUnavailable(LibFunc_dunder_strdup); -+ TLI.setUnavailable(LibFunc_dunder_strtok_r); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_scanf); -+ TLI.setUnavailable(LibFunc_dunder_isoc99_sscanf); -+ TLI.setUnavailable(LibFunc_under_IO_getc); -+ TLI.setUnavailable(LibFunc_under_IO_putc); -+ TLI.setUnavailable(LibFunc_memalign); -+ TLI.setUnavailable(LibFunc_fopen64); -+ TLI.setUnavailable(LibFunc_fseeko64); -+ TLI.setUnavailable(LibFunc_fstat64); -+ TLI.setUnavailable(LibFunc_fstatvfs64); -+ TLI.setUnavailable(LibFunc_ftello64); -+ TLI.setUnavailable(LibFunc_lstat64); -+ TLI.setUnavailable(LibFunc_open64); -+ TLI.setUnavailable(LibFunc_stat64); -+ TLI.setUnavailable(LibFunc_statvfs64); -+ TLI.setUnavailable(LibFunc_tmpfile64); - } - - TLI.addVectorizableFunctionsFromVecLib(ClVectorLibrary); -@@ -446,9 +446,9 @@ static StringRef sanitizeFunctionName(StringRef funcName) { - } - - bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const char *const *Start = &StandardNames[0]; -- const char *const *End = &StandardNames[LibFunc::NumLibFuncs]; -+ const char *const *End = &StandardNames[NumLibFuncs]; - - funcName = sanitizeFunctionName(funcName); - if (funcName.empty()) -@@ -459,14 +459,14 @@ bool TargetLibraryInfoImpl::getLibFunc(StringRef funcName, - return std::strncmp(LHS, RHS.data(), RHS.size()) < 0; - }); - if (I != End && *I == funcName) { -- F = (LibFunc::Func)(I - Start); -+ F = (LibFunc)(I - Start); - return true; - } - return false; - } - - bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, -- LibFunc::Func F, -+ LibFunc F, - const DataLayout *DL) const { - LLVMContext &Ctx = FTy.getContext(); - Type *PCharTy = Type::getInt8PtrTy(Ctx); -@@ -477,489 +477,489 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - unsigned NumParams = FTy.getNumParams(); - - switch (F) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1)->isIntegerTy()); - -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return ((NumParams == 2 || NumParams == 3) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::strcat: -+ case LibFunc_strcat: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType()); - -- case LibFunc::strncat: -+ case LibFunc_strncat: - return (NumParams == 3 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0) == FTy.getReturnType() && - FTy.getParamType(1) == FTy.getReturnType() && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strcpy_chk: -- case LibFunc::stpcpy_chk: -+ case LibFunc_strcpy_chk: -+ case LibFunc_stpcpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: - return (NumParams == 2 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy); - -- case LibFunc::strncpy_chk: -- case LibFunc::stpncpy_chk: -+ case LibFunc_strncpy_chk: -+ case LibFunc_stpncpy_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(0) == PCharTy && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return (NumParams == 2 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getParamType(2)->isIntegerTy()); - -- case LibFunc::strspn: -- case LibFunc::strcspn: -+ case LibFunc_strspn: -+ case LibFunc_strcspn: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(0) == FTy.getParamType(1) && - FTy.getReturnType()->isIntegerTy()); - -- case LibFunc::strcoll: -- case LibFunc::strcasecmp: -- case LibFunc::strncasecmp: -+ case LibFunc_strcoll: -+ case LibFunc_strcasecmp: -+ case LibFunc_strncasecmp: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strstr: -+ case LibFunc_strstr: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0) == FTy.getParamType(1)); - -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::scanf: -+ case LibFunc_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::system: -+ case LibFunc_system: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::malloc: -+ case LibFunc_malloc: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy()); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getReturnType()->isIntegerTy(32)); - -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy(32) && - FTy.getParamType(2)->isIntegerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::memcpy_chk: -- case LibFunc::memmove_chk: -+ case LibFunc_memcpy_chk: -+ case LibFunc_memmove_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memcpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memmove: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - --NumParams; - if (!IsSizeTTy(FTy.getParamType(NumParams))) - return false; - // fallthrough -- case LibFunc::memset: -+ case LibFunc_memset: - return (NumParams == 3 && FTy.getReturnType() == FTy.getParamType(0) && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - IsSizeTTy(FTy.getParamType(2))); - -- case LibFunc::memccpy: -+ case LibFunc_memccpy: - return (NumParams >= 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::memalign: -+ case LibFunc_memalign: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::realloc: -+ case LibFunc_realloc: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getReturnType()->isPointerTy()); -- case LibFunc::read: -+ case LibFunc_read: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::rewind: -+ case LibFunc_rewind: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::rename: -+ case LibFunc_rename: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::readlink: -+ case LibFunc_readlink: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::write: -+ case LibFunc_write: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::bzero: -+ case LibFunc_bzero: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::calloc: -+ case LibFunc_calloc: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy()); - -- case LibFunc::atof: -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atoll: -- case LibFunc::ferror: -- case LibFunc::getenv: -- case LibFunc::getpwnam: -- case LibFunc::pclose: -- case LibFunc::perror: -- case LibFunc::printf: -- case LibFunc::puts: -- case LibFunc::uname: -- case LibFunc::under_IO_getc: -- case LibFunc::unlink: -- case LibFunc::unsetenv: -+ case LibFunc_atof: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atoll: -+ case LibFunc_ferror: -+ case LibFunc_getenv: -+ case LibFunc_getpwnam: -+ case LibFunc_pclose: -+ case LibFunc_perror: -+ case LibFunc_printf: -+ case LibFunc_puts: -+ case LibFunc_uname: -+ case LibFunc_under_IO_getc: -+ case LibFunc_unlink: -+ case LibFunc_unsetenv: - return (NumParams == 1 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::chmod: -- case LibFunc::chown: -- case LibFunc::clearerr: -- case LibFunc::closedir: -- case LibFunc::ctermid: -- case LibFunc::fclose: -- case LibFunc::feof: -- case LibFunc::fflush: -- case LibFunc::fgetc: -- case LibFunc::fileno: -- case LibFunc::flockfile: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::fseeko64: -- case LibFunc::fseeko: -- case LibFunc::fsetpos: -- case LibFunc::ftell: -- case LibFunc::ftello64: -- case LibFunc::ftello: -- case LibFunc::ftrylockfile: -- case LibFunc::funlockfile: -- case LibFunc::getc: -- case LibFunc::getc_unlocked: -- case LibFunc::getlogin_r: -- case LibFunc::mkdir: -- case LibFunc::mktime: -- case LibFunc::times: -+ case LibFunc_chmod: -+ case LibFunc_chown: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: -+ case LibFunc_ctermid: -+ case LibFunc_fclose: -+ case LibFunc_feof: -+ case LibFunc_fflush: -+ case LibFunc_fgetc: -+ case LibFunc_fileno: -+ case LibFunc_flockfile: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_fseeko64: -+ case LibFunc_fseeko: -+ case LibFunc_fsetpos: -+ case LibFunc_ftell: -+ case LibFunc_ftello64: -+ case LibFunc_ftello: -+ case LibFunc_ftrylockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_getc: -+ case LibFunc_getc_unlocked: -+ case LibFunc_getlogin_r: -+ case LibFunc_mkdir: -+ case LibFunc_mktime: -+ case LibFunc_times: - return (NumParams != 0 && FTy.getParamType(0)->isPointerTy()); - -- case LibFunc::access: -+ case LibFunc_access: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::fopen: -+ case LibFunc_fopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgets: -+ case LibFunc_fgets: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::fread: -+ case LibFunc_fread: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return (NumParams == 4 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isIntegerTy() && - FTy.getParamType(2)->isIntegerTy() && - FTy.getParamType(3)->isPointerTy()); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::gets: -- case LibFunc::getchar: -- case LibFunc::getitimer: -+ case LibFunc_gets: -+ case LibFunc_getchar: -+ case LibFunc_getitimer: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::putc: -+ case LibFunc_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::pread: -- case LibFunc::pwrite: -+ case LibFunc_pread: -+ case LibFunc_pwrite: - return (NumParams == 4 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::popen: -+ case LibFunc_popen: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::valloc: -+ case LibFunc_valloc: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - return (NumParams == 4 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); -- case LibFunc::open: -+ case LibFunc_open: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::opendir: -+ case LibFunc_opendir: - return (NumParams == 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -- case LibFunc::lstat: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: -+ case LibFunc_lstat: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::lchown: -+ case LibFunc_lchown: - return (NumParams == 3 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::qsort: -+ case LibFunc_qsort: - return (NumParams == 4 && FTy.getParamType(3)->isPointerTy()); -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - return (NumParams >= 1 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy()); -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - return (NumParams == 3 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - return (NumParams >= 1 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - return (NumParams == 2 && FTy.getReturnType()->isPointerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - return (FTy.getReturnType()->isPointerTy()); -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - return (NumParams == 2 && FTy.getParamType(1)->isPointerTy()); -- case LibFunc::open64: -+ case LibFunc_open64: - return (NumParams >= 2 && FTy.getParamType(0)->isPointerTy()); -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - return (NumParams == 2 && FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy()); - -- case LibFunc::Znwj: // new(unsigned int); -- case LibFunc::Znwm: // new(unsigned long); -- case LibFunc::Znaj: // new[](unsigned int); -- case LibFunc::Znam: // new[](unsigned long); -- case LibFunc::msvc_new_int: // new(unsigned int); -- case LibFunc::msvc_new_longlong: // new(unsigned long long); -- case LibFunc::msvc_new_array_int: // new[](unsigned int); -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long); -+ case LibFunc_Znwj: // new(unsigned int); -+ case LibFunc_Znwm: // new(unsigned long); -+ case LibFunc_Znaj: // new[](unsigned int); -+ case LibFunc_Znam: // new[](unsigned long); -+ case LibFunc_msvc_new_int: // new(unsigned int); -+ case LibFunc_msvc_new_longlong: // new(unsigned long long); -+ case LibFunc_msvc_new_array_int: // new[](unsigned int); -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long); - return (NumParams == 1); - -- case LibFunc::memset_pattern16: -+ case LibFunc_memset_pattern16: - return (!FTy.isVarArg() && NumParams == 3 && - isa(FTy.getParamType(0)) && - isa(FTy.getParamType(1)) && - isa(FTy.getParamType(2))); - -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - return (NumParams == 1 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return (NumParams == 2 && FTy.getReturnType()->isFloatingPointTy() && - FTy.getReturnType() == FTy.getParamType(0) && - FTy.getReturnType() == FTy.getParamType(1)); - -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -- case LibFunc::isdigit: -- case LibFunc::isascii: -- case LibFunc::toascii: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: -+ case LibFunc_isdigit: -+ case LibFunc_isascii: -+ case LibFunc_toascii: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy(32) && - FTy.getParamType(0)->isIntegerTy()); - -- case LibFunc::fls: -- case LibFunc::flsl: -- case LibFunc::flsll: -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_fls: -+ case LibFunc_flsl: -+ case LibFunc_flsll: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return (NumParams == 1 && FTy.getReturnType()->isIntegerTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::cxa_atexit: -+ case LibFunc_cxa_atexit: - return (NumParams == 3 && FTy.getReturnType()->isIntegerTy() && - FTy.getParamType(0)->isPointerTy() && - FTy.getParamType(1)->isPointerTy() && - FTy.getParamType(2)->isPointerTy()); - -- case LibFunc::sinpi: -- case LibFunc::cospi: -+ case LibFunc_sinpi: -+ case LibFunc_cospi: - return (NumParams == 1 && FTy.getReturnType()->isDoubleTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -- case LibFunc::sinpif: -- case LibFunc::cospif: -+ case LibFunc_sinpif: -+ case LibFunc_cospif: - return (NumParams == 1 && FTy.getReturnType()->isFloatTy() && - FTy.getReturnType() == FTy.getParamType(0)); - -@@ -971,7 +971,7 @@ bool TargetLibraryInfoImpl::isValidProtoForLibFunc(const FunctionType &FTy, - } - - bool TargetLibraryInfoImpl::getLibFunc(const Function &FDecl, -- LibFunc::Func &F) const { -+ LibFunc &F) const { - const DataLayout *DL = - FDecl.getParent() ? &FDecl.getParent()->getDataLayout() : nullptr; - return getLibFunc(FDecl.getName(), F) && -diff --git a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -index b3bc885c..945acb8b 100644 ---- a/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -+++ b/src/apple-llvm/src/lib/Analysis/VectorUtils.cpp -@@ -135,7 +135,7 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - if (!TLI) - return Intrinsic::not_intrinsic; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = CI->getCalledFunction(); - // We're going to make assumptions on the semantics of the functions, check - // that the target knows that it's available in this environment and it does -@@ -148,77 +148,77 @@ Intrinsic::ID llvm::getIntrinsicIDForCall(const CallInst *CI, - switch (Func) { - default: - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - return checkUnaryFloatSignature(*CI, Intrinsic::sin); -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - return checkUnaryFloatSignature(*CI, Intrinsic::cos); -- case LibFunc::exp: -- case LibFunc::expf: -- case LibFunc::expl: -+ case LibFunc_exp: -+ case LibFunc_expf: -+ case LibFunc_expl: - return checkUnaryFloatSignature(*CI, Intrinsic::exp); -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - return checkUnaryFloatSignature(*CI, Intrinsic::exp2); -- case LibFunc::log: -- case LibFunc::logf: -- case LibFunc::logl: -+ case LibFunc_log: -+ case LibFunc_logf: -+ case LibFunc_logl: - return checkUnaryFloatSignature(*CI, Intrinsic::log); -- case LibFunc::log10: -- case LibFunc::log10f: -- case LibFunc::log10l: -+ case LibFunc_log10: -+ case LibFunc_log10f: -+ case LibFunc_log10l: - return checkUnaryFloatSignature(*CI, Intrinsic::log10); -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - return checkUnaryFloatSignature(*CI, Intrinsic::log2); -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - return checkUnaryFloatSignature(*CI, Intrinsic::fabs); -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - return checkBinaryFloatSignature(*CI, Intrinsic::minnum); -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - return checkBinaryFloatSignature(*CI, Intrinsic::maxnum); -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - return checkBinaryFloatSignature(*CI, Intrinsic::copysign); -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - return checkUnaryFloatSignature(*CI, Intrinsic::floor); -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - return checkUnaryFloatSignature(*CI, Intrinsic::ceil); -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - return checkUnaryFloatSignature(*CI, Intrinsic::trunc); -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - return checkUnaryFloatSignature(*CI, Intrinsic::rint); -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - return checkUnaryFloatSignature(*CI, Intrinsic::nearbyint); -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - return checkUnaryFloatSignature(*CI, Intrinsic::round); -- case LibFunc::pow: -- case LibFunc::powf: -- case LibFunc::powl: -+ case LibFunc_pow: -+ case LibFunc_powf: -+ case LibFunc_powl: - return checkBinaryFloatSignature(*CI, Intrinsic::pow); - } - -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -index a8d4d296..da81eabd 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/FastISel.cpp -@@ -1379,7 +1379,7 @@ bool FastISel::selectInstruction(const Instruction *I) { - - if (const auto *Call = dyn_cast(I)) { - const Function *F = Call->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - - // As a special case, don't handle calls to builtin library functions that - // may be translated directly to target instructions. -diff --git a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -index 7f64d7b4..44800eca 100644 ---- a/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -+++ b/src/apple-llvm/src/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp -@@ -6125,15 +6125,15 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - - // Check for well-known libc/libm calls. If the function is internal, it - // can't be a library call. -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { - switch (Func) { - default: break; -- case LibFunc::copysign: -- case LibFunc::copysignf: -- case LibFunc::copysignl: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: -+ case LibFunc_copysignl: - if (I.getNumArgOperands() == 2 && // Basic sanity checks. - I.getArgOperand(0)->getType()->isFloatingPointTy() && - I.getType() == I.getArgOperand(0)->getType() && -@@ -6146,118 +6146,118 @@ void SelectionDAGBuilder::visitCall(const CallInst &I) { - return; - } - break; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - if (visitUnaryFloatCall(I, ISD::FABS)) - return; - break; -- case LibFunc::fmin: -- case LibFunc::fminf: -- case LibFunc::fminl: -+ case LibFunc_fmin: -+ case LibFunc_fminf: -+ case LibFunc_fminl: - if (visitBinaryFloatCall(I, ISD::FMINNUM)) - return; - break; -- case LibFunc::fmax: -- case LibFunc::fmaxf: -- case LibFunc::fmaxl: -+ case LibFunc_fmax: -+ case LibFunc_fmaxf: -+ case LibFunc_fmaxl: - if (visitBinaryFloatCall(I, ISD::FMAXNUM)) - return; - break; -- case LibFunc::sin: -- case LibFunc::sinf: -- case LibFunc::sinl: -+ case LibFunc_sin: -+ case LibFunc_sinf: -+ case LibFunc_sinl: - if (visitUnaryFloatCall(I, ISD::FSIN)) - return; - break; -- case LibFunc::cos: -- case LibFunc::cosf: -- case LibFunc::cosl: -+ case LibFunc_cos: -+ case LibFunc_cosf: -+ case LibFunc_cosl: - if (visitUnaryFloatCall(I, ISD::FCOS)) - return; - break; -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -- case LibFunc::sqrt_finite: -- case LibFunc::sqrtf_finite: -- case LibFunc::sqrtl_finite: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: -+ case LibFunc_sqrt_finite: -+ case LibFunc_sqrtf_finite: -+ case LibFunc_sqrtl_finite: - if (visitUnaryFloatCall(I, ISD::FSQRT)) - return; - break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - if (visitUnaryFloatCall(I, ISD::FFLOOR)) - return; - break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - if (visitUnaryFloatCall(I, ISD::FNEARBYINT)) - return; - break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - if (visitUnaryFloatCall(I, ISD::FCEIL)) - return; - break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - if (visitUnaryFloatCall(I, ISD::FRINT)) - return; - break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - if (visitUnaryFloatCall(I, ISD::FROUND)) - return; - break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - if (visitUnaryFloatCall(I, ISD::FTRUNC)) - return; - break; -- case LibFunc::log2: -- case LibFunc::log2f: -- case LibFunc::log2l: -+ case LibFunc_log2: -+ case LibFunc_log2f: -+ case LibFunc_log2l: - if (visitUnaryFloatCall(I, ISD::FLOG2)) - return; - break; -- case LibFunc::exp2: -- case LibFunc::exp2f: -- case LibFunc::exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: -+ case LibFunc_exp2l: - if (visitUnaryFloatCall(I, ISD::FEXP2)) - return; - break; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - if (visitMemCmpCall(I)) - return; - break; -- case LibFunc::memchr: -+ case LibFunc_memchr: - if (visitMemChrCall(I)) - return; - break; -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - if (visitStrCpyCall(I, false)) - return; - break; -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - if (visitStrCpyCall(I, true)) - return; - break; -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - if (visitStrCmpCall(I)) - return; - break; -- case LibFunc::strlen: -+ case LibFunc_strlen: - if (visitStrLenCall(I)) - return; - break; -- case LibFunc::strnlen: -+ case LibFunc_strnlen: - if (visitStrNLenCall(I)) - return; - break; -diff --git a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -index bed784a5..5110cddd 100644 ---- a/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -+++ b/src/apple-llvm/src/lib/LTO/UpdateCompilerUsed.cpp -@@ -63,9 +63,9 @@ private: - - // TargetLibraryInfo has info on C runtime library calls on the current - // target. -- for (unsigned I = 0, E = static_cast(LibFunc::NumLibFuncs); -+ for (unsigned I = 0, E = static_cast(NumLibFuncs); - I != E; ++I) { -- LibFunc::Func F = static_cast(I); -+ LibFunc F = static_cast(I); - if (TLI.has(F)) - Libcalls.insert(TLI.getName(F)); - } -diff --git a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -index b6ac4d54..10f1f20e 100644 ---- a/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -+++ b/src/apple-llvm/src/lib/Target/PowerPC/PPCCTRLoops.cpp -@@ -313,7 +313,7 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - // (i.e. soft float or atomics). If adapting for targets that do, - // additional care is required here. - -- LibFunc::Func Func; -+ LibFunc Func; - if (!F->hasLocalLinkage() && F->hasName() && LibInfo && - LibInfo->getLibFunc(F->getName(), Func) && - LibInfo->hasOptimizedCodeGen(Func)) { -@@ -327,42 +327,42 @@ bool PPCCTRLoops::mightUseCTR(const Triple &TT, BasicBlock *BB) { - - switch (Func) { - default: return true; -- case LibFunc::copysign: -- case LibFunc::copysignf: -+ case LibFunc_copysign: -+ case LibFunc_copysignf: - continue; // ISD::FCOPYSIGN is never a library call. -- case LibFunc::copysignl: -+ case LibFunc_copysignl: - return true; -- case LibFunc::fabs: -- case LibFunc::fabsf: -- case LibFunc::fabsl: -+ case LibFunc_fabs: -+ case LibFunc_fabsf: -+ case LibFunc_fabsl: - continue; // ISD::FABS is never a library call. -- case LibFunc::sqrt: -- case LibFunc::sqrtf: -- case LibFunc::sqrtl: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrtl: - Opcode = ISD::FSQRT; break; -- case LibFunc::floor: -- case LibFunc::floorf: -- case LibFunc::floorl: -+ case LibFunc_floor: -+ case LibFunc_floorf: -+ case LibFunc_floorl: - Opcode = ISD::FFLOOR; break; -- case LibFunc::nearbyint: -- case LibFunc::nearbyintf: -- case LibFunc::nearbyintl: -+ case LibFunc_nearbyint: -+ case LibFunc_nearbyintf: -+ case LibFunc_nearbyintl: - Opcode = ISD::FNEARBYINT; break; -- case LibFunc::ceil: -- case LibFunc::ceilf: -- case LibFunc::ceill: -+ case LibFunc_ceil: -+ case LibFunc_ceilf: -+ case LibFunc_ceill: - Opcode = ISD::FCEIL; break; -- case LibFunc::rint: -- case LibFunc::rintf: -- case LibFunc::rintl: -+ case LibFunc_rint: -+ case LibFunc_rintf: -+ case LibFunc_rintl: - Opcode = ISD::FRINT; break; -- case LibFunc::round: -- case LibFunc::roundf: -- case LibFunc::roundl: -+ case LibFunc_round: -+ case LibFunc_roundf: -+ case LibFunc_roundl: - Opcode = ISD::FROUND; break; -- case LibFunc::trunc: -- case LibFunc::truncf: -- case LibFunc::truncl: -+ case LibFunc_trunc: -+ case LibFunc_truncf: -+ case LibFunc_truncl: - Opcode = ISD::FTRUNC; break; - } - -diff --git a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -index 29d2c99f..f258f38a 100644 ---- a/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -+++ b/src/apple-llvm/src/lib/Transforms/IPO/GlobalOpt.cpp -@@ -3067,7 +3067,7 @@ bool GlobalOpt::OptimizeGlobalAliases(Module &M) { - } - - static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { -- LibFunc::Func F = LibFunc::cxa_atexit; -+ LibFunc F = LibFunc_cxa_atexit; - if (!TLI->has(F)) - return nullptr; - -@@ -3076,7 +3076,7 @@ static Function *FindCXAAtExit(Module &M, TargetLibraryInfo *TLI) { - return nullptr; - - // Make sure that the function has the correct prototype. -- if (!TLI->getLibFunc(*Fn, F) || F != LibFunc::cxa_atexit) -+ if (!TLI->getLibFunc(*Fn, F) || F != LibFunc_cxa_atexit) - return nullptr; - - return Fn; -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -index 36ad0a5f..2a644844 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/DeadStoreElimination.cpp -@@ -176,20 +176,20 @@ static bool hasMemoryWrite(Instruction *I, const TargetLibraryInfo &TLI) { - } - if (auto CS = CallSite(I)) { - if (Function *F = CS.getCalledFunction()) { -- if (TLI.has(LibFunc::strcpy) && -- F->getName() == TLI.getName(LibFunc::strcpy)) { -+ if (TLI.has(LibFunc_strcpy) && -+ F->getName() == TLI.getName(LibFunc_strcpy)) { - return true; - } -- if (TLI.has(LibFunc::strncpy) && -- F->getName() == TLI.getName(LibFunc::strncpy)) { -+ if (TLI.has(LibFunc_strncpy) && -+ F->getName() == TLI.getName(LibFunc_strncpy)) { - return true; - } -- if (TLI.has(LibFunc::strcat) && -- F->getName() == TLI.getName(LibFunc::strcat)) { -+ if (TLI.has(LibFunc_strcat) && -+ F->getName() == TLI.getName(LibFunc_strcat)) { - return true; - } -- if (TLI.has(LibFunc::strncat) && -- F->getName() == TLI.getName(LibFunc::strncat)) { -+ if (TLI.has(LibFunc_strncat) && -+ F->getName() == TLI.getName(LibFunc_strncat)) { - return true; - } - } -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -index fa87b5b1..e13fd802 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/LoopIdiomRecognize.cpp -@@ -210,9 +210,9 @@ bool LoopIdiomRecognize::runOnLoop(Loop *L, LPPassManager &LPM) { - *CurLoop->getHeader()->getParent()); - DL = &CurLoop->getHeader()->getModule()->getDataLayout(); - -- HasMemset = TLI->has(LibFunc::memset); -- HasMemsetPattern = TLI->has(LibFunc::memset_pattern16); -- HasMemcpy = TLI->has(LibFunc::memcpy); -+ HasMemset = TLI->has(LibFunc_memset); -+ HasMemsetPattern = TLI->has(LibFunc_memset_pattern16); -+ HasMemcpy = TLI->has(LibFunc_memcpy); - - if (HasMemset || HasMemsetPattern || HasMemcpy) - if (SE->hasLoopInvariantBackedgeTakenCount(L)) -@@ -489,7 +489,7 @@ bool LoopIdiomRecognize::processLoopMemSet(MemSetInst *MSI, - return false; - - // If we're not allowed to hack on memset, we fail. -- if (!TLI->has(LibFunc::memset)) -+ if (!TLI->has(LibFunc_memset)) - return false; - - Value *Pointer = MSI->getDest(); -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -index 6b43b0f7..d4fd8ce4 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/MemCpyOptimizer.cpp -@@ -1144,7 +1144,7 @@ bool MemCpyOpt::processMemCpy(MemCpyInst *M) { - bool MemCpyOpt::processMemMove(MemMoveInst *M) { - AliasAnalysis &AA = getAnalysis().getAAResults(); - -- if (!TLI->has(LibFunc::memmove)) -+ if (!TLI->has(LibFunc_memmove)) - return false; - - // See if the pointers alias. -@@ -1290,7 +1290,7 @@ bool MemCpyOpt::runOnFunction(Function &F) { - // If we don't have at least memset and memcpy, there is little point of doing - // anything here. These are required by a freestanding implementation, so if - // even they are disabled, there is no point in trying hard. -- if (!TLI->has(LibFunc::memset) || !TLI->has(LibFunc::memcpy)) -+ if (!TLI->has(LibFunc_memset) || !TLI->has(LibFunc_memcpy)) - return false; - - while (1) { -diff --git a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -index 9f26f788..aa08538a 100644 ---- a/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp -@@ -77,14 +77,14 @@ bool PartiallyInlineLibCalls::runOnFunction(Function &F) { - - // Skip if function either has local linkage or is not a known library - // function. -- LibFunc::Func LibFunc; -+ LibFunc LF; - if (CalledFunc->hasLocalLinkage() || !CalledFunc->hasName() || -- !TLI->getLibFunc(CalledFunc->getName(), LibFunc)) -+ !TLI->getLibFunc(CalledFunc->getName(), LF)) - continue; - -- switch (LibFunc) { -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -+ switch (LF) { -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: - if (TTI->haveFastSqrt(Call->getType()) && - optimizeSQRT(Call, CalledFunc, *CurrBB, BB)) - break; -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -index 85d0299d..5b6dbdfd 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/BuildLibCalls.cpp -@@ -107,254 +107,254 @@ static bool setNonNull(Function &F, unsigned n) { - } - - bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { -- LibFunc::Func TheLibFunc; -+ LibFunc TheLibFunc; - if (!(TLI.getLibFunc(F, TheLibFunc) && TLI.has(TheLibFunc))) - return false; - - bool Changed = false; - switch (TheLibFunc) { -- case LibFunc::strlen: -+ case LibFunc_strlen: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strchr: -- case LibFunc::strrchr: -+ case LibFunc_strchr: -+ case LibFunc_strrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::strcpy: -- case LibFunc::stpcpy: -- case LibFunc::strcat: -- case LibFunc::strncat: -- case LibFunc::strncpy: -- case LibFunc::stpncpy: -+ case LibFunc_strcpy: -+ case LibFunc_stpcpy: -+ case LibFunc_strcat: -+ case LibFunc_strncat: -+ case LibFunc_strncpy: -+ case LibFunc_stpncpy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strxfrm: -+ case LibFunc_strxfrm: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::strcmp: // 0,1 -- case LibFunc::strspn: // 0,1 -- case LibFunc::strncmp: // 0,1 -- case LibFunc::strcspn: // 0,1 -- case LibFunc::strcoll: // 0,1 -- case LibFunc::strcasecmp: // 0,1 -- case LibFunc::strncasecmp: // -+ case LibFunc_strcmp: // 0,1 -+ case LibFunc_strspn: // 0,1 -+ case LibFunc_strncmp: // 0,1 -+ case LibFunc_strcspn: // 0,1 -+ case LibFunc_strcoll: // 0,1 -+ case LibFunc_strcasecmp: // 0,1 -+ case LibFunc_strncasecmp: // - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strstr: -- case LibFunc::strpbrk: -+ case LibFunc_strstr: -+ case LibFunc_strpbrk: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::strtok: -- case LibFunc::strtok_r: -+ case LibFunc_strtok: -+ case LibFunc_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::scanf: -+ case LibFunc_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::setbuf: -- case LibFunc::setvbuf: -+ case LibFunc_setbuf: -+ case LibFunc_setvbuf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::strdup: -- case LibFunc::strndup: -+ case LibFunc_strdup: -+ case LibFunc_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat: -- case LibFunc::statvfs: -+ case LibFunc_stat: -+ case LibFunc_statvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::sscanf: -+ case LibFunc_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::snprintf: -+ case LibFunc_snprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::setitimer: -+ case LibFunc_setitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::system: -+ case LibFunc_system: - // May throw; "system" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::malloc: -+ case LibFunc_malloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memchr: -- case LibFunc::memrchr: -+ case LibFunc_memchr: -+ case LibFunc_memrchr: - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::modf: -- case LibFunc::modff: -- case LibFunc::modfl: -+ case LibFunc_modf: -+ case LibFunc_modff: -+ case LibFunc_modfl: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::memcpy: -- case LibFunc::memccpy: -- case LibFunc::memmove: -+ case LibFunc_memcpy: -+ case LibFunc_memccpy: -+ case LibFunc_memmove: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::memalign: -+ case LibFunc_memalign: - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::mkdir: -+ case LibFunc_mkdir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::mktime: -+ case LibFunc_mktime: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::realloc: -+ case LibFunc_realloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::read: -+ case LibFunc_read: - // May throw; "read" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::rewind: -+ case LibFunc_rewind: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::rmdir: -- case LibFunc::remove: -- case LibFunc::realpath: -+ case LibFunc_rmdir: -+ case LibFunc_remove: -+ case LibFunc_realpath: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::rename: -+ case LibFunc_rename: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::readlink: -+ case LibFunc_readlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::write: -+ case LibFunc_write: - // May throw; "write" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::bcopy: -+ case LibFunc_bcopy: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::bcmp: -+ case LibFunc_bcmp: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::bzero: -+ case LibFunc_bzero: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::calloc: -+ case LibFunc_calloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::chmod: -- case LibFunc::chown: -+ case LibFunc_chmod: -+ case LibFunc_chown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ctermid: -- case LibFunc::clearerr: -- case LibFunc::closedir: -+ case LibFunc_ctermid: -+ case LibFunc_clearerr: -+ case LibFunc_closedir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::atoi: -- case LibFunc::atol: -- case LibFunc::atof: -- case LibFunc::atoll: -+ case LibFunc_atoi: -+ case LibFunc_atol: -+ case LibFunc_atof: -+ case LibFunc_atoll: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::access: -+ case LibFunc_access: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fopen: -+ case LibFunc_fopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -362,150 +362,150 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fdopen: -+ case LibFunc_fdopen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::feof: -- case LibFunc::free: -- case LibFunc::fseek: -- case LibFunc::ftell: -- case LibFunc::fgetc: -- case LibFunc::fseeko: -- case LibFunc::ftello: -- case LibFunc::fileno: -- case LibFunc::fflush: -- case LibFunc::fclose: -- case LibFunc::fsetpos: -- case LibFunc::flockfile: -- case LibFunc::funlockfile: -- case LibFunc::ftrylockfile: -+ case LibFunc_feof: -+ case LibFunc_free: -+ case LibFunc_fseek: -+ case LibFunc_ftell: -+ case LibFunc_fgetc: -+ case LibFunc_fseeko: -+ case LibFunc_ftello: -+ case LibFunc_fileno: -+ case LibFunc_fflush: -+ case LibFunc_fclose: -+ case LibFunc_fsetpos: -+ case LibFunc_flockfile: -+ case LibFunc_funlockfile: -+ case LibFunc_ftrylockfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::ferror: -+ case LibFunc_ferror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F); - return Changed; -- case LibFunc::fputc: -- case LibFunc::fstat: -- case LibFunc::frexp: -- case LibFunc::frexpf: -- case LibFunc::frexpl: -- case LibFunc::fstatvfs: -+ case LibFunc_fputc: -+ case LibFunc_fstat: -+ case LibFunc_frexp: -+ case LibFunc_frexpf: -+ case LibFunc_frexpl: -+ case LibFunc_fstatvfs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::fgets: -+ case LibFunc_fgets: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 3); - return Changed; -- case LibFunc::fread: -+ case LibFunc_fread: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 4); - // FIXME: readonly #1? - return Changed; -- case LibFunc::fputs: -+ case LibFunc_fputs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::fscanf: -- case LibFunc::fprintf: -+ case LibFunc_fscanf: -+ case LibFunc_fprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fgetpos: -+ case LibFunc_fgetpos: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getc: -- case LibFunc::getlogin_r: -- case LibFunc::getc_unlocked: -+ case LibFunc_getc: -+ case LibFunc_getlogin_r: -+ case LibFunc_getc_unlocked: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::getenv: -+ case LibFunc_getenv: - Changed |= setDoesNotThrow(F); - Changed |= setOnlyReadsMemory(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::gets: -- case LibFunc::getchar: -+ case LibFunc_gets: -+ case LibFunc_getchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::getitimer: -+ case LibFunc_getitimer: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::getpwnam: -+ case LibFunc_getpwnam: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::ungetc: -+ case LibFunc_ungetc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::uname: -+ case LibFunc_uname: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::unlink: -+ case LibFunc_unlink: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::unsetenv: -+ case LibFunc_unsetenv: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::utime: -- case LibFunc::utimes: -+ case LibFunc_utime: -+ case LibFunc_utimes: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putc: -+ case LibFunc_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::puts: -- case LibFunc::printf: -- case LibFunc::perror: -+ case LibFunc_puts: -+ case LibFunc_printf: -+ case LibFunc_perror: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::pread: -+ case LibFunc_pread: - // May throw; "pread" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::pwrite: -+ case LibFunc_pwrite: - // May throw; "pwrite" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::putchar: -+ case LibFunc_putchar: - Changed |= setDoesNotThrow(F); - return Changed; -- case LibFunc::popen: -+ case LibFunc_popen: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -513,132 +513,132 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::pclose: -+ case LibFunc_pclose: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::vscanf: -+ case LibFunc_vscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vsscanf: -+ case LibFunc_vsscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vfscanf: -+ case LibFunc_vfscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::valloc: -+ case LibFunc_valloc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::vprintf: -+ case LibFunc_vprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::vfprintf: -- case LibFunc::vsprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_vsprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::vsnprintf: -+ case LibFunc_vsnprintf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 3); - Changed |= setOnlyReadsMemory(F, 3); - return Changed; -- case LibFunc::open: -+ case LibFunc_open: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::opendir: -+ case LibFunc_opendir: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::tmpfile: -+ case LibFunc_tmpfile: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::times: -+ case LibFunc_times: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::htonl: -- case LibFunc::htons: -- case LibFunc::ntohl: -- case LibFunc::ntohs: -+ case LibFunc_htonl: -+ case LibFunc_htons: -+ case LibFunc_ntohl: -+ case LibFunc_ntohs: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAccessMemory(F); - return Changed; -- case LibFunc::lstat: -+ case LibFunc_lstat: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::lchown: -+ case LibFunc_lchown: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::qsort: -+ case LibFunc_qsort: - // May throw; places call through function pointer. - Changed |= setDoesNotCapture(F, 4); - return Changed; -- case LibFunc::dunder_strdup: -- case LibFunc::dunder_strndup: -+ case LibFunc_dunder_strdup: -+ case LibFunc_dunder_strndup: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_strtok_r: -+ case LibFunc_dunder_strtok_r: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::under_IO_getc: -+ case LibFunc_under_IO_getc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::under_IO_putc: -+ case LibFunc_under_IO_putc: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::dunder_isoc99_scanf: -+ case LibFunc_dunder_isoc99_scanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::stat64: -- case LibFunc::lstat64: -- case LibFunc::statvfs64: -+ case LibFunc_stat64: -+ case LibFunc_lstat64: -+ case LibFunc_statvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::dunder_isoc99_sscanf: -+ case LibFunc_dunder_isoc99_sscanf: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fopen64: -+ case LibFunc_fopen64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - Changed |= setDoesNotCapture(F, 1); -@@ -646,26 +646,26 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setOnlyReadsMemory(F, 1); - Changed |= setOnlyReadsMemory(F, 2); - return Changed; -- case LibFunc::fseeko64: -- case LibFunc::ftello64: -+ case LibFunc_fseeko64: -+ case LibFunc_ftello64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 1); - return Changed; -- case LibFunc::tmpfile64: -+ case LibFunc_tmpfile64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotAlias(F, 0); - return Changed; -- case LibFunc::fstat64: -- case LibFunc::fstatvfs64: -+ case LibFunc_fstat64: -+ case LibFunc_fstatvfs64: - Changed |= setDoesNotThrow(F); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::open64: -+ case LibFunc_open64: - // May throw; "open" is a valid pthread cancellation point. - Changed |= setDoesNotCapture(F, 1); - Changed |= setOnlyReadsMemory(F, 1); - return Changed; -- case LibFunc::gettimeofday: -+ case LibFunc_gettimeofday: - // Currently some platforms have the restrict keyword on the arguments to - // gettimeofday. To be conservative, do not add noalias to gettimeofday's - // arguments. -@@ -673,22 +673,22 @@ bool llvm::inferLibFuncAttributes(Function &F, const TargetLibraryInfo &TLI) { - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); - return Changed; -- case LibFunc::Znwj: // new(unsigned int) -- case LibFunc::Znwm: // new(unsigned long) -- case LibFunc::Znaj: // new[](unsigned int) -- case LibFunc::Znam: // new[](unsigned long) -- case LibFunc::msvc_new_int: // new(unsigned int) -- case LibFunc::msvc_new_longlong: // new(unsigned long long) -- case LibFunc::msvc_new_array_int: // new[](unsigned int) -- case LibFunc::msvc_new_array_longlong: // new[](unsigned long long) -+ case LibFunc_Znwj: // new(unsigned int) -+ case LibFunc_Znwm: // new(unsigned long) -+ case LibFunc_Znaj: // new[](unsigned int) -+ case LibFunc_Znam: // new[](unsigned long) -+ case LibFunc_msvc_new_int: // new(unsigned int) -+ case LibFunc_msvc_new_longlong: // new(unsigned long long) -+ case LibFunc_msvc_new_array_int: // new[](unsigned int) -+ case LibFunc_msvc_new_array_longlong: // new[](unsigned long long) - // Operator new always returns a nonnull noalias pointer - Changed |= setNonNull(F, AttributeSet::ReturnIndex); - Changed |= setDoesNotAlias(F, AttributeSet::ReturnIndex); - return Changed; - //TODO: add LibFunc entries for: -- //case LibFunc::memset_pattern4: -- //case LibFunc::memset_pattern8: -- case LibFunc::memset_pattern16: -+ //case LibFunc_memset_pattern4: -+ //case LibFunc_memset_pattern8: -+ case LibFunc_memset_pattern16: - Changed |= setOnlyAccessesArgMemory(F); - Changed |= setDoesNotCapture(F, 1); - Changed |= setDoesNotCapture(F, 2); -@@ -711,7 +711,7 @@ Value *llvm::castToCStr(Value *V, IRBuilder<> &B) { - - Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strlen)) -+ if (!TLI->has(LibFunc_strlen)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -728,7 +728,7 @@ Value *llvm::emitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout &DL, - - Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strchr)) -+ if (!TLI->has(LibFunc_strchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -746,7 +746,7 @@ Value *llvm::emitStrChr(Value *Ptr, char C, IRBuilder<> &B, - - Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::strncmp)) -+ if (!TLI->has(LibFunc_strncmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -766,7 +766,7 @@ Value *llvm::emitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - - Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strcpy)) -+ if (!TLI->has(LibFunc_strcpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -782,7 +782,7 @@ Value *llvm::emitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, - - Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - const TargetLibraryInfo *TLI, StringRef Name) { -- if (!TLI->has(LibFunc::strncpy)) -+ if (!TLI->has(LibFunc_strncpy)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -800,7 +800,7 @@ Value *llvm::emitStrNCpy(Value *Dst, Value *Src, Value *Len, IRBuilder<> &B, - Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - IRBuilder<> &B, const DataLayout &DL, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcpy_chk)) -+ if (!TLI->has(LibFunc_memcpy_chk)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -822,7 +822,7 @@ Value *llvm::emitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, - - Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memchr)) -+ if (!TLI->has(LibFunc_memchr)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -841,7 +841,7 @@ Value *llvm::emitMemChr(Value *Ptr, Value *Val, Value *Len, IRBuilder<> &B, - - Value *llvm::emitMemCmp(Value *Ptr1, Value *Ptr2, Value *Len, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::memcmp)) -+ if (!TLI->has(LibFunc_memcmp)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -909,7 +909,7 @@ Value *llvm::emitBinaryFloatFnCall(Value *Op1, Value *Op2, StringRef Name, - - Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::putchar)) -+ if (!TLI->has(LibFunc_putchar)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -929,7 +929,7 @@ Value *llvm::emitPutChar(Value *Char, IRBuilder<> &B, - - Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::puts)) -+ if (!TLI->has(LibFunc_puts)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -944,7 +944,7 @@ Value *llvm::emitPutS(Value *Str, IRBuilder<> &B, - - Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputc)) -+ if (!TLI->has(LibFunc_fputc)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -@@ -963,11 +963,11 @@ Value *llvm::emitFPutC(Value *Char, Value *File, IRBuilder<> &B, - - Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fputs)) -+ if (!TLI->has(LibFunc_fputs)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); -- StringRef FPutsName = TLI->getName(LibFunc::fputs); -+ StringRef FPutsName = TLI->getName(LibFunc_fputs); - Constant *F = M->getOrInsertFunction( - FPutsName, B.getInt32Ty(), B.getInt8PtrTy(), File->getType(), nullptr); - if (File->getType()->isPointerTy()) -@@ -981,12 +981,12 @@ Value *llvm::emitFPutS(Value *Str, Value *File, IRBuilder<> &B, - - Value *llvm::emitFWrite(Value *Ptr, Value *Size, Value *File, IRBuilder<> &B, - const DataLayout &DL, const TargetLibraryInfo *TLI) { -- if (!TLI->has(LibFunc::fwrite)) -+ if (!TLI->has(LibFunc_fwrite)) - return nullptr; - - Module *M = B.GetInsertBlock()->getModule(); - LLVMContext &Context = B.GetInsertBlock()->getContext(); -- StringRef FWriteName = TLI->getName(LibFunc::fwrite); -+ StringRef FWriteName = TLI->getName(LibFunc_fwrite); - Constant *F = M->getOrInsertFunction( - FWriteName, DL.getIntPtrType(Context), B.getInt8PtrTy(), - DL.getIntPtrType(Context), DL.getIntPtrType(Context), File->getType(), -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -index 7bdc00c7..ec7937fc 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/ModuleObfuscator.cpp -@@ -308,7 +308,7 @@ bool llvm::obfuscateModule(Module &M, const TargetMachine *TM, Obfuscator &obfs, - TargetLibraryInfoImpl TLII(Triple(M.getTargetTriple())); - TargetLibraryInfo TLI(TLII); - auto isLibName = [&TLI](StringRef &S) { -- LibFunc::Func F; -+ LibFunc F; - return TLI.getLibFunc(S, F); - }; - -diff --git a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -index fecded3c..b3238cbb 100644 ---- a/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -+++ b/src/apple-llvm/src/lib/Transforms/Utils/SimplifyLibCalls.cpp -@@ -52,9 +52,9 @@ static cl::opt - // Helper Functions - //===----------------------------------------------------------------------===// - --static bool ignoreCallingConv(LibFunc::Func Func) { -- return Func == LibFunc::abs || Func == LibFunc::labs || -- Func == LibFunc::llabs || Func == LibFunc::strlen; -+static bool ignoreCallingConv(LibFunc Func) { -+ return Func == LibFunc_abs || Func == LibFunc_labs || -+ Func == LibFunc_llabs || Func == LibFunc_strlen; - } - - /// Return true if it only matters that the value is equal or not-equal to zero. -@@ -92,8 +92,8 @@ static bool callHasFloatingPointArgument(const CallInst *CI) { - /// \brief Check whether the overloaded unary floating point function - /// corresponding to \a Ty is available. - static bool hasUnaryFloatFn(const TargetLibraryInfo *TLI, Type *Ty, -- LibFunc::Func DoubleFn, LibFunc::Func FloatFn, -- LibFunc::Func LongDoubleFn) { -+ LibFunc DoubleFn, LibFunc FloatFn, -+ LibFunc LongDoubleFn) { - switch (Ty->getTypeID()) { - case Type::FloatTyID: - return TLI->has(FloatFn); -@@ -896,15 +896,15 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return Op1C; - // pow(2.0, x) -> exp2(x) - if (Op1C->isExactlyValue(2.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp2, LibFunc::exp2f, -- LibFunc::exp2l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp2), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp2, LibFunc_exp2f, -+ LibFunc_exp2l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp2), B, - Callee->getAttributes()); - // pow(10.0, x) -> exp10(x) - if (Op1C->isExactlyValue(10.0) && -- hasUnaryFloatFn(TLI, Op1->getType(), LibFunc::exp10, LibFunc::exp10f, -- LibFunc::exp10l)) -- return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc::exp10), B, -+ hasUnaryFloatFn(TLI, Op1->getType(), LibFunc_exp10, LibFunc_exp10f, -+ LibFunc_exp10l)) -+ return emitUnaryFloatFnCall(Op2, TLI->getName(LibFunc_exp10), B, - Callee->getAttributes()); - } - -@@ -916,10 +916,10 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - // pow(exp(x), y) = pow(inf, 0.001) = inf, whereas exp(x*y) = exp(1). - auto *OpC = dyn_cast(Op1); - if (OpC && OpC->hasUnsafeAlgebra() && CI->hasUnsafeAlgebra()) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *OpCCallee = OpC->getCalledFunction(); - if (OpCCallee && TLI->getLibFunc(OpCCallee->getName(), Func) && -- TLI->has(Func) && (Func == LibFunc::exp || Func == LibFunc::exp2)) { -+ TLI->has(Func) && (Func == LibFunc_exp || Func == LibFunc_exp2)) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); - Value *FMul = B.CreateFMul(OpC->getArgOperand(0), Op2, "mul"); -@@ -936,16 +936,16 @@ Value *LibCallSimplifier::optimizePow(CallInst *CI, IRBuilder<> &B) { - return ConstantFP::get(CI->getType(), 1.0); - - if (Op2C->isExactlyValue(0.5) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::sqrt, LibFunc::sqrtf, -- LibFunc::sqrtl) && -- hasUnaryFloatFn(TLI, Op2->getType(), LibFunc::fabs, LibFunc::fabsf, -- LibFunc::fabsl)) { -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_sqrt, LibFunc_sqrtf, -+ LibFunc_sqrtl) && -+ hasUnaryFloatFn(TLI, Op2->getType(), LibFunc_fabs, LibFunc_fabsf, -+ LibFunc_fabsl)) { - - // In -ffast-math, pow(x, 0.5) -> sqrt(x). - if (CI->hasUnsafeAlgebra()) { - IRBuilder<>::FastMathFlagGuard Guard(B); - B.setFastMathFlags(CI->getFastMathFlags()); -- return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc::sqrt), B, -+ return emitUnaryFloatFnCall(Op1, TLI->getName(LibFunc_sqrt), B, - Callee->getAttributes()); - } - -@@ -1018,11 +1018,11 @@ Value *LibCallSimplifier::optimizeExp2(CallInst *CI, IRBuilder<> &B) { - Value *Op = CI->getArgOperand(0); - // Turn exp2(sitofp(x)) -> ldexp(1.0, sext(x)) if sizeof(x) <= 32 - // Turn exp2(uitofp(x)) -> ldexp(1.0, zext(x)) if sizeof(x) < 32 -- LibFunc::Func LdExp = LibFunc::ldexpl; -+ LibFunc LdExp = LibFunc_ldexpl; - if (Op->getType()->isFloatTy()) -- LdExp = LibFunc::ldexpf; -+ LdExp = LibFunc_ldexpf; - else if (Op->getType()->isDoubleTy()) -- LdExp = LibFunc::ldexp; -+ LdExp = LibFunc_ldexp; - - if (TLI->has(LdExp)) { - Value *LdExpArg = nullptr; -@@ -1153,17 +1153,17 @@ Value *LibCallSimplifier::optimizeLog(CallInst *CI, IRBuilder<> &B) { - FMF.setUnsafeAlgebra(); - B.setFastMathFlags(FMF); - -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && ((TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- Func == LibFunc::pow) || F->getIntrinsicID() == Intrinsic::pow)) -+ Func == LibFunc_pow) || F->getIntrinsicID() == Intrinsic::pow)) - return B.CreateFMul(OpC->getArgOperand(1), - emitUnaryFloatFnCall(OpC->getOperand(0), Callee->getName(), B, - Callee->getAttributes()), "mul"); - - // log(exp2(y)) -> y*log(2) - if (F && Name == "log" && TLI->getLibFunc(F->getName(), Func) && -- TLI->has(Func) && Func == LibFunc::exp2) -+ TLI->has(Func) && Func == LibFunc_exp2) - return B.CreateFMul( - OpC->getArgOperand(0), - emitUnaryFloatFnCall(ConstantFP::get(CI->getType(), 2.0), -@@ -1176,7 +1176,7 @@ Value *LibCallSimplifier::optimizeSqrt(CallInst *CI, IRBuilder<> &B) { - Function *Callee = CI->getCalledFunction(); - - Value *Ret = nullptr; -- if (TLI->has(LibFunc::sqrtf) && (Callee->getName() == "sqrt" || -+ if (TLI->has(LibFunc_sqrtf) && (Callee->getName() == "sqrt" || - Callee->getIntrinsicID() == Intrinsic::sqrt)) - Ret = optimizeUnaryDoubleFP(CI, B, true); - -@@ -1275,12 +1275,12 @@ Value *LibCallSimplifier::optimizeTan(CallInst *CI, IRBuilder<> &B) { - // tan(atan(x)) -> x - // tanf(atanf(x)) -> x - // tanl(atanl(x)) -> x -- LibFunc::Func Func; -+ LibFunc Func; - Function *F = OpC->getCalledFunction(); - if (F && TLI->getLibFunc(F->getName(), Func) && TLI->has(Func) && -- ((Func == LibFunc::atan && Callee->getName() == "tan") || -- (Func == LibFunc::atanf && Callee->getName() == "tanf") || -- (Func == LibFunc::atanl && Callee->getName() == "tanl"))) -+ ((Func == LibFunc_atan && Callee->getName() == "tan") || -+ (Func == LibFunc_atanf && Callee->getName() == "tanf") || -+ (Func == LibFunc_atanl && Callee->getName() == "tanl"))) - Ret = OpC->getArgOperand(0); - return Ret; - } -@@ -1348,24 +1348,24 @@ LibCallSimplifier::classifyArgUse(Value *Val, Function *F, bool IsFloat, - return; - - Function *Callee = CI->getCalledFunction(); -- LibFunc::Func Func; -+ LibFunc Func; - if (!Callee || !TLI->getLibFunc(*Callee, Func) || !TLI->has(Func) || - !isTrigLibCall(CI)) - return; - - if (IsFloat) { -- if (Func == LibFunc::sinpif) -+ if (Func == LibFunc_sinpif) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospif) -+ else if (Func == LibFunc_cospif) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospif_stret) -+ else if (Func == LibFunc_sincospif_stret) - SinCosCalls.push_back(CI); - } else { -- if (Func == LibFunc::sinpi) -+ if (Func == LibFunc_sinpi) - SinCalls.push_back(CI); -- else if (Func == LibFunc::cospi) -+ else if (Func == LibFunc_cospi) - CosCalls.push_back(CI); -- else if (Func == LibFunc::sincospi_stret) -+ else if (Func == LibFunc_sincospi_stret) - SinCosCalls.push_back(CI); - } - } -@@ -1595,7 +1595,7 @@ Value *LibCallSimplifier::optimizePrintF(CallInst *CI, IRBuilder<> &B) { - - // printf(format, ...) -> iprintf(format, ...) if no floating point - // arguments. -- if (TLI->has(LibFunc::iprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_iprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *IPrintFFn = - M->getOrInsertFunction("iprintf", FT, Callee->getAttributes()); -@@ -1676,7 +1676,7 @@ Value *LibCallSimplifier::optimizeSPrintF(CallInst *CI, IRBuilder<> &B) { - - // sprintf(str, format, ...) -> siprintf(str, format, ...) if no floating - // point arguments. -- if (TLI->has(LibFunc::siprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_siprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *SIPrintFFn = - M->getOrInsertFunction("siprintf", FT, Callee->getAttributes()); -@@ -1746,7 +1746,7 @@ Value *LibCallSimplifier::optimizeFPrintF(CallInst *CI, IRBuilder<> &B) { - - // fprintf(stream, format, ...) -> fiprintf(stream, format, ...) if no - // floating point arguments. -- if (TLI->has(LibFunc::fiprintf) && !callHasFloatingPointArgument(CI)) { -+ if (TLI->has(LibFunc_fiprintf) && !callHasFloatingPointArgument(CI)) { - Module *M = B.GetInsertBlock()->getParent()->getParent(); - Constant *FIPrintFFn = - M->getOrInsertFunction("fiprintf", FT, Callee->getAttributes()); -@@ -1820,7 +1820,7 @@ Value *LibCallSimplifier::optimizePuts(CallInst *CI, IRBuilder<> &B) { - } - - bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { -- LibFunc::Func Func; -+ LibFunc Func; - SmallString<20> FloatFuncName = FuncName; - FloatFuncName += 'f'; - if (TLI->getLibFunc(FloatFuncName, Func)) -@@ -1830,7 +1830,7 @@ bool LibCallSimplifier::hasFloatVersion(StringRef FuncName) { - - Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - IRBuilder<> &Builder) { -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - // Check for string/memory library functions. - if (TLI->getLibFunc(*Callee, Func) && TLI->has(Func)) { -@@ -1839,51 +1839,51 @@ Value *LibCallSimplifier::optimizeStringMemoryLibCall(CallInst *CI, - CI->getCallingConv() == llvm::CallingConv::C) && - "Optimizing string/memory libcall would change the calling convention"); - switch (Func) { -- case LibFunc::strcat: -+ case LibFunc_strcat: - return optimizeStrCat(CI, Builder); -- case LibFunc::strncat: -+ case LibFunc_strncat: - return optimizeStrNCat(CI, Builder); -- case LibFunc::strchr: -+ case LibFunc_strchr: - return optimizeStrChr(CI, Builder); -- case LibFunc::strrchr: -+ case LibFunc_strrchr: - return optimizeStrRChr(CI, Builder); -- case LibFunc::strcmp: -+ case LibFunc_strcmp: - return optimizeStrCmp(CI, Builder); -- case LibFunc::strncmp: -+ case LibFunc_strncmp: - return optimizeStrNCmp(CI, Builder); -- case LibFunc::strcpy: -+ case LibFunc_strcpy: - return optimizeStrCpy(CI, Builder); -- case LibFunc::stpcpy: -+ case LibFunc_stpcpy: - return optimizeStpCpy(CI, Builder); -- case LibFunc::strncpy: -+ case LibFunc_strncpy: - return optimizeStrNCpy(CI, Builder); -- case LibFunc::strlen: -+ case LibFunc_strlen: - return optimizeStrLen(CI, Builder); -- case LibFunc::strpbrk: -+ case LibFunc_strpbrk: - return optimizeStrPBrk(CI, Builder); -- case LibFunc::strtol: -- case LibFunc::strtod: -- case LibFunc::strtof: -- case LibFunc::strtoul: -- case LibFunc::strtoll: -- case LibFunc::strtold: -- case LibFunc::strtoull: -+ case LibFunc_strtol: -+ case LibFunc_strtod: -+ case LibFunc_strtof: -+ case LibFunc_strtoul: -+ case LibFunc_strtoll: -+ case LibFunc_strtold: -+ case LibFunc_strtoull: - return optimizeStrTo(CI, Builder); -- case LibFunc::strspn: -+ case LibFunc_strspn: - return optimizeStrSpn(CI, Builder); -- case LibFunc::strcspn: -+ case LibFunc_strcspn: - return optimizeStrCSpn(CI, Builder); -- case LibFunc::strstr: -+ case LibFunc_strstr: - return optimizeStrStr(CI, Builder); -- case LibFunc::memchr: -+ case LibFunc_memchr: - return optimizeMemChr(CI, Builder); -- case LibFunc::memcmp: -+ case LibFunc_memcmp: - return optimizeMemCmp(CI, Builder); -- case LibFunc::memcpy: -+ case LibFunc_memcpy: - return optimizeMemCpy(CI, Builder); -- case LibFunc::memmove: -+ case LibFunc_memmove: - return optimizeMemMove(CI, Builder); -- case LibFunc::memset: -+ case LibFunc_memset: - return optimizeMemSet(CI, Builder); - default: - break; -@@ -1896,7 +1896,7 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (CI->isNoBuiltin()) - return nullptr; - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - StringRef FuncName = Callee->getName(); - -@@ -1957,110 +1957,110 @@ Value *LibCallSimplifier::optimizeCall(CallInst *CI) { - if (Value *V = optimizeStringMemoryLibCall(CI, Builder)) - return V; - switch (Func) { -- case LibFunc::cosf: -- case LibFunc::cos: -- case LibFunc::cosl: -+ case LibFunc_cosf: -+ case LibFunc_cos: -+ case LibFunc_cosl: - return optimizeCos(CI, Builder); -- case LibFunc::sinpif: -- case LibFunc::sinpi: -- case LibFunc::cospif: -- case LibFunc::cospi: -+ case LibFunc_sinpif: -+ case LibFunc_sinpi: -+ case LibFunc_cospif: -+ case LibFunc_cospi: - return optimizeSinCosPi(CI, Builder); -- case LibFunc::powf: -- case LibFunc::pow: -- case LibFunc::powl: -+ case LibFunc_powf: -+ case LibFunc_pow: -+ case LibFunc_powl: - return optimizePow(CI, Builder); -- case LibFunc::exp2l: -- case LibFunc::exp2: -- case LibFunc::exp2f: -+ case LibFunc_exp2l: -+ case LibFunc_exp2: -+ case LibFunc_exp2f: - return optimizeExp2(CI, Builder); -- case LibFunc::fabsf: -- case LibFunc::fabs: -- case LibFunc::fabsl: -+ case LibFunc_fabsf: -+ case LibFunc_fabs: -+ case LibFunc_fabsl: - return optimizeFabs(CI, Builder); -- case LibFunc::sqrtf: -- case LibFunc::sqrt: -- case LibFunc::sqrtl: -+ case LibFunc_sqrtf: -+ case LibFunc_sqrt: -+ case LibFunc_sqrtl: - return optimizeSqrt(CI, Builder); -- case LibFunc::ffs: -- case LibFunc::ffsl: -- case LibFunc::ffsll: -+ case LibFunc_ffs: -+ case LibFunc_ffsl: -+ case LibFunc_ffsll: - return optimizeFFS(CI, Builder); -- case LibFunc::abs: -- case LibFunc::labs: -- case LibFunc::llabs: -+ case LibFunc_abs: -+ case LibFunc_labs: -+ case LibFunc_llabs: - return optimizeAbs(CI, Builder); -- case LibFunc::isdigit: -+ case LibFunc_isdigit: - return optimizeIsDigit(CI, Builder); -- case LibFunc::isascii: -+ case LibFunc_isascii: - return optimizeIsAscii(CI, Builder); -- case LibFunc::toascii: -+ case LibFunc_toascii: - return optimizeToAscii(CI, Builder); -- case LibFunc::printf: -+ case LibFunc_printf: - return optimizePrintF(CI, Builder); -- case LibFunc::sprintf: -+ case LibFunc_sprintf: - return optimizeSPrintF(CI, Builder); -- case LibFunc::fprintf: -+ case LibFunc_fprintf: - return optimizeFPrintF(CI, Builder); -- case LibFunc::fwrite: -+ case LibFunc_fwrite: - return optimizeFWrite(CI, Builder); -- case LibFunc::fputs: -+ case LibFunc_fputs: - return optimizeFPuts(CI, Builder); -- case LibFunc::log: -- case LibFunc::log10: -- case LibFunc::log1p: -- case LibFunc::log2: -- case LibFunc::logb: -+ case LibFunc_log: -+ case LibFunc_log10: -+ case LibFunc_log1p: -+ case LibFunc_log2: -+ case LibFunc_logb: - return optimizeLog(CI, Builder); -- case LibFunc::puts: -+ case LibFunc_puts: - return optimizePuts(CI, Builder); -- case LibFunc::tan: -- case LibFunc::tanf: -- case LibFunc::tanl: -+ case LibFunc_tan: -+ case LibFunc_tanf: -+ case LibFunc_tanl: - return optimizeTan(CI, Builder); -- case LibFunc::perror: -+ case LibFunc_perror: - return optimizeErrorReporting(CI, Builder); -- case LibFunc::vfprintf: -- case LibFunc::fiprintf: -+ case LibFunc_vfprintf: -+ case LibFunc_fiprintf: - return optimizeErrorReporting(CI, Builder, 0); -- case LibFunc::fputc: -+ case LibFunc_fputc: - return optimizeErrorReporting(CI, Builder, 1); -- case LibFunc::ceil: -- case LibFunc::floor: -- case LibFunc::rint: -- case LibFunc::round: -- case LibFunc::nearbyint: -- case LibFunc::trunc: -+ case LibFunc_ceil: -+ case LibFunc_floor: -+ case LibFunc_rint: -+ case LibFunc_round: -+ case LibFunc_nearbyint: -+ case LibFunc_trunc: - if (hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, false); - return nullptr; -- case LibFunc::acos: -- case LibFunc::acosh: -- case LibFunc::asin: -- case LibFunc::asinh: -- case LibFunc::atan: -- case LibFunc::atanh: -- case LibFunc::cbrt: -- case LibFunc::cosh: -- case LibFunc::exp: -- case LibFunc::exp10: -- case LibFunc::expm1: -- case LibFunc::sin: -- case LibFunc::sinh: -- case LibFunc::tanh: -+ case LibFunc_acos: -+ case LibFunc_acosh: -+ case LibFunc_asin: -+ case LibFunc_asinh: -+ case LibFunc_atan: -+ case LibFunc_atanh: -+ case LibFunc_cbrt: -+ case LibFunc_cosh: -+ case LibFunc_exp: -+ case LibFunc_exp10: -+ case LibFunc_expm1: -+ case LibFunc_sin: -+ case LibFunc_sinh: -+ case LibFunc_tanh: - if (UnsafeFPShrink && hasFloatVersion(FuncName)) - return optimizeUnaryDoubleFP(CI, Builder, true); - return nullptr; -- case LibFunc::copysign: -+ case LibFunc_copysign: - if (hasFloatVersion(FuncName)) - return optimizeBinaryDoubleFP(CI, Builder); - return nullptr; -- case LibFunc::fminf: -- case LibFunc::fmin: -- case LibFunc::fminl: -- case LibFunc::fmaxf: -- case LibFunc::fmax: -- case LibFunc::fmaxl: -+ case LibFunc_fminf: -+ case LibFunc_fmin: -+ case LibFunc_fminl: -+ case LibFunc_fmaxf: -+ case LibFunc_fmax: -+ case LibFunc_fmaxl: - return optimizeFMinFMax(CI, Builder); - default: - return nullptr; -@@ -2184,7 +2184,7 @@ Value *FortifiedLibCallSimplifier::optimizeMemSetChk(CallInst *CI, - - Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - const DataLayout &DL = CI->getModule()->getDataLayout(); -@@ -2192,7 +2192,7 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - *ObjSize = CI->getArgOperand(2); - - // __stpcpy_chk(x,x,...) -> x+strlen(x) -- if (Func == LibFunc::stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { -+ if (Func == LibFunc_stpcpy_chk && !OnlyLowerUnknownSize && Dst == Src) { - Value *StrLen = emitStrLen(Src, B, DL, TLI); - return StrLen ? B.CreateInBoundsGEP(B.getInt8Ty(), Dst, StrLen) : nullptr; - } -@@ -2218,14 +2218,14 @@ Value *FortifiedLibCallSimplifier::optimizeStrpCpyChk(CallInst *CI, - Value *Ret = emitMemCpyChk(Dst, Src, LenV, ObjSize, B, DL, TLI); - // If the function was an __stpcpy_chk, and we were able to fold it into - // a __memcpy_chk, we still need to return the correct end pointer. -- if (Ret && Func == LibFunc::stpcpy_chk) -+ if (Ret && Func == LibFunc_stpcpy_chk) - return B.CreateGEP(B.getInt8Ty(), Dst, ConstantInt::get(SizeTTy, Len - 1)); - return Ret; - } - - Value *FortifiedLibCallSimplifier::optimizeStrpNCpyChk(CallInst *CI, - IRBuilder<> &B, -- LibFunc::Func Func) { -+ LibFunc Func) { - Function *Callee = CI->getCalledFunction(); - StringRef Name = Callee->getName(); - if (isFortifiedCallFoldable(CI, 3, 2, false)) { -@@ -2250,7 +2250,7 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - // - // PR23093. - -- LibFunc::Func Func; -+ LibFunc Func; - Function *Callee = CI->getCalledFunction(); - - SmallVector OpBundles; -@@ -2268,17 +2268,17 @@ Value *FortifiedLibCallSimplifier::optimizeCall(CallInst *CI) { - return nullptr; - - switch (Func) { -- case LibFunc::memcpy_chk: -+ case LibFunc_memcpy_chk: - return optimizeMemCpyChk(CI, Builder); -- case LibFunc::memmove_chk: -+ case LibFunc_memmove_chk: - return optimizeMemMoveChk(CI, Builder); -- case LibFunc::memset_chk: -+ case LibFunc_memset_chk: - return optimizeMemSetChk(CI, Builder); -- case LibFunc::stpcpy_chk: -- case LibFunc::strcpy_chk: -+ case LibFunc_stpcpy_chk: -+ case LibFunc_strcpy_chk: - return optimizeStrpCpyChk(CI, Builder, Func); -- case LibFunc::stpncpy_chk: -- case LibFunc::strncpy_chk: -+ case LibFunc_stpncpy_chk: -+ case LibFunc_strncpy_chk: - return optimizeStrpNCpyChk(CI, Builder, Func); - default: - break; diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_musl.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_musl.patch new file mode 120000 index 00000000000..435ae951cdc --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/libtapi_musl.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/libtapi_musl.patch \ No newline at end of file diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/mingw_gcc710_i686.patch deleted file mode 100644 index 954f6ce3d60..00000000000 --- a/0_RootFS/GCCBootstrap@9/bundled/patches/mingw_gcc710_i686.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 431ac2a912708546cd7271332e9331399e66bc62 Mon Sep 17 00:00:00 2001 -From: Liu Hao -Date: Wed, 3 May 2017 15:52:32 +0800 -Subject: [PATCH] winpthreads/src/dll_math.c: Implement `__divmoddi4()' for GCC - 7. - -GCC targeting i686 _may_ generate an external call to the function in -question when divding a 64-bit (DIMode) integer with another one. -Since we are linking against a fake libgcc, we have to implement it too. - -Signed-off-by: Liu Hao ---- - .../winpthreads/src/libgcc/dll_math.c | 27 ++++++++++++++++++++++ - 1 file changed, 27 insertions(+) - -diff --git a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -index e09b481..aeec068 100644 ---- a/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -+++ b/mingw-w64-libraries/winpthreads/src/libgcc/dll_math.c -@@ -120,6 +120,7 @@ u_quad_t __qdivrem(u_quad_t u, u_quad_t v, u_quad_t *rem); - u_quad_t __udivdi3(u_quad_t a, u_quad_t b); - u_quad_t __umoddi3(u_quad_t a, u_quad_t b); - int __ucmpdi2(u_quad_t a, u_quad_t b); -+quad_t __divmoddi4(quad_t a, quad_t b, quad_t *rem); - - #endif /* !_LIBKERN_QUAD_H_ */ - -@@ -546,6 +547,32 @@ __umoddi3(a, b) - (void)__qdivrem(a, b, &r); - return (r); - } -+ -+/* -+ * Divide two signed quads. -+ * This function is new in GCC 7. -+ */ -+quad_t -+__divmoddi4(a, b, rem) -+ quad_t a, b, *rem; -+{ -+ u_quad_t ua, ub, uq, ur; -+ int negq, negr; -+ -+ if (a < 0) -+ ua = -(u_quad_t)a, negq = 1, negr = 1; -+ else -+ ua = a, negq = 0, negr = 0; -+ if (b < 0) -+ ub = -(u_quad_t)b, negq ^= 1; -+ else -+ ub = b; -+ uq = __qdivrem(ua, ub, &ur); -+ if (rem) -+ *rem = (negr ? -ur : ur); -+ return (negq ? -uq : uq); -+} -+ - #else - static int __attribute__((unused)) dummy; - #endif /*deined (_X86_) && !defined (__x86_64__)*/ --- -2.7.4 - diff --git a/0_RootFS/GCCBootstrap@9/bundled/patches/mingw_gcc710_i686.patch b/0_RootFS/GCCBootstrap@9/bundled/patches/mingw_gcc710_i686.patch new file mode 120000 index 00000000000..94de400d805 --- /dev/null +++ b/0_RootFS/GCCBootstrap@9/bundled/patches/mingw_gcc710_i686.patch @@ -0,0 +1 @@ +../../../GCCBootstrap@4/bundled/patches/mingw_gcc710_i686.patch \ No newline at end of file