diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-02-05 18:39:15 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-02-05 18:39:15 +0000 |
commit | d87c9e7da2e87f224c426832f08897269c2e5636 (patch) | |
tree | 9492632723d36c1c80f3daca3974f362eea84a7a | |
parent | 292698a8537d1e51bbcd339f8a19b2b7d7f1e1f6 (diff) |
Vendor import of clang release_80 branch r353167:vendor/clang/clang-release_80-r353167
Notes
Notes:
svn path=/vendor/clang/dist-release_80/; revision=343796
svn path=/vendor/clang/clang-release_80-r353167/; revision=343797; tag=vendor/clang/clang-release_80-r353167
48 files changed, 807 insertions, 875 deletions
diff --git a/docs/LanguageExtensions.rst b/docs/LanguageExtensions.rst index e155cefb7890..5782edd35370 100644 --- a/docs/LanguageExtensions.rst +++ b/docs/LanguageExtensions.rst @@ -474,44 +474,58 @@ Half-Precision Floating Point ============================= Clang supports two half-precision (16-bit) floating point types: ``__fp16`` and -``_Float16``. ``__fp16`` is defined in the ARM C Language Extensions (`ACLE -<http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053d/IHI0053D_acle_2_1.pdf>`_) -and ``_Float16`` in ISO/IEC TS 18661-3:2015. - -``__fp16`` is a storage and interchange format only. This means that values of -``__fp16`` promote to (at least) float when used in arithmetic operations. -There are two ``__fp16`` formats. Clang supports the IEEE 754-2008 format and -not the ARM alternative format. - -ISO/IEC TS 18661-3:2015 defines C support for additional floating point types. -``_FloatN`` is defined as a binary floating type, where the N suffix denotes -the number of bits and is 16, 32, 64, or greater and equal to 128 and a -multiple of 32. Clang supports ``_Float16``. The difference from ``__fp16`` is -that arithmetic on ``_Float16`` is performed in half-precision, thus it is not -a storage-only format. ``_Float16`` is available as a source language type in -both C and C++ mode. - -It is recommended that portable code use the ``_Float16`` type because -``__fp16`` is an ARM C-Language Extension (ACLE), whereas ``_Float16`` is -defined by the C standards committee, so using ``_Float16`` will not prevent -code from being ported to architectures other than Arm. Also, ``_Float16`` -arithmetic and operations will directly map on half-precision instructions when -they are available (e.g. Armv8.2-A), avoiding conversions to/from -single-precision, and thus will result in more performant code. If -half-precision instructions are unavailable, values will be promoted to -single-precision, similar to the semantics of ``__fp16`` except that the -results will be stored in single-precision. - -In an arithmetic operation where one operand is of ``__fp16`` type and the -other is of ``_Float16`` type, the ``_Float16`` type is first converted to -``__fp16`` type and then the operation is completed as if both operands were of -``__fp16`` type. - -To define a ``_Float16`` literal, suffix ``f16`` can be appended to the compile-time -constant declaration. There is no default argument promotion for ``_Float16``; this -applies to the standard floating types only. As a consequence, for example, an -explicit cast is required for printing a ``_Float16`` value (there is no string -format specifier for ``_Float16``). +``_Float16``. These types are supported in all language modes. + +``__fp16`` is supported on every target, as it is purely a storage format; see below. +``_Float16`` is currently only supported on the following targets, with further +targets pending ABI standardization: +- 32-bit ARM +- 64-bit ARM (AArch64) +- SPIR +``_Float16`` will be supported on more targets as they define ABIs for it. + +``__fp16`` is a storage and interchange format only. This means that values of +``__fp16`` are immediately promoted to (at least) ``float`` when used in arithmetic +operations, so that e.g. the result of adding two ``__fp16`` values has type ``float``. +The behavior of ``__fp16`` is specified by the ARM C Language Extensions (`ACLE <http://infocenter.arm.com/help/topic/com.arm.doc.ihi0053d/IHI0053D_acle_2_1.pdf>`_). +Clang uses the ``binary16`` format from IEEE 754-2008 for ``__fp16``, not the ARM +alternative format. + +``_Float16`` is an extended floating-point type. This means that, just like arithmetic on +``float`` or ``double``, arithmetic on ``_Float16`` operands is formally performed in the +``_Float16`` type, so that e.g. the result of adding two ``_Float16`` values has type +``_Float16``. The behavior of ``_Float16`` is specified by ISO/IEC TS 18661-3:2015 +("Floating-point extensions for C"). As with ``__fp16``, Clang uses the ``binary16`` +format from IEEE 754-2008 for ``_Float16``. + +``_Float16`` arithmetic will be performed using native half-precision support +when available on the target (e.g. on ARMv8.2a); otherwise it will be performed +at a higher precision (currently always ``float``) and then truncated down to +``_Float16``. Note that C and C++ allow intermediate floating-point operands +of an expression to be computed with greater precision than is expressible in +their type, so Clang may avoid intermediate truncations in certain cases; this may +lead to results that are inconsistent with native arithmetic. + +It is recommended that portable code use ``_Float16`` instead of ``__fp16``, +as it has been defined by the C standards committee and has behavior that is +more familiar to most programmers. + +Because ``__fp16`` operands are always immediately promoted to ``float``, the +common real type of ``__fp16`` and ``_Float16`` for the purposes of the usual +arithmetic conversions is ``float``. + +A literal can be given ``_Float16`` type using the suffix ``f16``; for example: +``` +3.14f16 +``` + +Because default argument promotion only applies to the standard floating-point +types, ``_Float16`` values are not promoted to ``double`` when passed as variadic +or untyped arguments. As a consequence, some caution must be taken when using +certain library facilities with ``_Float16``; for example, there is no ``printf`` format +specifier for ``_Float16``, and (unlike ``float``) it will not be implicitly promoted to +``double`` when passed to ``printf``, so the programmer must explicitly cast it to +``double`` before using it with an ``%f`` or similar specifier. Messages on ``deprecated`` and ``unavailable`` Attributes ========================================================= diff --git a/docs/OpenMPSupport.rst b/docs/OpenMPSupport.rst index 04a9648ca294..7b567c966ee5 100644 --- a/docs/OpenMPSupport.rst +++ b/docs/OpenMPSupport.rst @@ -17,60 +17,50 @@ OpenMP Support ================== -Clang fully supports OpenMP 4.5. Clang supports offloading to X86_64, AArch64, -PPC64[LE] and has `basic support for Cuda devices`_. - -Standalone directives -===================== - -* #pragma omp [for] simd: :good:`Complete`. - -* #pragma omp declare simd: :partial:`Partial`. We support parsing/semantic - analysis + generation of special attributes for X86 target, but still - missing the LLVM pass for vectorization. - -* #pragma omp taskloop [simd]: :good:`Complete`. - -* #pragma omp target [enter|exit] data: :good:`Complete`. - -* #pragma omp target update: :good:`Complete`. - -* #pragma omp target: :good:`Complete`. +Clang supports the following OpenMP 5.0 features -* #pragma omp declare target: :good:`Complete`. +* The `reduction`-based clauses in the `task` and `target`-based directives. -* #pragma omp teams: :good:`Complete`. +* Support relational-op != (not-equal) as one of the canonical forms of random + access iterator. -* #pragma omp distribute [simd]: :good:`Complete`. +* Support for mapping of the lambdas in target regions. -* #pragma omp distribute parallel for [simd]: :good:`Complete`. +* Parsing/sema analysis for the requires directive. -Combined directives -=================== +* Nested declare target directives. -* #pragma omp parallel for simd: :good:`Complete`. +* Make the `this` pointer implicitly mapped as `map(this[:1])`. -* #pragma omp target parallel: :good:`Complete`. +* The `close` *map-type-modifier*. -* #pragma omp target parallel for [simd]: :good:`Complete`. - -* #pragma omp target simd: :good:`Complete`. - -* #pragma omp target teams: :good:`Complete`. - -* #pragma omp teams distribute [simd]: :good:`Complete`. - -* #pragma omp target teams distribute [simd]: :good:`Complete`. - -* #pragma omp teams distribute parallel for [simd]: :good:`Complete`. - -* #pragma omp target teams distribute parallel for [simd]: :good:`Complete`. +Clang fully supports OpenMP 4.5. Clang supports offloading to X86_64, AArch64, +PPC64[LE] and has `basic support for Cuda devices`_. -Clang does not support any constructs/updates from OpenMP 5.0 except -for `reduction`-based clauses in the `task` and `target`-based directives. +* #pragma omp declare simd: :partial:`Partial`. We support parsing/semantic + analysis + generation of special attributes for X86 target, but still + missing the LLVM pass for vectorization. In addition, the LLVM OpenMP runtime `libomp` supports the OpenMP Tools -Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and mac OS. +Interface (OMPT) on x86, x86_64, AArch64, and PPC64 on Linux, Windows, and macOS. + +General improvements +-------------------- +- New collapse clause scheme to avoid expensive remainder operations. + Compute loop index variables after collapsing a loop nest via the + collapse clause by replacing the expensive remainder operation with + multiplications and additions. + +- The default schedules for the `distribute` and `for` constructs in a + parallel region and in SPMD mode have changed to ensure coalesced + accesses. For the `distribute` construct, a static schedule is used + with a chunk size equal to the number of threads per team (default + value of threads or as specified by the `thread_limit` clause if + present). For the `for` construct, the schedule is static with chunk + size of one. + +- Simplified SPMD code generation for `distribute parallel for` when + the new default schedules are applicable. .. _basic support for Cuda devices: diff --git a/docs/ReleaseNotes.rst b/docs/ReleaseNotes.rst index b6a405dbc78b..50bf636a51f4 100644 --- a/docs/ReleaseNotes.rst +++ b/docs/ReleaseNotes.rst @@ -127,6 +127,10 @@ Non-comprehensive list of changes in this release manually and rely on the old behaviour you will need to add appropriate compiler flags for finding the corresponding libc++ include directory. +- The integrated assembler is used now by default for all MIPS targets. + +- Improved support for MIPS N32 ABI and MIPS R6 target triples. + New Compiler Flags ------------------ @@ -136,6 +140,13 @@ New Compiler Flags instrumenting for gcov-based profiling. See the :doc:`UsersManual` for details. +- When using a custom stack alignment, the ``stackrealign`` attribute is now + implicitly set on the main function. + +- Emission of ``R_MIPS_JALR`` and ``R_MICROMIPS_JALR`` relocations can now + be controlled by the ``-mrelax-pic-calls`` and ``-mno-relax-pic-calls`` + options. + - ... Deprecated Compiler Flags @@ -179,6 +190,15 @@ Windows Support `dllexport` and `dllimport` attributes not apply to inline member functions. This can significantly reduce compile and link times. See the `User's Manual <UsersManual.html#the-zc-dllexportinlines-option>`_ for more info. + +- For MinGW, ``-municode`` now correctly defines ``UNICODE`` during + preprocessing. + +- For MinGW, clang now produces vtables and RTTI for dllexported classes + without key functions. This fixes building Qt in debug mode. + +- Allow using Address Sanitizer and Undefined Behaviour Sanitizer on MinGW. + - ... @@ -233,12 +253,15 @@ ABI Changes in Clang OpenMP Support in Clang ---------------------------------- -- Support relational-op != (not-equal) as one of the canonical forms of random - access iterator. - -- Added support for mapping of the lambdas in target regions. +- OpenMP 5.0 features -- Added parsing/sema analysis for OpenMP 5.0 requires directive. + - Support relational-op != (not-equal) as one of the canonical forms of random + access iterator. + - Added support for mapping of the lambdas in target regions. + - Added parsing/sema analysis for the requires directive. + - Support nested declare target directives. + - Make the `this` pointer implicitly mapped as `map(this[:1])`. + - Added the `close` *map-type-modifier*. - Various bugfixes and improvements. @@ -250,6 +273,15 @@ New features supported for Cuda devices: - Fixed support for lastprivate/reduction variables in SPMD constructs. +- New collapse clause scheme to avoid expensive remainder operations. + +- New default schedule for distribute and parallel constructs. + +- Simplified code generation for distribute and parallel in SPMD mode. + +- Flag (``-fopenmp_optimistic_collapse``) for user to limit collapsed + loop counter width when safe to do so. + - General performance improvement. CUDA Support in Clang diff --git a/include/clang/Basic/BuiltinsAArch64.def b/include/clang/Basic/BuiltinsAArch64.def index 1892ff11a31d..690d547f7f3e 100644 --- a/include/clang/Basic/BuiltinsAArch64.def +++ b/include/clang/Basic/BuiltinsAArch64.def @@ -33,7 +33,7 @@ BUILTIN(__builtin_arm_clrex, "v", "") // Bit manipulation BUILTIN(__builtin_arm_rbit, "UiUi", "nc") -BUILTIN(__builtin_arm_rbit64, "LUiLUi", "nc") +BUILTIN(__builtin_arm_rbit64, "WUiWUi", "nc") // HINT BUILTIN(__builtin_arm_nop, "v", "") @@ -50,8 +50,8 @@ BUILTIN(__builtin_arm_crc32h, "UiUiUs", "nc") BUILTIN(__builtin_arm_crc32ch, "UiUiUs", "nc") BUILTIN(__builtin_arm_crc32w, "UiUiUi", "nc") BUILTIN(__builtin_arm_crc32cw, "UiUiUi", "nc") -BUILTIN(__builtin_arm_crc32d, "UiUiLUi", "nc") -BUILTIN(__builtin_arm_crc32cd, "UiUiLUi", "nc") +BUILTIN(__builtin_arm_crc32d, "UiUiWUi", "nc") +BUILTIN(__builtin_arm_crc32cd, "UiUiWUi", "nc") // Memory barrier BUILTIN(__builtin_arm_dmb, "vUi", "nc") @@ -63,10 +63,10 @@ BUILTIN(__builtin_arm_prefetch, "vvC*UiUiUiUi", "nc") // System Registers BUILTIN(__builtin_arm_rsr, "UicC*", "nc") -BUILTIN(__builtin_arm_rsr64, "LUicC*", "nc") +BUILTIN(__builtin_arm_rsr64, "WUicC*", "nc") BUILTIN(__builtin_arm_rsrp, "v*cC*", "nc") BUILTIN(__builtin_arm_wsr, "vcC*Ui", "nc") -BUILTIN(__builtin_arm_wsr64, "vcC*LUi", "nc") +BUILTIN(__builtin_arm_wsr64, "vcC*WUi", "nc") BUILTIN(__builtin_arm_wsrp, "vcC*vC*", "nc") // MSVC diff --git a/include/clang/Basic/Features.def b/include/clang/Basic/Features.def index 05464ed85f13..8b3b59b51c54 100644 --- a/include/clang/Basic/Features.def +++ b/include/clang/Basic/Features.def @@ -96,7 +96,7 @@ FEATURE(objc_arc, LangOpts.ObjCAutoRefCount) FEATURE(objc_arc_fields, true) FEATURE(objc_arc_weak, LangOpts.ObjCWeak) FEATURE(objc_default_synthesize_properties, LangOpts.ObjC) -FEATURE(objc_fixed_enum, true) +FEATURE(objc_fixed_enum, LangOpts.ObjC) FEATURE(objc_instancetype, LangOpts.ObjC) FEATURE(objc_kindof, LangOpts.ObjC) FEATURE(objc_modules, LangOpts.ObjC && LangOpts.Modules) diff --git a/include/clang/Basic/FileManager.h b/include/clang/Basic/FileManager.h index e7891baf5304..6a71289f74c1 100644 --- a/include/clang/Basic/FileManager.h +++ b/include/clang/Basic/FileManager.h @@ -70,15 +70,14 @@ class FileEntry { bool IsNamedPipe; bool InPCH; bool IsValid; // Is this \c FileEntry initialized and valid? - bool DeferredOpen; // Created by getFile(OpenFile=0); may open later. /// The open file, if it is owned by the \p FileEntry. mutable std::unique_ptr<llvm::vfs::File> File; public: FileEntry() - : UniqueID(0, 0), IsNamedPipe(false), InPCH(false), IsValid(false), - DeferredOpen(false) {} + : UniqueID(0, 0), IsNamedPipe(false), InPCH(false), IsValid(false) + {} FileEntry(const FileEntry &) = delete; FileEntry &operator=(const FileEntry &) = delete; diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index 786b1c251ca8..1e835d992bbe 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -64,6 +64,7 @@ protected: bool HasLegalHalfType; // True if the backend supports operations on the half // LLVM IR type. bool HasFloat128; + bool HasFloat16; unsigned char PointerWidth, PointerAlign; unsigned char BoolWidth, BoolAlign; unsigned char IntWidth, IntAlign; @@ -517,6 +518,9 @@ public: /// Determine whether the __float128 type is supported on this target. virtual bool hasFloat128Type() const { return HasFloat128; } + /// Determine whether the _Float16 type is supported on this target. + virtual bool hasFloat16Type() const { return HasFloat16; } + /// Return the alignment that is suitable for storing any /// object with a fundamental alignment requirement. unsigned getSuitableAlign() const { return SuitableAlign; } diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index f02a7190f5a7..d8155a95775c 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -2418,6 +2418,14 @@ def modd_spreg : Flag<["-"], "modd-spreg">, Group<m_mips_Features_Group>, def mno_odd_spreg : Flag<["-"], "mno-odd-spreg">, Group<m_mips_Features_Group>, HelpText<"Disable odd single-precision floating point registers">, Flags<[HelpHidden]>; +def mrelax_pic_calls : Flag<["-"], "mrelax-pic-calls">, + Group<m_mips_Features_Group>, + HelpText<"Try turning PIC calls (j{al}r{c} $25) into direct calls " + "(MIPS only)">, Flags<[HelpHidden]>; +def mno_relax_pic_calls : Flag<["-"], "mno-relax-pic-calls">, + Group<m_mips_Features_Group>, + HelpText<"Do not try turning PIC calls (j{al}r{c} $25) into direct calls " + "(MIPS only)">, Flags<[HelpHidden]>; def mglibc : Flag<["-"], "mglibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; def muclibc : Flag<["-"], "muclibc">, Group<m_libc_Group>, Flags<[HelpHidden]>; def module_file_info : Flag<["-"], "module-file-info">, Flags<[DriverOption,CC1Option]>, Group<Action_Group>, diff --git a/include/clang/Tooling/ArgumentsAdjusters.h b/include/clang/Tooling/ArgumentsAdjusters.h index 94ccf1f34e57..e31839b9a8f7 100644 --- a/include/clang/Tooling/ArgumentsAdjusters.h +++ b/include/clang/Tooling/ArgumentsAdjusters.h @@ -61,6 +61,10 @@ ArgumentsAdjuster getInsertArgumentAdjuster( const char *Extra, ArgumentInsertPosition Pos = ArgumentInsertPosition::END); +/// Gets an argument adjuster which strips plugin related command line +/// arguments. +ArgumentsAdjuster getStripPluginsAdjuster(); + /// Gets an argument adjuster which adjusts the arguments in sequence /// with the \p First adjuster and then with the \p Second one. ArgumentsAdjuster combineAdjusters(ArgumentsAdjuster First, diff --git a/lib/Basic/FileManager.cpp b/lib/Basic/FileManager.cpp index f5a2d4894c13..01ec1d69cde5 100644 --- a/lib/Basic/FileManager.cpp +++ b/lib/Basic/FileManager.cpp @@ -189,21 +189,15 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, *SeenFileEntries.insert(std::make_pair(Filename, nullptr)).first; // See if there is already an entry in the map. - if (NamedFileEnt.second) { - if (NamedFileEnt.second == NON_EXISTENT_FILE) - return nullptr; - // Entry exists: return it *unless* it wasn't opened and open is requested. - if (!(NamedFileEnt.second->DeferredOpen && openFile)) - return NamedFileEnt.second; - // We previously stat()ed the file, but didn't open it: do that below. - // FIXME: the below does other redundant work too (stats the dir and file). - } else { - // By default, initialize it to invalid. - NamedFileEnt.second = NON_EXISTENT_FILE; - } + if (NamedFileEnt.second) + return NamedFileEnt.second == NON_EXISTENT_FILE ? nullptr + : NamedFileEnt.second; ++NumFileCacheMisses; + // By default, initialize it to invalid. + NamedFileEnt.second = NON_EXISTENT_FILE; + // Get the null-terminated file name as stored as the key of the // SeenFileEntries map. StringRef InterndFileName = NamedFileEnt.first(); @@ -241,7 +235,6 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, // It exists. See if we have already opened a file with the same inode. // This occurs when one dir is symlinked to another, for example. FileEntry &UFE = UniqueRealFiles[Data.UniqueID]; - UFE.DeferredOpen = !openFile; NamedFileEnt.second = &UFE; @@ -258,15 +251,6 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, InterndFileName = NamedFileEnt.first().data(); } - // If we opened the file for the first time, record the resulting info. - // Do this even if the cache entry was valid, maybe we didn't previously open. - if (F && !UFE.File) { - if (auto PathName = F->getName()) - fillRealPathName(&UFE, *PathName); - UFE.File = std::move(F); - assert(!UFE.DeferredOpen && "we just opened it!"); - } - if (UFE.isValid()) { // Already have an entry with this inode, return it. // FIXME: this hack ensures that if we look up a file by a virtual path in @@ -297,9 +281,13 @@ const FileEntry *FileManager::getFile(StringRef Filename, bool openFile, UFE.UniqueID = Data.UniqueID; UFE.IsNamedPipe = Data.IsNamedPipe; UFE.InPCH = Data.InPCH; + UFE.File = std::move(F); UFE.IsValid = true; - // Note File and DeferredOpen were initialized above. + if (UFE.File) { + if (auto PathName = UFE.File->getName()) + fillRealPathName(&UFE, *PathName); + } return &UFE; } @@ -371,7 +359,6 @@ FileManager::getVirtualFile(StringRef Filename, off_t Size, UFE->UID = NextFileUID++; UFE->IsValid = true; UFE->File.reset(); - UFE->DeferredOpen = false; return UFE; } diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp index 269fad38b8d5..8b7621d7962e 100644 --- a/lib/Basic/TargetInfo.cpp +++ b/lib/Basic/TargetInfo.cpp @@ -35,6 +35,7 @@ TargetInfo::TargetInfo(const llvm::Triple &T) : TargetOpts(), Triple(T) { NoAsmVariants = false; HasLegalHalfType = false; HasFloat128 = false; + HasFloat16 = false; PointerWidth = PointerAlign = 32; BoolWidth = BoolAlign = 8; IntWidth = IntAlign = 32; diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index cf87bc484621..3c139d724796 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -570,19 +570,27 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple, Triple.getVendor() != llvm::Triple::UnknownVendor || !Triple.isOSBinFormatWasm()) return nullptr; - if (Triple.getOS() != llvm::Triple::UnknownOS && - Triple.getOS() != llvm::Triple::WASI) - return nullptr; - return new WebAssemblyOSTargetInfo<WebAssembly32TargetInfo>(Triple, Opts); + switch (Triple.getOS()) { + case llvm::Triple::WASI: + return new WASITargetInfo<WebAssembly32TargetInfo>(Triple, Opts); + case llvm::Triple::UnknownOS: + return new WebAssemblyOSTargetInfo<WebAssembly32TargetInfo>(Triple, Opts); + default: + return nullptr; + } case llvm::Triple::wasm64: if (Triple.getSubArch() != llvm::Triple::NoSubArch || Triple.getVendor() != llvm::Triple::UnknownVendor || !Triple.isOSBinFormatWasm()) return nullptr; - if (Triple.getOS() != llvm::Triple::UnknownOS && - Triple.getOS() != llvm::Triple::WASI) - return nullptr; - return new WebAssemblyOSTargetInfo<WebAssembly64TargetInfo>(Triple, Opts); + switch (Triple.getOS()) { + case llvm::Triple::WASI: + return new WASITargetInfo<WebAssembly64TargetInfo>(Triple, Opts); + case llvm::Triple::UnknownOS: + return new WebAssemblyOSTargetInfo<WebAssembly64TargetInfo>(Triple, Opts); + default: + return nullptr; + } case llvm::Triple::renderscript32: return new LinuxTargetInfo<RenderScript32TargetInfo>(Triple, Opts); diff --git a/lib/Basic/Targets/AArch64.cpp b/lib/Basic/Targets/AArch64.cpp index 62919a02dcb9..6297f23c5aa4 100644 --- a/lib/Basic/Targets/AArch64.cpp +++ b/lib/Basic/Targets/AArch64.cpp @@ -50,6 +50,7 @@ AArch64TargetInfo::AArch64TargetInfo(const llvm::Triple &Triple, // All AArch64 implementations support ARMv8 FP, which makes half a legal type. HasLegalHalfType = true; + HasFloat16 = true; LongWidth = LongAlign = PointerWidth = PointerAlign = 64; MaxVectorAlign = 128; diff --git a/lib/Basic/Targets/ARM.cpp b/lib/Basic/Targets/ARM.cpp index 16644ace108b..23eee34eaa93 100644 --- a/lib/Basic/Targets/ARM.cpp +++ b/lib/Basic/Targets/ARM.cpp @@ -397,6 +397,7 @@ bool ARMTargetInfo::handleTargetFeatures(std::vector<std::string> &Features, SoftFloat = SoftFloatABI = false; HWDiv = 0; DotProd = 0; + HasFloat16 = true; // This does not diagnose illegal cases like having both // "+vfpv2" and "+vfpv3" or having "+neon" and "+fp-only-sp". diff --git a/lib/Basic/Targets/OSTargets.h b/lib/Basic/Targets/OSTargets.h index 085efa02cc5f..09867d82c382 100644 --- a/lib/Basic/Targets/OSTargets.h +++ b/lib/Basic/Targets/OSTargets.h @@ -764,8 +764,9 @@ public: template <typename Target> class LLVM_LIBRARY_VISIBILITY WebAssemblyOSTargetInfo : public OSTargetInfo<Target> { +protected: void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, - MacroBuilder &Builder) const final { + MacroBuilder &Builder) const { // A common platform macro. if (Opts.POSIXThreads) Builder.defineMacro("_REENTRANT"); @@ -783,6 +784,21 @@ public: } }; +// WASI target +template <typename Target> +class LLVM_LIBRARY_VISIBILITY WASITargetInfo + : public WebAssemblyOSTargetInfo<Target> { + void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, + MacroBuilder &Builder) const final { + WebAssemblyOSTargetInfo<Target>::getOSDefines(Opts, Triple, Builder); + Builder.defineMacro("__wasi__"); + } + +public: + explicit WASITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) + : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {} +}; + } // namespace targets } // namespace clang #endif // LLVM_CLANG_LIB_BASIC_TARGETS_OSTARGETS_H diff --git a/lib/Basic/Targets/SPIR.h b/lib/Basic/Targets/SPIR.h index 9815292fc276..e8d92f11a122 100644 --- a/lib/Basic/Targets/SPIR.h +++ b/lib/Basic/Targets/SPIR.h @@ -48,6 +48,7 @@ public: AddrSpaceMap = &SPIRAddrSpaceMap; UseAddrSpaceMapMangling = true; HasLegalHalfType = true; + HasFloat16 = true; // Define available target features // These must be defined in sorted order! NoAsmVariants = true; diff --git a/lib/Driver/ToolChains/Clang.cpp b/lib/Driver/ToolChains/Clang.cpp index 75f16898dfaf..589f53b11921 100644 --- a/lib/Driver/ToolChains/Clang.cpp +++ b/lib/Driver/ToolChains/Clang.cpp @@ -1716,6 +1716,14 @@ void Clang::AddMIPSTargetArgs(const ArgList &Args, } else D.Diag(diag::warn_target_unsupported_compact_branches) << CPUName; } + + if (Arg *A = Args.getLastArg(options::OPT_mrelax_pic_calls, + options::OPT_mno_relax_pic_calls)) { + if (A->getOption().matches(options::OPT_mno_relax_pic_calls)) { + CmdArgs.push_back("-mllvm"); + CmdArgs.push_back("-mips-jalr-reloc=0"); + } + } } void Clang::AddPPCTargetArgs(const ArgList &Args, diff --git a/lib/Driver/ToolChains/NetBSD.cpp b/lib/Driver/ToolChains/NetBSD.cpp index b1321cacaf7a..c1eae5b05ace 100644 --- a/lib/Driver/ToolChains/NetBSD.cpp +++ b/lib/Driver/ToolChains/NetBSD.cpp @@ -256,6 +256,13 @@ void netbsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, bool NeedsXRayDeps = addXRayRuntime(ToolChain, Args, CmdArgs); AddLinkerInputs(getToolChain(), Inputs, Args, CmdArgs, JA); + const SanitizerArgs &SanArgs = ToolChain.getSanitizerArgs(); + if (SanArgs.needsSharedRt()) { + CmdArgs.push_back("-rpath"); + CmdArgs.push_back(Args.MakeArgString( + ToolChain.getCompilerRTPath().c_str())); + } + unsigned Major, Minor, Micro; ToolChain.getTriple().getOSVersion(Major, Minor, Micro); bool useLibgcc = true; diff --git a/lib/Headers/opencl-c.h b/lib/Headers/opencl-c.h index 160bae807174..3d3dfb74905f 100644 --- a/lib/Headers/opencl-c.h +++ b/lib/Headers/opencl-c.h @@ -14470,7 +14470,7 @@ half16 __ovld __cnfn shuffle2(half16 x, half16 y, ushort16 mask); #if __OPENCL_C_VERSION__ >= CL_VERSION_1_2 // OpenCL v1.2 s6.12.13, v2.0 s6.13.13 - printf -int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2))); +int printf(__constant const char* st, ...); #endif // OpenCL v1.1 s6.11.3, v1.2 s6.12.14, v2.0 s6.13.14 - Image Read and Write Functions diff --git a/lib/Lex/LiteralSupport.cpp b/lib/Lex/LiteralSupport.cpp index fa0815eb9c6c..3c1da075b0e2 100644 --- a/lib/Lex/LiteralSupport.cpp +++ b/lib/Lex/LiteralSupport.cpp @@ -617,10 +617,11 @@ NumericLiteralParser::NumericLiteralParser(StringRef TokSpelling, if (isHalf || isFloat || isLong || isFloat128) break; // HF, FF, LF, QF invalid. - if (s + 2 < ThisTokEnd && s[1] == '1' && s[2] == '6') { - s += 2; // success, eat up 2 characters. - isFloat16 = true; - continue; + if (PP.getTargetInfo().hasFloat16Type() && s + 2 < ThisTokEnd && + s[1] == '1' && s[2] == '6') { + s += 2; // success, eat up 2 characters. + isFloat16 = true; + continue; } isFloat = true; diff --git a/lib/Sema/SemaCodeComplete.cpp b/lib/Sema/SemaCodeComplete.cpp index d9f007a46da5..980d7b455ece 100644 --- a/lib/Sema/SemaCodeComplete.cpp +++ b/lib/Sema/SemaCodeComplete.cpp @@ -681,7 +681,8 @@ QualType clang::getDeclUsageType(ASTContext &C, const NamedDecl *ND) { T = Property->getType(); else if (const auto *Value = dyn_cast<ValueDecl>(ND)) T = Value->getType(); - else + + if (T.isNull()) return QualType(); // Dig through references, function pointers, and block pointers to diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 43b289d8d0de..8b3556f715bf 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -1301,6 +1301,10 @@ static DeclAccessPair findDecomposableBaseClass(Sema &S, SourceLocation Loc, static bool checkMemberDecomposition(Sema &S, ArrayRef<BindingDecl*> Bindings, ValueDecl *Src, QualType DecompType, const CXXRecordDecl *OrigRD) { + if (S.RequireCompleteType(Src->getLocation(), DecompType, + diag::err_incomplete_type)) + return true; + CXXCastPath BasePath; DeclAccessPair BasePair = findDecomposableBaseClass(S, Src->getLocation(), OrigRD, BasePath); @@ -5886,9 +5890,6 @@ static bool canPassInRegisters(Sema &S, CXXRecordDecl *D, if (D->isDependentType() || D->isInvalidDecl()) return false; - if (D->hasAttr<TrivialABIAttr>()) - return true; - // Clang <= 4 used the pre-C++11 rule, which ignores move operations. // The PS4 platform ABI follows the behavior of Clang 3.2. if (CCK == TargetInfo::CCK_ClangABI4OrPS4) diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp index d5416d4d057c..2bcd47abe356 100644 --- a/lib/Sema/SemaExpr.cpp +++ b/lib/Sema/SemaExpr.cpp @@ -738,33 +738,20 @@ ExprResult Sema::DefaultArgumentPromotion(Expr *E) { return ExprError(); E = Res.get(); - QualType ScalarTy = Ty; - unsigned NumElts = 0; - if (const ExtVectorType *VecTy = Ty->getAs<ExtVectorType>()) { - NumElts = VecTy->getNumElements(); - ScalarTy = VecTy->getElementType(); - } - // If this is a 'float' or '__fp16' (CVR qualified or typedef) // promote to double. // Note that default argument promotion applies only to float (and // half/fp16); it does not apply to _Float16. - const BuiltinType *BTy = ScalarTy->getAs<BuiltinType>(); + const BuiltinType *BTy = Ty->getAs<BuiltinType>(); if (BTy && (BTy->getKind() == BuiltinType::Half || BTy->getKind() == BuiltinType::Float)) { if (getLangOpts().OpenCL && !getOpenCLOptions().isEnabled("cl_khr_fp64")) { - if (BTy->getKind() == BuiltinType::Half) { - QualType Ty = Context.FloatTy; - if (NumElts != 0) - Ty = Context.getExtVectorType(Ty, NumElts); - E = ImpCastExprToType(E, Ty, CK_FloatingCast).get(); - } + if (BTy->getKind() == BuiltinType::Half) { + E = ImpCastExprToType(E, Context.FloatTy, CK_FloatingCast).get(); + } } else { - QualType Ty = Context.DoubleTy; - if (NumElts != 0) - Ty = Context.getExtVectorType(Ty, NumElts); - E = ImpCastExprToType(E, Ty, CK_FloatingCast).get(); + E = ImpCastExprToType(E, Context.DoubleTy, CK_FloatingCast).get(); } } diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index 3f9dc989103f..f974bedffe00 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -6309,7 +6309,7 @@ ExprResult Sema::CheckTemplateArgument(NonTypeTemplateParmDecl *Param, // -- a predefined __func__ variable if (auto *E = Value.getLValueBase().dyn_cast<const Expr*>()) { if (isa<CXXUuidofExpr>(E)) { - Converted = TemplateArgument(ArgResult.get()); + Converted = TemplateArgument(ArgResult.get()->IgnoreImpCasts()); break; } Diag(Arg->getBeginLoc(), diag::err_template_arg_not_decl_ref) diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index b4c075e9c46d..1ae94c8aec99 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -1442,7 +1442,12 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) { else Result = Context.Int128Ty; break; - case DeclSpec::TST_float16: Result = Context.Float16Ty; break; + case DeclSpec::TST_float16: + if (!S.Context.getTargetInfo().hasFloat16Type()) + S.Diag(DS.getTypeSpecTypeLoc(), diag::err_type_unsupported) + << "_Float16"; + Result = Context.Float16Ty; + break; case DeclSpec::TST_half: Result = Context.HalfTy; break; case DeclSpec::TST_float: Result = Context.FloatTy; break; case DeclSpec::TST_double: diff --git a/lib/Tooling/ArgumentsAdjusters.cpp b/lib/Tooling/ArgumentsAdjusters.cpp index c8e9c167422e..f5040b8a09d5 100644 --- a/lib/Tooling/ArgumentsAdjusters.cpp +++ b/lib/Tooling/ArgumentsAdjusters.cpp @@ -108,5 +108,27 @@ ArgumentsAdjuster combineAdjusters(ArgumentsAdjuster First, }; } +ArgumentsAdjuster getStripPluginsAdjuster() { + return [](const CommandLineArguments &Args, StringRef /*unused*/) { + CommandLineArguments AdjustedArgs; + for (size_t I = 0, E = Args.size(); I != E; I++) { + // According to https://clang.llvm.org/docs/ClangPlugins.html + // plugin arguments are in the form: + // -Xclang {-load, -plugin, -plugin-arg-<plugin-name>, -add-plugin} + // -Xclang <arbitrary-argument> + if (I + 4 < E && Args[I] == "-Xclang" && + (Args[I + 1] == "-load" || Args[I + 1] == "-plugin" || + llvm::StringRef(Args[I + 1]).startswith("-plugin-arg-") || + Args[I + 1] == "-add-plugin") && + Args[I + 2] == "-Xclang") { + I += 3; + continue; + } + AdjustedArgs.push_back(Args[I]); + } + return AdjustedArgs; + }; +} + } // end namespace tooling } // end namespace clang diff --git a/test/AST/float16.cpp b/test/AST/float16.cpp index aa65270c75d4..2f428e7085ff 100644 --- a/test/AST/float16.cpp +++ b/test/AST/float16.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -std=c++11 -ast-dump %s | FileCheck %s --strict-whitespace
-// RUN: %clang_cc1 -std=c++11 -ast-dump -fnative-half-type %s | FileCheck %s --check-prefix=CHECK-NATIVE --strict-whitespace
+// RUN: %clang_cc1 -std=c++11 -ast-dump -triple aarch64-linux-gnu %s | FileCheck %s --strict-whitespace
+// RUN: %clang_cc1 -std=c++11 -ast-dump -triple aarch64-linux-gnu -fnative-half-type %s | FileCheck %s --check-prefix=CHECK-NATIVE --strict-whitespace
/* Various contexts where type _Float16 can appear. */
diff --git a/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp b/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp index 686aac2802ad..e435bee2c88e 100644 --- a/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp +++ b/test/CXX/dcl.dcl/dcl.attr/dcl.align/p8.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -std=c++11 -verify %s +// RUN: %clang_cc1 -std=c++11 -verify %s -triple x86_64-linux-gnu alignas(double) void f(); // expected-error {{'alignas' attribute only applies to variables, data members and tag types}} alignas(double) unsigned char c[sizeof(double)]; // expected-note {{previous}} diff --git a/test/CodeCompletion/crash-null-type.cpp b/test/CodeCompletion/crash-null-type.cpp new file mode 100644 index 000000000000..c5b3d1e79390 --- /dev/null +++ b/test/CodeCompletion/crash-null-type.cpp @@ -0,0 +1,8 @@ +void test() { + for (auto [loopVar] : y) { // y has to be unresolved + loopVa + } +} +// RUN: not %clang_cc1 -fsyntax-only -code-completion-at=%s:3:11 %s -o - \ +// RUN: | FileCheck %s +// CHECK: COMPLETION: loopVar diff --git a/test/CodeGen/arm64-crc32.c b/test/CodeGen/arm64-crc32.c index 2d913fb123b7..26d69a23b6a1 100644 --- a/test/CodeGen/arm64-crc32.c +++ b/test/CodeGen/arm64-crc32.c @@ -1,54 +1,57 @@ // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple arm64-none-linux-gnu \ // RUN: -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple aarch64-windows \ +// RUN: -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +#include <stdint.h> -int crc32b(int a, char b) +uint32_t crc32b(uint32_t a, uint8_t b) { return __builtin_arm_crc32b(a,b); // CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32 // CHECK: call i32 @llvm.aarch64.crc32b(i32 %a, i32 [[T0]]) } -int crc32cb(int a, char b) +uint32_t crc32cb(uint32_t a, uint8_t b) { return __builtin_arm_crc32cb(a,b); // CHECK: [[T0:%[0-9]+]] = zext i8 %b to i32 // CHECK: call i32 @llvm.aarch64.crc32cb(i32 %a, i32 [[T0]]) } -int crc32h(int a, short b) +uint32_t crc32h(uint32_t a, uint16_t b) { return __builtin_arm_crc32h(a,b); // CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32 // CHECK: call i32 @llvm.aarch64.crc32h(i32 %a, i32 [[T0]]) } -int crc32ch(int a, short b) +uint32_t crc32ch(uint32_t a, uint16_t b) { return __builtin_arm_crc32ch(a,b); // CHECK: [[T0:%[0-9]+]] = zext i16 %b to i32 // CHECK: call i32 @llvm.aarch64.crc32ch(i32 %a, i32 [[T0]]) } -int crc32w(int a, int b) +uint32_t crc32w(uint32_t a, uint32_t b) { return __builtin_arm_crc32w(a,b); // CHECK: call i32 @llvm.aarch64.crc32w(i32 %a, i32 %b) } -int crc32cw(int a, int b) +uint32_t crc32cw(uint32_t a, uint32_t b) { return __builtin_arm_crc32cw(a,b); // CHECK: call i32 @llvm.aarch64.crc32cw(i32 %a, i32 %b) } -int crc32d(int a, long b) +uint32_t crc32d(uint32_t a, uint64_t b) { return __builtin_arm_crc32d(a,b); // CHECK: call i32 @llvm.aarch64.crc32x(i32 %a, i64 %b) } -int crc32cd(int a, long b) +uint32_t crc32cd(uint32_t a, uint64_t b) { return __builtin_arm_crc32cd(a,b); // CHECK: call i32 @llvm.aarch64.crc32cx(i32 %a, i64 %b) diff --git a/test/CodeGen/builtins-arm64.c b/test/CodeGen/builtins-arm64.c index 7027a6e220f3..f164c2f6f364 100644 --- a/test/CodeGen/builtins-arm64.c +++ b/test/CodeGen/builtins-arm64.c @@ -1,4 +1,6 @@ -// RUN: %clang_cc1 -triple arm64-unknown-linux -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-unknown-linux -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-LINUX +// RUN: %clang_cc1 -triple aarch64-windows -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-WIN +#include <stdint.h> void f0(void *a, void *b) { __clear_cache(a,b); @@ -15,8 +17,15 @@ unsigned rbit(unsigned a) { return __builtin_arm_rbit(a); } +// CHECK-WIN: [[A64:%[^ ]+]] = zext i32 %a to i64 +// CHECK-WIN: call i64 @llvm.bitreverse.i64(i64 [[A64]]) +// CHECK-LINUX: call i64 @llvm.bitreverse.i64(i64 %a) +unsigned long rbitl(unsigned long a) { + return __builtin_arm_rbit64(a); +} + // CHECK: call {{.*}} @llvm.bitreverse.i64(i64 %a) -unsigned long long rbit64(unsigned long long a) { +uint64_t rbit64(uint64_t a) { return __builtin_arm_rbit64(a); } @@ -49,13 +58,17 @@ void prefetch() { // CHECK: call {{.*}} @llvm.prefetch(i8* null, i32 0, i32 3, i32 0) } -unsigned rsr() { +__typeof__(__builtin_arm_rsr("1:2:3:4:5")) rsr(void); + +uint32_t rsr() { // CHECK: [[V0:[%A-Za-z0-9.]+]] = call i64 @llvm.read_register.i64(metadata ![[M0:[0-9]]]) // CHECK-NEXT: trunc i64 [[V0]] to i32 return __builtin_arm_rsr("1:2:3:4:5"); } -unsigned long rsr64() { +__typeof__(__builtin_arm_rsr64("1:2:3:4:5")) rsr64(void); + +uint64_t rsr64(void) { // CHECK: call i64 @llvm.read_register.i64(metadata ![[M0:[0-9]]]) return __builtin_arm_rsr64("1:2:3:4:5"); } @@ -66,13 +79,17 @@ void *rsrp() { return __builtin_arm_rsrp("1:2:3:4:5"); } +__typeof__(__builtin_arm_wsr("1:2:3:4:5", 0)) wsr(unsigned); + void wsr(unsigned v) { // CHECK: [[V0:[%A-Za-z0-9.]+]] = zext i32 %v to i64 // CHECK-NEXT: call void @llvm.write_register.i64(metadata ![[M0:[0-9]]], i64 [[V0]]) __builtin_arm_wsr("1:2:3:4:5", v); } -void wsr64(unsigned long v) { +__typeof__(__builtin_arm_wsr64("1:2:3:4:5", 0)) wsr64(uint64_t); + +void wsr64(uint64_t v) { // CHECK: call void @llvm.write_register.i64(metadata ![[M0:[0-9]]], i64 %v) __builtin_arm_wsr64("1:2:3:4:5", v); } diff --git a/test/CodeGenCXX/float16-declarations.cpp b/test/CodeGenCXX/float16-declarations.cpp index 7e1c1e8db93c..7d07eac48111 100644 --- a/test/CodeGenCXX/float16-declarations.cpp +++ b/test/CodeGenCXX/float16-declarations.cpp @@ -1,5 +1,4 @@ // RUN: %clang -std=c++11 --target=aarch64-arm--eabi -S -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-AARCH64 -// RUN: %clang -std=c++11 --target=x86_64 -S -emit-llvm %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-X86 /* Various contexts where type _Float16 can appear. */ @@ -15,7 +14,6 @@ namespace { _Float16 arr1n[10]; // CHECK-AARCH64-DAG: @_ZN12_GLOBAL__N_15arr1nE = internal global [10 x half] zeroinitializer, align 2 -// CHECK-X86-DAG: @_ZN12_GLOBAL__N_15arr1nE = internal global [10 x half] zeroinitializer, align 16 _Float16 arr2n[] = { 1.2, 3.0, 3.e4 }; // CHECK-DAG: @_ZN12_GLOBAL__N_15arr2nE = internal global [3 x half] [half 0xH3CCD, half 0xH4200, half 0xH7753], align 2 @@ -30,14 +28,12 @@ namespace { _Float16 f1f; // CHECK-AARCH64-DAG: @f1f = dso_local global half 0xH0000, align 2 -// CHECK-X86-DAG: @f1f = dso_local global half 0xH0000, align 2 _Float16 f2f = 32.4; // CHECK-DAG: @f2f = dso_local global half 0xH500D, align 2 _Float16 arr1f[10]; // CHECK-AARCH64-DAG: @arr1f = dso_local global [10 x half] zeroinitializer, align 2 -// CHECK-X86-DAG: @arr1f = dso_local global [10 x half] zeroinitializer, align 16 _Float16 arr2f[] = { -1.2, -3.0, -3.e4 }; // CHECK-DAG: @arr2f = dso_local global [3 x half] [half 0xHBCCD, half 0xHC200, half 0xHF753], align 2 @@ -137,8 +133,6 @@ int main(void) { long double cvtld = f2n; //CHECK-AARCh64-DAG: [[H2LD:%[a-z0-9]+]] = fpext half {{%[0-9]+}} to fp128 //CHECK-AARCh64-DAG: store fp128 [[H2LD]], fp128* %{{.*}}, align 16 -//CHECK-X86-DAG: [[H2LD:%[a-z0-9]+]] = fpext half {{%[0-9]+}} to x86_fp80 -//CHECK-X86-DAG: store x86_fp80 [[H2LD]], x86_fp80* %{{.*}}, align 16 _Float16 f2h = 42.0f; //CHECK-DAG: store half 0xH5140, half* %{{.*}}, align 2 diff --git a/test/CodeGenCXX/mangle-ms.cpp b/test/CodeGenCXX/mangle-ms.cpp index e128c9443153..0175b961e5e9 100644 --- a/test/CodeGenCXX/mangle-ms.cpp +++ b/test/CodeGenCXX/mangle-ms.cpp @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -triple=i386-pc-win32 -std=c++98 | FileCheck %s // RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -triple=x86_64-pc-win32 -std=c++98| FileCheck -check-prefix X64 %s +// RUN: %clang_cc1 -fblocks -emit-llvm %s -o - -triple=aarch64-pc-win32 -std=c++98 -DARM | FileCheck -check-prefixes=X64,ARM %s int a; // CHECK-DAG: @"?a@@3HA" @@ -466,10 +467,12 @@ namespace Complex { // CHECK-DAG: define dso_local void @"?f@Complex@@YAXU?$_Complex@H@__clang@@@Z"( void f(_Complex int) {} } +#ifdef ARM namespace Float16 { -// CHECK-DAG: define dso_local void @"?f@Float16@@YAXU_Float16@__clang@@@Z"( +// ARM-DAG: define dso_local void @"?f@Float16@@YAXU_Float16@__clang@@@Z"( void f(_Float16) {} } +#endif // ARM namespace PR26029 { template <class> diff --git a/test/CodeGenCXX/trivial_abi.cpp b/test/CodeGenCXX/trivial_abi.cpp index e37c8ff615a2..2cf07b22581a 100644 --- a/test/CodeGenCXX/trivial_abi.cpp +++ b/test/CodeGenCXX/trivial_abi.cpp @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios11 -std=c++17 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s -// RUN: %clang_cc1 -triple arm64-apple-ios11 -std=c++17 -fcxx-exceptions -fexceptions -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios11 -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios11 -std=c++11 -fcxx-exceptions -fexceptions -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s // CHECK: %[[STRUCT_SMALL:.*]] = type { i32* } // CHECK: %[[STRUCT_LARGE:.*]] = type { i32*, [128 x i32] } @@ -43,13 +43,6 @@ struct HasNonTrivial { NonTrivial m; }; -struct __attribute__((trivial_abi)) CopyMoveDeleted { - CopyMoveDeleted(int); - CopyMoveDeleted(const CopyMoveDeleted &) = delete; - CopyMoveDeleted(CopyMoveDeleted &&) = delete; - int a; -}; - // CHECK: define void @_Z14testParamSmall5Small(i64 %[[A_COERCE:.*]]) // CHECK: %[[A:.*]] = alloca %[[STRUCT_SMALL]], align 8 // CHECK: %[[COERCE_DIVE:.*]] = getelementptr inbounds %[[STRUCT_SMALL]], %[[STRUCT_SMALL]]* %[[A]], i32 0, i32 0 @@ -244,11 +237,3 @@ void calleeExceptionLarge(Large, Large); void testExceptionLarge() { calleeExceptionLarge(Large(), Large()); } - -// A class with deleted copy and move constructors can still be passed or -// returned in registers if the class is annotated with trivial_abi. - -// CHECK: define i64 @_Z19testCopyMoveDeletedi(i32 % -CopyMoveDeleted testCopyMoveDeleted(int a) { - return a; -} diff --git a/test/CodeGenOpenCL/printf.cl b/test/CodeGenOpenCL/printf.cl index 346f6c35bae4..fc139d776db6 100644 --- a/test/CodeGenOpenCL/printf.cl +++ b/test/CodeGenOpenCL/printf.cl @@ -12,28 +12,26 @@ int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2))) // ALL-LABEL: @test_printf_float2( -// FP64: %conv = fpext <2 x float> %0 to <2 x double> -// FP64: %call = call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([5 x i8], [5 x i8] addrspace(2)* @.str, i32 0, i32 0), <2 x double> %conv) +// FP64: %call = call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([7 x i8], [7 x i8] addrspace(2)* @.str, i32 0, i32 0), <2 x float> %0) -// NOFP64: call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([5 x i8], [5 x i8] addrspace(2)* @.str, i32 0, i32 0), <2 x float> %0) + +// NOFP64: call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([7 x i8], [7 x i8] addrspace(2)* @.str, i32 0, i32 0), <2 x float> %0) kernel void test_printf_float2(float2 arg) { - printf("%v2f", arg); + printf("%v2hlf", arg); } // ALL-LABEL: @test_printf_half2( -// FP64: %conv = fpext <2 x half> %0 to <2 x double> -// FP64: %call = call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([5 x i8], [5 x i8] addrspace(2)* @.str, i32 0, i32 0), <2 x double> %conv) #2 +// FP64: %call = call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(2)* @.str.1, i32 0, i32 0), <2 x half> %0) -// NOFP64: %conv = fpext <2 x half> %0 to <2 x float> -// NOFP64: %call = call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([5 x i8], [5 x i8] addrspace(2)* @.str, i32 0, i32 0), <2 x float> %conv) #2 +// NOFP64: %call = call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(2)* @.str.1, i32 0, i32 0), <2 x half> %0) kernel void test_printf_half2(half2 arg) { - printf("%v2f", arg); + printf("%v2hf", arg); } #ifdef cl_khr_fp64 // FP64-LABEL: @test_printf_double2( -// FP64: call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([5 x i8], [5 x i8] addrspace(2)* @.str, i32 0, i32 0), <2 x double> %0) #2 +// FP64: call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(2)* @.str.2, i32 0, i32 0), <2 x double> %0) kernel void test_printf_double2(double2 arg) { - printf("%v2f", arg); + printf("%v2lf", arg); } #endif diff --git a/test/Driver/mips-features.c b/test/Driver/mips-features.c index f63fb8de55d6..19725bc096b5 100644 --- a/test/Driver/mips-features.c +++ b/test/Driver/mips-features.c @@ -444,3 +444,15 @@ // RUN: -mginv -mno-ginv 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-NO-GINV %s // CHECK-NO-GINV: "-target-feature" "-ginv" +// +// -mrelax-pic-calls +// RUN: %clang -target mips-unknown-linux-gnu -### -c %s \ +// RUN: -mno-relax-pic-calls -mrelax-pic-calls 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-RELAX-PIC-CALLS %s +// CHECK-RELAX-PIC-CALLS-NOT: "-mllvm" "-mips-jalr-reloc=0" +// +// -mno-relax-pic-calls +// RUN: %clang -target mips-unknown-linux-gnu -### -c %s \ +// RUN: -mrelax-pic-calls -mno-relax-pic-calls 2>&1 \ +// RUN: | FileCheck --check-prefix=CHECK-NO-RELAX-PIC-CALLS %s +// CHECK-NO-RELAX-PIC-CALLS: "-mllvm" "-mips-jalr-reloc=0" diff --git a/test/Lexer/half-literal.cpp b/test/Lexer/half-literal.cpp index 8e0034d491dd..2f1cf9589fab 100644 --- a/test/Lexer/half-literal.cpp +++ b/test/Lexer/half-literal.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -pedantic %s +// RUN: %clang_cc1 -fsyntax-only -verify -pedantic -triple aarch64-linux-gnu %s float a = 1.0h; // expected-error{{no matching literal operator for call to 'operator""h' with argument of type 'long double' or 'const char *', and no matching literal operator template}} float b = 1.0H; // expected-error{{invalid suffix 'H' on floating constant}} diff --git a/test/PCH/leakfiles b/test/PCH/leakfiles new file mode 100644 index 000000000000..90b279026bc1 --- /dev/null +++ b/test/PCH/leakfiles @@ -0,0 +1,29 @@ +// Test that compiling using a PCH doesn't leak file descriptors. +// https://bugs.chromium.org/p/chromium/issues/detail?id=924225 +// +// This test requires bash loops and ulimit. +// REQUIRES: shell +// UNSUPPORTED: win32 +// +// Set up source files. lib/lib.h includes lots of lib*.h files in that dir. +// client.c includes lib/lib.h, and also the individual files directly. +// +// RUN: rm -rf %t +// RUN: mkdir %t +// RUN: cd %t +// RUN: mkdir lib +// RUN: for i in {1..300}; do touch lib/lib$i.h; done +// RUN: for i in {1..300}; do echo "#include \"lib$i.h\"" >> lib/lib.h; done +// RUN: echo "#include \"lib/lib.h\"" > client.c +// RUN: for i in {1..300}; do echo "#include \"lib/lib$i.h\"" >> client.c; done +// +// We want to verify that we don't hold all the files open at the same time. +// This is important e.g. on mac, which has a low default FD limit. +// RUN: ulimit -n 100 +// +// Test without PCH. +// RUN: %clang_cc1 -fsyntax-only -Ilib/ client.c +// +// Test with PCH. +// RUN: %clang_cc1 -emit-pch -o pch -Ilib/ client.c +// RUN: %clang_cc1 -include-pch pch -Ilib/ client.c -fsyntax-only diff --git a/test/Preprocessor/init.c b/test/Preprocessor/init.c index 940dddade337..770e52cc7843 100644 --- a/test/Preprocessor/init.c +++ b/test/Preprocessor/init.c @@ -9110,667 +9110,383 @@ // // RUN: %clang_cc1 -E -dM -ffreestanding -triple=wasm32-unknown-unknown \ // RUN: < /dev/null \ -// RUN: | FileCheck -match-full-lines -check-prefix=WEBASSEMBLY32 %s +// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=wasm64-unknown-unknown \ +// RUN: < /dev/null \ +// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64 %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=wasm32-unknown-wasi \ +// RUN: < /dev/null \ +// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY32,WEBASSEMBLY-WASI %s +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=wasm64-unknown-wasi \ +// RUN: < /dev/null \ +// RUN: | FileCheck -match-full-lines -check-prefixes=WEBASSEMBLY,WEBASSEMBLY64,WEBASSEMBLY-WASI %s // // WEBASSEMBLY32:#define _ILP32 1 // WEBASSEMBLY32-NOT:#define _LP64 -// WEBASSEMBLY32-NEXT:#define __ATOMIC_ACQUIRE 2 -// WEBASSEMBLY32-NEXT:#define __ATOMIC_ACQ_REL 4 -// WEBASSEMBLY32-NEXT:#define __ATOMIC_CONSUME 1 -// WEBASSEMBLY32-NEXT:#define __ATOMIC_RELAXED 0 -// WEBASSEMBLY32-NEXT:#define __ATOMIC_RELEASE 3 -// WEBASSEMBLY32-NEXT:#define __ATOMIC_SEQ_CST 5 -// WEBASSEMBLY32-NEXT:#define __BIGGEST_ALIGNMENT__ 16 -// WEBASSEMBLY32-NEXT:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -// WEBASSEMBLY32-NEXT:#define __CHAR16_TYPE__ unsigned short -// WEBASSEMBLY32-NEXT:#define __CHAR32_TYPE__ unsigned int -// WEBASSEMBLY32-NEXT:#define __CHAR_BIT__ 8 -// WEBASSEMBLY32-NOT:#define __CHAR_UNSIGNED__ -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_BOOL_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_CHAR_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_INT_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_LONG_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_POINTER_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __CONSTANT_CFSTRINGS__ 1 -// WEBASSEMBLY32-NEXT:#define __DBL_DECIMAL_DIG__ 17 -// WEBASSEMBLY32-NEXT:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 -// WEBASSEMBLY32-NEXT:#define __DBL_DIG__ 15 -// WEBASSEMBLY32-NEXT:#define __DBL_EPSILON__ 2.2204460492503131e-16 -// WEBASSEMBLY32-NEXT:#define __DBL_HAS_DENORM__ 1 -// WEBASSEMBLY32-NEXT:#define __DBL_HAS_INFINITY__ 1 -// WEBASSEMBLY32-NEXT:#define __DBL_HAS_QUIET_NAN__ 1 -// WEBASSEMBLY32-NEXT:#define __DBL_MANT_DIG__ 53 -// WEBASSEMBLY32-NEXT:#define __DBL_MAX_10_EXP__ 308 -// WEBASSEMBLY32-NEXT:#define __DBL_MAX_EXP__ 1024 -// WEBASSEMBLY32-NEXT:#define __DBL_MAX__ 1.7976931348623157e+308 -// WEBASSEMBLY32-NEXT:#define __DBL_MIN_10_EXP__ (-307) -// WEBASSEMBLY32-NEXT:#define __DBL_MIN_EXP__ (-1021) -// WEBASSEMBLY32-NEXT:#define __DBL_MIN__ 2.2250738585072014e-308 -// WEBASSEMBLY32-NEXT:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ -// WEBASSEMBLY32-NOT:#define __ELF__ -// WEBASSEMBLY32-NEXT:#define __FINITE_MATH_ONLY__ 0 -// WEBASSEMBLY32:#define __FLT_DECIMAL_DIG__ 9 -// WEBASSEMBLY32-NEXT:#define __FLT_DENORM_MIN__ 1.40129846e-45F -// WEBASSEMBLY32-NEXT:#define __FLT_DIG__ 6 -// WEBASSEMBLY32-NEXT:#define __FLT_EPSILON__ 1.19209290e-7F -// WEBASSEMBLY32-NEXT:#define __FLT_EVAL_METHOD__ 0 -// WEBASSEMBLY32-NEXT:#define __FLT_HAS_DENORM__ 1 -// WEBASSEMBLY32-NEXT:#define __FLT_HAS_INFINITY__ 1 -// WEBASSEMBLY32-NEXT:#define __FLT_HAS_QUIET_NAN__ 1 -// WEBASSEMBLY32-NEXT:#define __FLT_MANT_DIG__ 24 -// WEBASSEMBLY32-NEXT:#define __FLT_MAX_10_EXP__ 38 -// WEBASSEMBLY32-NEXT:#define __FLT_MAX_EXP__ 128 -// WEBASSEMBLY32-NEXT:#define __FLT_MAX__ 3.40282347e+38F -// WEBASSEMBLY32-NEXT:#define __FLT_MIN_10_EXP__ (-37) -// WEBASSEMBLY32-NEXT:#define __FLT_MIN_EXP__ (-125) -// WEBASSEMBLY32-NEXT:#define __FLT_MIN__ 1.17549435e-38F -// WEBASSEMBLY32-NEXT:#define __FLT_RADIX__ 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_INT_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -// WEBASSEMBLY32-NEXT:#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -// WEBASSEMBLY32-NEXT:#define __GNUC_MINOR__ {{.*}} -// WEBASSEMBLY32-NEXT:#define __GNUC_PATCHLEVEL__ {{.*}} -// WEBASSEMBLY32-NEXT:#define __GNUC_STDC_INLINE__ 1 -// WEBASSEMBLY32-NEXT:#define __GNUC__ {{.*}} -// WEBASSEMBLY32-NEXT:#define __GXX_ABI_VERSION 1002 +// WEBASSEMBLY64-NOT:#define _ILP32 +// WEBASSEMBLY64:#define _LP64 1 +// WEBASSEMBLY-NEXT:#define __ATOMIC_ACQUIRE 2 +// WEBASSEMBLY-NEXT:#define __ATOMIC_ACQ_REL 4 +// WEBASSEMBLY-NEXT:#define __ATOMIC_CONSUME 1 +// WEBASSEMBLY-NEXT:#define __ATOMIC_RELAXED 0 +// WEBASSEMBLY-NEXT:#define __ATOMIC_RELEASE 3 +// WEBASSEMBLY-NEXT:#define __ATOMIC_SEQ_CST 5 +// WEBASSEMBLY-NEXT:#define __BIGGEST_ALIGNMENT__ 16 +// WEBASSEMBLY-NEXT:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +// WEBASSEMBLY-NEXT:#define __CHAR16_TYPE__ unsigned short +// WEBASSEMBLY-NEXT:#define __CHAR32_TYPE__ unsigned int +// WEBASSEMBLY-NEXT:#define __CHAR_BIT__ 8 +// WEBASSEMBLY-NOT:#define __CHAR_UNSIGNED__ +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_BOOL_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_CHAR_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_INT_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_LONG_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_POINTER_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __CONSTANT_CFSTRINGS__ 1 +// WEBASSEMBLY-NEXT:#define __DBL_DECIMAL_DIG__ 17 +// WEBASSEMBLY-NEXT:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 +// WEBASSEMBLY-NEXT:#define __DBL_DIG__ 15 +// WEBASSEMBLY-NEXT:#define __DBL_EPSILON__ 2.2204460492503131e-16 +// WEBASSEMBLY-NEXT:#define __DBL_HAS_DENORM__ 1 +// WEBASSEMBLY-NEXT:#define __DBL_HAS_INFINITY__ 1 +// WEBASSEMBLY-NEXT:#define __DBL_HAS_QUIET_NAN__ 1 +// WEBASSEMBLY-NEXT:#define __DBL_MANT_DIG__ 53 +// WEBASSEMBLY-NEXT:#define __DBL_MAX_10_EXP__ 308 +// WEBASSEMBLY-NEXT:#define __DBL_MAX_EXP__ 1024 +// WEBASSEMBLY-NEXT:#define __DBL_MAX__ 1.7976931348623157e+308 +// WEBASSEMBLY-NEXT:#define __DBL_MIN_10_EXP__ (-307) +// WEBASSEMBLY-NEXT:#define __DBL_MIN_EXP__ (-1021) +// WEBASSEMBLY-NEXT:#define __DBL_MIN__ 2.2250738585072014e-308 +// WEBASSEMBLY-NEXT:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ +// WEBASSEMBLY-NOT:#define __ELF__ +// WEBASSEMBLY-NEXT:#define __FINITE_MATH_ONLY__ 0 +// WEBASSEMBLY-NEXT:#define __FLT16_DECIMAL_DIG__ 5 +// WEBASSEMBLY-NEXT:#define __FLT16_DENORM_MIN__ 5.9604644775390625e-8F16 +// WEBASSEMBLY-NEXT:#define __FLT16_DIG__ 3 +// WEBASSEMBLY-NEXT:#define __FLT16_EPSILON__ 9.765625e-4F16 +// WEBASSEMBLY-NEXT:#define __FLT16_HAS_DENORM__ 1 +// WEBASSEMBLY-NEXT:#define __FLT16_HAS_INFINITY__ 1 +// WEBASSEMBLY-NEXT:#define __FLT16_HAS_QUIET_NAN__ 1 +// WEBASSEMBLY-NEXT:#define __FLT16_MANT_DIG__ 11 +// WEBASSEMBLY-NEXT:#define __FLT16_MAX_10_EXP__ 4 +// WEBASSEMBLY-NEXT:#define __FLT16_MAX_EXP__ 15 +// WEBASSEMBLY-NEXT:#define __FLT16_MAX__ 6.5504e+4F16 +// WEBASSEMBLY-NEXT:#define __FLT16_MIN_10_EXP__ (-13) +// WEBASSEMBLY-NEXT:#define __FLT16_MIN_EXP__ (-14) +// WEBASSEMBLY-NEXT:#define __FLT16_MIN__ 6.103515625e-5F16 +// WEBASSEMBLY-NEXT:#define __FLT_DECIMAL_DIG__ 9 +// WEBASSEMBLY-NEXT:#define __FLT_DENORM_MIN__ 1.40129846e-45F +// WEBASSEMBLY-NEXT:#define __FLT_DIG__ 6 +// WEBASSEMBLY-NEXT:#define __FLT_EPSILON__ 1.19209290e-7F +// WEBASSEMBLY-NEXT:#define __FLT_EVAL_METHOD__ 0 +// WEBASSEMBLY-NEXT:#define __FLT_HAS_DENORM__ 1 +// WEBASSEMBLY-NEXT:#define __FLT_HAS_INFINITY__ 1 +// WEBASSEMBLY-NEXT:#define __FLT_HAS_QUIET_NAN__ 1 +// WEBASSEMBLY-NEXT:#define __FLT_MANT_DIG__ 24 +// WEBASSEMBLY-NEXT:#define __FLT_MAX_10_EXP__ 38 +// WEBASSEMBLY-NEXT:#define __FLT_MAX_EXP__ 128 +// WEBASSEMBLY-NEXT:#define __FLT_MAX__ 3.40282347e+38F +// WEBASSEMBLY-NEXT:#define __FLT_MIN_10_EXP__ (-37) +// WEBASSEMBLY-NEXT:#define __FLT_MIN_EXP__ (-125) +// WEBASSEMBLY-NEXT:#define __FLT_MIN__ 1.17549435e-38F +// WEBASSEMBLY-NEXT:#define __FLT_RADIX__ 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_INT_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_LONG_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +// WEBASSEMBLY-NEXT:#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +// WEBASSEMBLY-NEXT:#define __GNUC_MINOR__ {{.*}} +// WEBASSEMBLY-NEXT:#define __GNUC_PATCHLEVEL__ {{.*}} +// WEBASSEMBLY-NEXT:#define __GNUC_STDC_INLINE__ 1 +// WEBASSEMBLY-NEXT:#define __GNUC__ {{.*}} +// WEBASSEMBLY-NEXT:#define __GXX_ABI_VERSION 1002 // WEBASSEMBLY32-NEXT:#define __ILP32__ 1 -// WEBASSEMBLY32-NEXT:#define __INT16_C_SUFFIX__ -// WEBASSEMBLY32-NEXT:#define __INT16_FMTd__ "hd" -// WEBASSEMBLY32-NEXT:#define __INT16_FMTi__ "hi" -// WEBASSEMBLY32-NEXT:#define __INT16_MAX__ 32767 -// WEBASSEMBLY32-NEXT:#define __INT16_TYPE__ short -// WEBASSEMBLY32-NEXT:#define __INT32_C_SUFFIX__ -// WEBASSEMBLY32-NEXT:#define __INT32_FMTd__ "d" -// WEBASSEMBLY32-NEXT:#define __INT32_FMTi__ "i" -// WEBASSEMBLY32-NEXT:#define __INT32_MAX__ 2147483647 -// WEBASSEMBLY32-NEXT:#define __INT32_TYPE__ int -// WEBASSEMBLY32-NEXT:#define __INT64_C_SUFFIX__ LL -// WEBASSEMBLY32-NEXT:#define __INT64_FMTd__ "lld" -// WEBASSEMBLY32-NEXT:#define __INT64_FMTi__ "lli" -// WEBASSEMBLY32-NEXT:#define __INT64_MAX__ 9223372036854775807LL -// WEBASSEMBLY32-NEXT:#define __INT64_TYPE__ long long int -// WEBASSEMBLY32-NEXT:#define __INT8_C_SUFFIX__ -// WEBASSEMBLY32-NEXT:#define __INT8_FMTd__ "hhd" -// WEBASSEMBLY32-NEXT:#define __INT8_FMTi__ "hhi" -// WEBASSEMBLY32-NEXT:#define __INT8_MAX__ 127 -// WEBASSEMBLY32-NEXT:#define __INT8_TYPE__ signed char -// WEBASSEMBLY32-NEXT:#define __INTMAX_C_SUFFIX__ LL -// WEBASSEMBLY32-NEXT:#define __INTMAX_FMTd__ "lld" -// WEBASSEMBLY32-NEXT:#define __INTMAX_FMTi__ "lli" -// WEBASSEMBLY32-NEXT:#define __INTMAX_MAX__ 9223372036854775807LL -// WEBASSEMBLY32-NEXT:#define __INTMAX_TYPE__ long long int -// WEBASSEMBLY32-NEXT:#define __INTMAX_WIDTH__ 64 -// WEBASSEMBLY32-NEXT:#define __INTPTR_FMTd__ "ld" -// WEBASSEMBLY32-NEXT:#define __INTPTR_FMTi__ "li" +// WEBASSEMBLY64-NOT:#define __ILP32__ +// WEBASSEMBLY-NEXT:#define __INT16_C_SUFFIX__ +// WEBASSEMBLY-NEXT:#define __INT16_FMTd__ "hd" +// WEBASSEMBLY-NEXT:#define __INT16_FMTi__ "hi" +// WEBASSEMBLY-NEXT:#define __INT16_MAX__ 32767 +// WEBASSEMBLY-NEXT:#define __INT16_TYPE__ short +// WEBASSEMBLY-NEXT:#define __INT32_C_SUFFIX__ +// WEBASSEMBLY-NEXT:#define __INT32_FMTd__ "d" +// WEBASSEMBLY-NEXT:#define __INT32_FMTi__ "i" +// WEBASSEMBLY-NEXT:#define __INT32_MAX__ 2147483647 +// WEBASSEMBLY-NEXT:#define __INT32_TYPE__ int +// WEBASSEMBLY-NEXT:#define __INT64_C_SUFFIX__ LL +// WEBASSEMBLY-NEXT:#define __INT64_FMTd__ "lld" +// WEBASSEMBLY-NEXT:#define __INT64_FMTi__ "lli" +// WEBASSEMBLY-NEXT:#define __INT64_MAX__ 9223372036854775807LL +// WEBASSEMBLY-NEXT:#define __INT64_TYPE__ long long int +// WEBASSEMBLY-NEXT:#define __INT8_C_SUFFIX__ +// WEBASSEMBLY-NEXT:#define __INT8_FMTd__ "hhd" +// WEBASSEMBLY-NEXT:#define __INT8_FMTi__ "hhi" +// WEBASSEMBLY-NEXT:#define __INT8_MAX__ 127 +// WEBASSEMBLY-NEXT:#define __INT8_TYPE__ signed char +// WEBASSEMBLY-NEXT:#define __INTMAX_C_SUFFIX__ LL +// WEBASSEMBLY-NEXT:#define __INTMAX_FMTd__ "lld" +// WEBASSEMBLY-NEXT:#define __INTMAX_FMTi__ "lli" +// WEBASSEMBLY-NEXT:#define __INTMAX_MAX__ 9223372036854775807LL +// WEBASSEMBLY-NEXT:#define __INTMAX_TYPE__ long long int +// WEBASSEMBLY-NEXT:#define __INTMAX_WIDTH__ 64 +// WEBASSEMBLY-NEXT:#define __INTPTR_FMTd__ "ld" +// WEBASSEMBLY-NEXT:#define __INTPTR_FMTi__ "li" // WEBASSEMBLY32-NEXT:#define __INTPTR_MAX__ 2147483647L -// WEBASSEMBLY32-NEXT:#define __INTPTR_TYPE__ long int +// WEBASSEMBLY64-NEXT:#define __INTPTR_MAX__ 9223372036854775807L +// WEBASSEMBLY-NEXT:#define __INTPTR_TYPE__ long int // WEBASSEMBLY32-NEXT:#define __INTPTR_WIDTH__ 32 -// WEBASSEMBLY32-NEXT:#define __INT_FAST16_FMTd__ "hd" -// WEBASSEMBLY32-NEXT:#define __INT_FAST16_FMTi__ "hi" -// WEBASSEMBLY32-NEXT:#define __INT_FAST16_MAX__ 32767 -// WEBASSEMBLY32-NEXT:#define __INT_FAST16_TYPE__ short -// WEBASSEMBLY32-NEXT:#define __INT_FAST32_FMTd__ "d" -// WEBASSEMBLY32-NEXT:#define __INT_FAST32_FMTi__ "i" -// WEBASSEMBLY32-NEXT:#define __INT_FAST32_MAX__ 2147483647 -// WEBASSEMBLY32-NEXT:#define __INT_FAST32_TYPE__ int -// WEBASSEMBLY32-NEXT:#define __INT_FAST64_FMTd__ "lld" -// WEBASSEMBLY32-NEXT:#define __INT_FAST64_FMTi__ "lli" -// WEBASSEMBLY32-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807LL -// WEBASSEMBLY32-NEXT:#define __INT_FAST64_TYPE__ long long int -// WEBASSEMBLY32-NEXT:#define __INT_FAST8_FMTd__ "hhd" -// WEBASSEMBLY32-NEXT:#define __INT_FAST8_FMTi__ "hhi" -// WEBASSEMBLY32-NEXT:#define __INT_FAST8_MAX__ 127 -// WEBASSEMBLY32-NEXT:#define __INT_FAST8_TYPE__ signed char -// WEBASSEMBLY32-NEXT:#define __INT_LEAST16_FMTd__ "hd" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST16_FMTi__ "hi" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST16_MAX__ 32767 -// WEBASSEMBLY32-NEXT:#define __INT_LEAST16_TYPE__ short -// WEBASSEMBLY32-NEXT:#define __INT_LEAST32_FMTd__ "d" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST32_FMTi__ "i" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST32_MAX__ 2147483647 -// WEBASSEMBLY32-NEXT:#define __INT_LEAST32_TYPE__ int -// WEBASSEMBLY32-NEXT:#define __INT_LEAST64_FMTd__ "lld" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST64_FMTi__ "lli" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807LL -// WEBASSEMBLY32-NEXT:#define __INT_LEAST64_TYPE__ long long int -// WEBASSEMBLY32-NEXT:#define __INT_LEAST8_FMTd__ "hhd" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST8_FMTi__ "hhi" -// WEBASSEMBLY32-NEXT:#define __INT_LEAST8_MAX__ 127 -// WEBASSEMBLY32-NEXT:#define __INT_LEAST8_TYPE__ signed char -// WEBASSEMBLY32-NEXT:#define __INT_MAX__ 2147483647 -// WEBASSEMBLY32-NEXT:#define __LDBL_DECIMAL_DIG__ 36 -// WEBASSEMBLY32-NEXT:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L -// WEBASSEMBLY32-NEXT:#define __LDBL_DIG__ 33 -// WEBASSEMBLY32-NEXT:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L -// WEBASSEMBLY32-NEXT:#define __LDBL_HAS_DENORM__ 1 -// WEBASSEMBLY32-NEXT:#define __LDBL_HAS_INFINITY__ 1 -// WEBASSEMBLY32-NEXT:#define __LDBL_HAS_QUIET_NAN__ 1 -// WEBASSEMBLY32-NEXT:#define __LDBL_MANT_DIG__ 113 -// WEBASSEMBLY32-NEXT:#define __LDBL_MAX_10_EXP__ 4932 -// WEBASSEMBLY32-NEXT:#define __LDBL_MAX_EXP__ 16384 -// WEBASSEMBLY32-NEXT:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L -// WEBASSEMBLY32-NEXT:#define __LDBL_MIN_10_EXP__ (-4931) -// WEBASSEMBLY32-NEXT:#define __LDBL_MIN_EXP__ (-16381) -// WEBASSEMBLY32-NEXT:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L -// WEBASSEMBLY32-NEXT:#define __LITTLE_ENDIAN__ 1 -// WEBASSEMBLY32-NEXT:#define __LONG_LONG_MAX__ 9223372036854775807LL +// WEBASSEMBLY64-NEXT:#define __INTPTR_WIDTH__ 64 +// WEBASSEMBLY-NEXT:#define __INT_FAST16_FMTd__ "hd" +// WEBASSEMBLY-NEXT:#define __INT_FAST16_FMTi__ "hi" +// WEBASSEMBLY-NEXT:#define __INT_FAST16_MAX__ 32767 +// WEBASSEMBLY-NEXT:#define __INT_FAST16_TYPE__ short +// WEBASSEMBLY-NEXT:#define __INT_FAST32_FMTd__ "d" +// WEBASSEMBLY-NEXT:#define __INT_FAST32_FMTi__ "i" +// WEBASSEMBLY-NEXT:#define __INT_FAST32_MAX__ 2147483647 +// WEBASSEMBLY-NEXT:#define __INT_FAST32_TYPE__ int +// WEBASSEMBLY-NEXT:#define __INT_FAST64_FMTd__ "lld" +// WEBASSEMBLY-NEXT:#define __INT_FAST64_FMTi__ "lli" +// WEBASSEMBLY-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807LL +// WEBASSEMBLY-NEXT:#define __INT_FAST64_TYPE__ long long int +// WEBASSEMBLY-NEXT:#define __INT_FAST8_FMTd__ "hhd" +// WEBASSEMBLY-NEXT:#define __INT_FAST8_FMTi__ "hhi" +// WEBASSEMBLY-NEXT:#define __INT_FAST8_MAX__ 127 +// WEBASSEMBLY-NEXT:#define __INT_FAST8_TYPE__ signed char +// WEBASSEMBLY-NEXT:#define __INT_LEAST16_FMTd__ "hd" +// WEBASSEMBLY-NEXT:#define __INT_LEAST16_FMTi__ "hi" +// WEBASSEMBLY-NEXT:#define __INT_LEAST16_MAX__ 32767 +// WEBASSEMBLY-NEXT:#define __INT_LEAST16_TYPE__ short +// WEBASSEMBLY-NEXT:#define __INT_LEAST32_FMTd__ "d" +// WEBASSEMBLY-NEXT:#define __INT_LEAST32_FMTi__ "i" +// WEBASSEMBLY-NEXT:#define __INT_LEAST32_MAX__ 2147483647 +// WEBASSEMBLY-NEXT:#define __INT_LEAST32_TYPE__ int +// WEBASSEMBLY-NEXT:#define __INT_LEAST64_FMTd__ "lld" +// WEBASSEMBLY-NEXT:#define __INT_LEAST64_FMTi__ "lli" +// WEBASSEMBLY-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807LL +// WEBASSEMBLY-NEXT:#define __INT_LEAST64_TYPE__ long long int +// WEBASSEMBLY-NEXT:#define __INT_LEAST8_FMTd__ "hhd" +// WEBASSEMBLY-NEXT:#define __INT_LEAST8_FMTi__ "hhi" +// WEBASSEMBLY-NEXT:#define __INT_LEAST8_MAX__ 127 +// WEBASSEMBLY-NEXT:#define __INT_LEAST8_TYPE__ signed char +// WEBASSEMBLY-NEXT:#define __INT_MAX__ 2147483647 +// WEBASSEMBLY-NEXT:#define __LDBL_DECIMAL_DIG__ 36 +// WEBASSEMBLY-NEXT:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L +// WEBASSEMBLY-NEXT:#define __LDBL_DIG__ 33 +// WEBASSEMBLY-NEXT:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L +// WEBASSEMBLY-NEXT:#define __LDBL_HAS_DENORM__ 1 +// WEBASSEMBLY-NEXT:#define __LDBL_HAS_INFINITY__ 1 +// WEBASSEMBLY-NEXT:#define __LDBL_HAS_QUIET_NAN__ 1 +// WEBASSEMBLY-NEXT:#define __LDBL_MANT_DIG__ 113 +// WEBASSEMBLY-NEXT:#define __LDBL_MAX_10_EXP__ 4932 +// WEBASSEMBLY-NEXT:#define __LDBL_MAX_EXP__ 16384 +// WEBASSEMBLY-NEXT:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L +// WEBASSEMBLY-NEXT:#define __LDBL_MIN_10_EXP__ (-4931) +// WEBASSEMBLY-NEXT:#define __LDBL_MIN_EXP__ (-16381) +// WEBASSEMBLY-NEXT:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L +// WEBASSEMBLY-NEXT:#define __LITTLE_ENDIAN__ 1 +// WEBASSEMBLY-NEXT:#define __LONG_LONG_MAX__ 9223372036854775807LL // WEBASSEMBLY32-NEXT:#define __LONG_MAX__ 2147483647L // WEBASSEMBLY32-NOT:#define __LP64__ -// WEBASSEMBLY32-NEXT:#define __NO_INLINE__ 1 -// WEBASSEMBLY32-NEXT:#define __OBJC_BOOL_IS_BOOL 0 -// WEBASSEMBLY32-NEXT:#define __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES 3 -// WEBASSEMBLY32-NEXT:#define __OPENCL_MEMORY_SCOPE_DEVICE 2 -// WEBASSEMBLY32-NEXT:#define __OPENCL_MEMORY_SCOPE_SUB_GROUP 4 -// WEBASSEMBLY32-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_GROUP 1 -// WEBASSEMBLY32-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_ITEM 0 -// WEBASSEMBLY32-NEXT:#define __ORDER_BIG_ENDIAN__ 4321 -// WEBASSEMBLY32-NEXT:#define __ORDER_LITTLE_ENDIAN__ 1234 -// WEBASSEMBLY32-NEXT:#define __ORDER_PDP_ENDIAN__ 3412 +// WEBASSEMBLY64-NEXT:#define __LONG_MAX__ 9223372036854775807L +// WEBASSEMBLY64-NEXT:#define __LP64__ 1 +// WEBASSEMBLY-NEXT:#define __NO_INLINE__ 1 +// WEBASSEMBLY-NEXT:#define __OBJC_BOOL_IS_BOOL 0 +// WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES 3 +// WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_DEVICE 2 +// WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_SUB_GROUP 4 +// WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_GROUP 1 +// WEBASSEMBLY-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_ITEM 0 +// WEBASSEMBLY-NEXT:#define __ORDER_BIG_ENDIAN__ 4321 +// WEBASSEMBLY-NEXT:#define __ORDER_LITTLE_ENDIAN__ 1234 +// WEBASSEMBLY-NEXT:#define __ORDER_PDP_ENDIAN__ 3412 // WEBASSEMBLY32-NEXT:#define __POINTER_WIDTH__ 32 -// WEBASSEMBLY32-NEXT:#define __PRAGMA_REDEFINE_EXTNAME 1 -// WEBASSEMBLY32-NEXT:#define __PTRDIFF_FMTd__ "ld" -// WEBASSEMBLY32-NEXT:#define __PTRDIFF_FMTi__ "li" +// WEBASSEMBLY64-NEXT:#define __POINTER_WIDTH__ 64 +// WEBASSEMBLY-NEXT:#define __PRAGMA_REDEFINE_EXTNAME 1 +// WEBASSEMBLY-NEXT:#define __PTRDIFF_FMTd__ "ld" +// WEBASSEMBLY-NEXT:#define __PTRDIFF_FMTi__ "li" // WEBASSEMBLY32-NEXT:#define __PTRDIFF_MAX__ 2147483647L -// WEBASSEMBLY32-NEXT:#define __PTRDIFF_TYPE__ long int +// WEBASSEMBLY64-NEXT:#define __PTRDIFF_MAX__ 9223372036854775807L +// WEBASSEMBLY-NEXT:#define __PTRDIFF_TYPE__ long int // WEBASSEMBLY32-NEXT:#define __PTRDIFF_WIDTH__ 32 -// WEBASSEMBLY32-NOT:#define __REGISTER_PREFIX__ -// WEBASSEMBLY32-NEXT:#define __SCHAR_MAX__ 127 -// WEBASSEMBLY32-NEXT:#define __SHRT_MAX__ 32767 +// WEBASSEMBLY64-NEXT:#define __PTRDIFF_WIDTH__ 64 +// WEBASSEMBLY-NOT:#define __REGISTER_PREFIX__ +// WEBASSEMBLY-NEXT:#define __SCHAR_MAX__ 127 +// WEBASSEMBLY-NEXT:#define __SHRT_MAX__ 32767 // WEBASSEMBLY32-NEXT:#define __SIG_ATOMIC_MAX__ 2147483647L // WEBASSEMBLY32-NEXT:#define __SIG_ATOMIC_WIDTH__ 32 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_DOUBLE__ 8 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_FLOAT__ 4 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_INT128__ 16 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_INT__ 4 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_LONG_DOUBLE__ 16 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_LONG_LONG__ 8 +// WEBASSEMBLY64-NEXT:#define __SIG_ATOMIC_MAX__ 9223372036854775807L +// WEBASSEMBLY64-NEXT:#define __SIG_ATOMIC_WIDTH__ 64 +// WEBASSEMBLY-NEXT:#define __SIZEOF_DOUBLE__ 8 +// WEBASSEMBLY-NEXT:#define __SIZEOF_FLOAT__ 4 +// WEBASSEMBLY-NEXT:#define __SIZEOF_INT128__ 16 +// WEBASSEMBLY-NEXT:#define __SIZEOF_INT__ 4 +// WEBASSEMBLY-NEXT:#define __SIZEOF_LONG_DOUBLE__ 16 +// WEBASSEMBLY-NEXT:#define __SIZEOF_LONG_LONG__ 8 // WEBASSEMBLY32-NEXT:#define __SIZEOF_LONG__ 4 // WEBASSEMBLY32-NEXT:#define __SIZEOF_POINTER__ 4 // WEBASSEMBLY32-NEXT:#define __SIZEOF_PTRDIFF_T__ 4 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_SHORT__ 2 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_SIZE_T__ 4 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_WCHAR_T__ 4 -// WEBASSEMBLY32-NEXT:#define __SIZEOF_WINT_T__ 4 -// WEBASSEMBLY32-NEXT:#define __SIZE_FMTX__ "lX" -// WEBASSEMBLY32-NEXT:#define __SIZE_FMTo__ "lo" -// WEBASSEMBLY32-NEXT:#define __SIZE_FMTu__ "lu" -// WEBASSEMBLY32-NEXT:#define __SIZE_FMTx__ "lx" -// WEBASSEMBLY32-NEXT:#define __SIZE_MAX__ 4294967295UL -// WEBASSEMBLY32-NEXT:#define __SIZE_TYPE__ long unsigned int -// WEBASSEMBLY32-NEXT:#define __SIZE_WIDTH__ 32 -// WEBASSEMBLY32-NEXT:#define __STDC_HOSTED__ 0 -// WEBASSEMBLY32-NOT:#define __STDC_MB_MIGHT_NEQ_WC__ -// WEBASSEMBLY32-NOT:#define __STDC_NO_ATOMICS__ -// WEBASSEMBLY32-NOT:#define __STDC_NO_COMPLEX__ -// WEBASSEMBLY32-NOT:#define __STDC_NO_VLA__ -// WEBASSEMBLY32-NOT:#define __STDC_NO_THREADS__ -// WEBASSEMBLY32-NEXT:#define __STDC_UTF_16__ 1 -// WEBASSEMBLY32-NEXT:#define __STDC_UTF_32__ 1 -// WEBASSEMBLY32-NEXT:#define __STDC_VERSION__ 201112L -// WEBASSEMBLY32-NEXT:#define __STDC__ 1 -// WEBASSEMBLY32-NEXT:#define __UINT16_C_SUFFIX__ -// WEBASSEMBLY32-NEXT:#define __UINT16_FMTX__ "hX" -// WEBASSEMBLY32-NEXT:#define __UINT16_FMTo__ "ho" -// WEBASSEMBLY32-NEXT:#define __UINT16_FMTu__ "hu" -// WEBASSEMBLY32-NEXT:#define __UINT16_FMTx__ "hx" -// WEBASSEMBLY32-NEXT:#define __UINT16_MAX__ 65535 -// WEBASSEMBLY32-NEXT:#define __UINT16_TYPE__ unsigned short -// WEBASSEMBLY32-NEXT:#define __UINT32_C_SUFFIX__ U -// WEBASSEMBLY32-NEXT:#define __UINT32_FMTX__ "X" -// WEBASSEMBLY32-NEXT:#define __UINT32_FMTo__ "o" -// WEBASSEMBLY32-NEXT:#define __UINT32_FMTu__ "u" -// WEBASSEMBLY32-NEXT:#define __UINT32_FMTx__ "x" -// WEBASSEMBLY32-NEXT:#define __UINT32_MAX__ 4294967295U -// WEBASSEMBLY32-NEXT:#define __UINT32_TYPE__ unsigned int -// WEBASSEMBLY32-NEXT:#define __UINT64_C_SUFFIX__ ULL -// WEBASSEMBLY32-NEXT:#define __UINT64_FMTX__ "llX" -// WEBASSEMBLY32-NEXT:#define __UINT64_FMTo__ "llo" -// WEBASSEMBLY32-NEXT:#define __UINT64_FMTu__ "llu" -// WEBASSEMBLY32-NEXT:#define __UINT64_FMTx__ "llx" -// WEBASSEMBLY32-NEXT:#define __UINT64_MAX__ 18446744073709551615ULL -// WEBASSEMBLY32-NEXT:#define __UINT64_TYPE__ long long unsigned int -// WEBASSEMBLY32-NEXT:#define __UINT8_C_SUFFIX__ -// WEBASSEMBLY32-NEXT:#define __UINT8_FMTX__ "hhX" -// WEBASSEMBLY32-NEXT:#define __UINT8_FMTo__ "hho" -// WEBASSEMBLY32-NEXT:#define __UINT8_FMTu__ "hhu" -// WEBASSEMBLY32-NEXT:#define __UINT8_FMTx__ "hhx" -// WEBASSEMBLY32-NEXT:#define __UINT8_MAX__ 255 -// WEBASSEMBLY32-NEXT:#define __UINT8_TYPE__ unsigned char -// WEBASSEMBLY32-NEXT:#define __UINTMAX_C_SUFFIX__ ULL -// WEBASSEMBLY32-NEXT:#define __UINTMAX_FMTX__ "llX" -// WEBASSEMBLY32-NEXT:#define __UINTMAX_FMTo__ "llo" -// WEBASSEMBLY32-NEXT:#define __UINTMAX_FMTu__ "llu" -// WEBASSEMBLY32-NEXT:#define __UINTMAX_FMTx__ "llx" -// WEBASSEMBLY32-NEXT:#define __UINTMAX_MAX__ 18446744073709551615ULL -// WEBASSEMBLY32-NEXT:#define __UINTMAX_TYPE__ long long unsigned int -// WEBASSEMBLY32-NEXT:#define __UINTMAX_WIDTH__ 64 -// WEBASSEMBLY32-NEXT:#define __UINTPTR_FMTX__ "lX" -// WEBASSEMBLY32-NEXT:#define __UINTPTR_FMTo__ "lo" -// WEBASSEMBLY32-NEXT:#define __UINTPTR_FMTu__ "lu" -// WEBASSEMBLY32-NEXT:#define __UINTPTR_FMTx__ "lx" -// WEBASSEMBLY32-NEXT:#define __UINTPTR_MAX__ 4294967295UL -// WEBASSEMBLY32-NEXT:#define __UINTPTR_TYPE__ long unsigned int -// WEBASSEMBLY32-NEXT:#define __UINTPTR_WIDTH__ 32 -// WEBASSEMBLY32-NEXT:#define __UINT_FAST16_FMTX__ "hX" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST16_FMTo__ "ho" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST16_FMTu__ "hu" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST16_FMTx__ "hx" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST16_MAX__ 65535 -// WEBASSEMBLY32-NEXT:#define __UINT_FAST16_TYPE__ unsigned short -// WEBASSEMBLY32-NEXT:#define __UINT_FAST32_FMTX__ "X" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST32_FMTo__ "o" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST32_FMTu__ "u" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST32_FMTx__ "x" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST32_MAX__ 4294967295U -// WEBASSEMBLY32-NEXT:#define __UINT_FAST32_TYPE__ unsigned int -// WEBASSEMBLY32-NEXT:#define __UINT_FAST64_FMTX__ "llX" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST64_FMTo__ "llo" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST64_FMTu__ "llu" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST64_FMTx__ "llx" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL -// WEBASSEMBLY32-NEXT:#define __UINT_FAST64_TYPE__ long long unsigned int -// WEBASSEMBLY32-NEXT:#define __UINT_FAST8_FMTX__ "hhX" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST8_FMTo__ "hho" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST8_FMTu__ "hhu" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST8_FMTx__ "hhx" -// WEBASSEMBLY32-NEXT:#define __UINT_FAST8_MAX__ 255 -// WEBASSEMBLY32-NEXT:#define __UINT_FAST8_TYPE__ unsigned char -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST16_FMTX__ "hX" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST16_FMTo__ "ho" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST16_FMTu__ "hu" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST16_FMTx__ "hx" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST16_MAX__ 65535 -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST16_TYPE__ unsigned short -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST32_FMTX__ "X" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST32_FMTo__ "o" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST32_FMTu__ "u" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST32_FMTx__ "x" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST32_MAX__ 4294967295U -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST32_TYPE__ unsigned int -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST64_FMTX__ "llX" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST64_FMTo__ "llo" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST64_FMTu__ "llu" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST64_FMTx__ "llx" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST64_TYPE__ long long unsigned int -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST8_FMTX__ "hhX" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST8_FMTo__ "hho" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST8_FMTu__ "hhu" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST8_FMTx__ "hhx" -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST8_MAX__ 255 -// WEBASSEMBLY32-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char -// WEBASSEMBLY32-NEXT:#define __USER_LABEL_PREFIX__ -// WEBASSEMBLY32-NEXT:#define __VERSION__ "{{.*}}" -// WEBASSEMBLY32-NEXT:#define __WCHAR_MAX__ 2147483647 -// WEBASSEMBLY32-NEXT:#define __WCHAR_TYPE__ int -// WEBASSEMBLY32-NOT:#define __WCHAR_UNSIGNED__ -// WEBASSEMBLY32-NEXT:#define __WCHAR_WIDTH__ 32 -// WEBASSEMBLY32-NEXT:#define __WINT_MAX__ 2147483647 -// WEBASSEMBLY32-NEXT:#define __WINT_TYPE__ int -// WEBASSEMBLY32-NOT:#define __WINT_UNSIGNED__ -// WEBASSEMBLY32-NEXT:#define __WINT_WIDTH__ 32 -// WEBASSEMBLY32-NEXT:#define __clang__ 1 -// WEBASSEMBLY32-NEXT:#define __clang_major__ {{.*}} -// WEBASSEMBLY32-NEXT:#define __clang_minor__ {{.*}} -// WEBASSEMBLY32-NEXT:#define __clang_patchlevel__ {{.*}} -// WEBASSEMBLY32-NEXT:#define __clang_version__ "{{.*}}" -// WEBASSEMBLY32-NEXT:#define __llvm__ 1 -// WEBASSEMBLY32-NOT:#define __wasm_simd128__ -// WEBASSEMBLY32-NOT:#define __wasm_simd256__ -// WEBASSEMBLY32-NOT:#define __wasm_simd512__ -// WEBASSEMBLY32-NOT:#define __unix -// WEBASSEMBLY32-NOT:#define __unix__ -// WEBASSEMBLY32-NEXT:#define __wasm 1 -// WEBASSEMBLY32-NEXT:#define __wasm32 1 -// WEBASSEMBLY32-NEXT:#define __wasm32__ 1 -// WEBASSEMBLY32-NOT:#define __wasm64 -// WEBASSEMBLY32-NOT:#define __wasm64__ -// WEBASSEMBLY32-NEXT:#define __wasm__ 1 -// -// RUN: %clang_cc1 -E -dM -ffreestanding -triple=wasm64-unknown-unknown \ -// RUN: < /dev/null \ -// RUN: | FileCheck -match-full-lines -check-prefix=WEBASSEMBLY64 %s -// -// WEBASSEMBLY64-NOT:#define _ILP32 -// WEBASSEMBLY64:#define _LP64 1 -// WEBASSEMBLY64-NEXT:#define __ATOMIC_ACQUIRE 2 -// WEBASSEMBLY64-NEXT:#define __ATOMIC_ACQ_REL 4 -// WEBASSEMBLY64-NEXT:#define __ATOMIC_CONSUME 1 -// WEBASSEMBLY64-NEXT:#define __ATOMIC_RELAXED 0 -// WEBASSEMBLY64-NEXT:#define __ATOMIC_RELEASE 3 -// WEBASSEMBLY64-NEXT:#define __ATOMIC_SEQ_CST 5 -// WEBASSEMBLY64-NEXT:#define __BIGGEST_ALIGNMENT__ 16 -// WEBASSEMBLY64-NEXT:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -// WEBASSEMBLY64-NEXT:#define __CHAR16_TYPE__ unsigned short -// WEBASSEMBLY64-NEXT:#define __CHAR32_TYPE__ unsigned int -// WEBASSEMBLY64-NEXT:#define __CHAR_BIT__ 8 -// WEBASSEMBLY64-NOT:#define __CHAR_UNSIGNED__ -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_BOOL_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_CHAR16_T_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_CHAR32_T_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_CHAR_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_INT_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_LLONG_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_LONG_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_POINTER_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_SHORT_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CLANG_ATOMIC_WCHAR_T_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __CONSTANT_CFSTRINGS__ 1 -// WEBASSEMBLY64-NEXT:#define __DBL_DECIMAL_DIG__ 17 -// WEBASSEMBLY64-NEXT:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324 -// WEBASSEMBLY64-NEXT:#define __DBL_DIG__ 15 -// WEBASSEMBLY64-NEXT:#define __DBL_EPSILON__ 2.2204460492503131e-16 -// WEBASSEMBLY64-NEXT:#define __DBL_HAS_DENORM__ 1 -// WEBASSEMBLY64-NEXT:#define __DBL_HAS_INFINITY__ 1 -// WEBASSEMBLY64-NEXT:#define __DBL_HAS_QUIET_NAN__ 1 -// WEBASSEMBLY64-NEXT:#define __DBL_MANT_DIG__ 53 -// WEBASSEMBLY64-NEXT:#define __DBL_MAX_10_EXP__ 308 -// WEBASSEMBLY64-NEXT:#define __DBL_MAX_EXP__ 1024 -// WEBASSEMBLY64-NEXT:#define __DBL_MAX__ 1.7976931348623157e+308 -// WEBASSEMBLY64-NEXT:#define __DBL_MIN_10_EXP__ (-307) -// WEBASSEMBLY64-NEXT:#define __DBL_MIN_EXP__ (-1021) -// WEBASSEMBLY64-NEXT:#define __DBL_MIN__ 2.2250738585072014e-308 -// WEBASSEMBLY64-NEXT:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__ -// WEBASSEMBLY64-NOT:#define __ELF__ -// WEBASSEMBLY64-NEXT:#define __FINITE_MATH_ONLY__ 0 -// WEBASSEMBLY64:#define __FLT_DECIMAL_DIG__ 9 -// WEBASSEMBLY64-NEXT:#define __FLT_DENORM_MIN__ 1.40129846e-45F -// WEBASSEMBLY64-NEXT:#define __FLT_DIG__ 6 -// WEBASSEMBLY64-NEXT:#define __FLT_EPSILON__ 1.19209290e-7F -// WEBASSEMBLY64-NEXT:#define __FLT_EVAL_METHOD__ 0 -// WEBASSEMBLY64-NEXT:#define __FLT_HAS_DENORM__ 1 -// WEBASSEMBLY64-NEXT:#define __FLT_HAS_INFINITY__ 1 -// WEBASSEMBLY64-NEXT:#define __FLT_HAS_QUIET_NAN__ 1 -// WEBASSEMBLY64-NEXT:#define __FLT_MANT_DIG__ 24 -// WEBASSEMBLY64-NEXT:#define __FLT_MAX_10_EXP__ 38 -// WEBASSEMBLY64-NEXT:#define __FLT_MAX_EXP__ 128 -// WEBASSEMBLY64-NEXT:#define __FLT_MAX__ 3.40282347e+38F -// WEBASSEMBLY64-NEXT:#define __FLT_MIN_10_EXP__ (-37) -// WEBASSEMBLY64-NEXT:#define __FLT_MIN_EXP__ (-125) -// WEBASSEMBLY64-NEXT:#define __FLT_MIN__ 1.17549435e-38F -// WEBASSEMBLY64-NEXT:#define __FLT_RADIX__ 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_INT_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -// WEBASSEMBLY64-NEXT:#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -// WEBASSEMBLY64-NEXT:#define __GNUC_MINOR__ {{.*}} -// WEBASSEMBLY64-NEXT:#define __GNUC_PATCHLEVEL__ {{.*}} -// WEBASSEMBLY64-NEXT:#define __GNUC_STDC_INLINE__ 1 -// WEBASSEMBLY64-NEXT:#define __GNUC__ {{.}} -// WEBASSEMBLY64-NEXT:#define __GXX_ABI_VERSION 1002 -// WEBASSEMBLY64-NOT:#define __ILP32__ -// WEBASSEMBLY64-NEXT:#define __INT16_C_SUFFIX__ -// WEBASSEMBLY64-NEXT:#define __INT16_FMTd__ "hd" -// WEBASSEMBLY64-NEXT:#define __INT16_FMTi__ "hi" -// WEBASSEMBLY64-NEXT:#define __INT16_MAX__ 32767 -// WEBASSEMBLY64-NEXT:#define __INT16_TYPE__ short -// WEBASSEMBLY64-NEXT:#define __INT32_C_SUFFIX__ -// WEBASSEMBLY64-NEXT:#define __INT32_FMTd__ "d" -// WEBASSEMBLY64-NEXT:#define __INT32_FMTi__ "i" -// WEBASSEMBLY64-NEXT:#define __INT32_MAX__ 2147483647 -// WEBASSEMBLY64-NEXT:#define __INT32_TYPE__ int -// WEBASSEMBLY64-NEXT:#define __INT64_C_SUFFIX__ LL -// WEBASSEMBLY64-NEXT:#define __INT64_FMTd__ "lld" -// WEBASSEMBLY64-NEXT:#define __INT64_FMTi__ "lli" -// WEBASSEMBLY64-NEXT:#define __INT64_MAX__ 9223372036854775807LL -// WEBASSEMBLY64-NEXT:#define __INT64_TYPE__ long long int -// WEBASSEMBLY64-NEXT:#define __INT8_C_SUFFIX__ -// WEBASSEMBLY64-NEXT:#define __INT8_FMTd__ "hhd" -// WEBASSEMBLY64-NEXT:#define __INT8_FMTi__ "hhi" -// WEBASSEMBLY64-NEXT:#define __INT8_MAX__ 127 -// WEBASSEMBLY64-NEXT:#define __INT8_TYPE__ signed char -// WEBASSEMBLY64-NEXT:#define __INTMAX_C_SUFFIX__ LL -// WEBASSEMBLY64-NEXT:#define __INTMAX_FMTd__ "lld" -// WEBASSEMBLY64-NEXT:#define __INTMAX_FMTi__ "lli" -// WEBASSEMBLY64-NEXT:#define __INTMAX_MAX__ 9223372036854775807LL -// WEBASSEMBLY64-NEXT:#define __INTMAX_TYPE__ long long int -// WEBASSEMBLY64-NEXT:#define __INTMAX_WIDTH__ 64 -// WEBASSEMBLY64-NEXT:#define __INTPTR_FMTd__ "ld" -// WEBASSEMBLY64-NEXT:#define __INTPTR_FMTi__ "li" -// WEBASSEMBLY64-NEXT:#define __INTPTR_MAX__ 9223372036854775807L -// WEBASSEMBLY64-NEXT:#define __INTPTR_TYPE__ long int -// WEBASSEMBLY64-NEXT:#define __INTPTR_WIDTH__ 64 -// WEBASSEMBLY64-NEXT:#define __INT_FAST16_FMTd__ "hd" -// WEBASSEMBLY64-NEXT:#define __INT_FAST16_FMTi__ "hi" -// WEBASSEMBLY64-NEXT:#define __INT_FAST16_MAX__ 32767 -// WEBASSEMBLY64-NEXT:#define __INT_FAST16_TYPE__ short -// WEBASSEMBLY64-NEXT:#define __INT_FAST32_FMTd__ "d" -// WEBASSEMBLY64-NEXT:#define __INT_FAST32_FMTi__ "i" -// WEBASSEMBLY64-NEXT:#define __INT_FAST32_MAX__ 2147483647 -// WEBASSEMBLY64-NEXT:#define __INT_FAST32_TYPE__ int -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTd__ "lld" -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_FMTi__ "lli" -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_MAX__ 9223372036854775807LL -// WEBASSEMBLY64-NEXT:#define __INT_FAST64_TYPE__ long long int -// WEBASSEMBLY64-NEXT:#define __INT_FAST8_FMTd__ "hhd" -// WEBASSEMBLY64-NEXT:#define __INT_FAST8_FMTi__ "hhi" -// WEBASSEMBLY64-NEXT:#define __INT_FAST8_MAX__ 127 -// WEBASSEMBLY64-NEXT:#define __INT_FAST8_TYPE__ signed char -// WEBASSEMBLY64-NEXT:#define __INT_LEAST16_FMTd__ "hd" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST16_FMTi__ "hi" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST16_MAX__ 32767 -// WEBASSEMBLY64-NEXT:#define __INT_LEAST16_TYPE__ short -// WEBASSEMBLY64-NEXT:#define __INT_LEAST32_FMTd__ "d" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST32_FMTi__ "i" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST32_MAX__ 2147483647 -// WEBASSEMBLY64-NEXT:#define __INT_LEAST32_TYPE__ int -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTd__ "lld" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_FMTi__ "lli" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_MAX__ 9223372036854775807LL -// WEBASSEMBLY64-NEXT:#define __INT_LEAST64_TYPE__ long long int -// WEBASSEMBLY64-NEXT:#define __INT_LEAST8_FMTd__ "hhd" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST8_FMTi__ "hhi" -// WEBASSEMBLY64-NEXT:#define __INT_LEAST8_MAX__ 127 -// WEBASSEMBLY64-NEXT:#define __INT_LEAST8_TYPE__ signed char -// WEBASSEMBLY64-NEXT:#define __INT_MAX__ 2147483647 -// WEBASSEMBLY64-NEXT:#define __LDBL_DECIMAL_DIG__ 36 -// WEBASSEMBLY64-NEXT:#define __LDBL_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966L -// WEBASSEMBLY64-NEXT:#define __LDBL_DIG__ 33 -// WEBASSEMBLY64-NEXT:#define __LDBL_EPSILON__ 1.92592994438723585305597794258492732e-34L -// WEBASSEMBLY64-NEXT:#define __LDBL_HAS_DENORM__ 1 -// WEBASSEMBLY64-NEXT:#define __LDBL_HAS_INFINITY__ 1 -// WEBASSEMBLY64-NEXT:#define __LDBL_HAS_QUIET_NAN__ 1 -// WEBASSEMBLY64-NEXT:#define __LDBL_MANT_DIG__ 113 -// WEBASSEMBLY64-NEXT:#define __LDBL_MAX_10_EXP__ 4932 -// WEBASSEMBLY64-NEXT:#define __LDBL_MAX_EXP__ 16384 -// WEBASSEMBLY64-NEXT:#define __LDBL_MAX__ 1.18973149535723176508575932662800702e+4932L -// WEBASSEMBLY64-NEXT:#define __LDBL_MIN_10_EXP__ (-4931) -// WEBASSEMBLY64-NEXT:#define __LDBL_MIN_EXP__ (-16381) -// WEBASSEMBLY64-NEXT:#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L -// WEBASSEMBLY64-NEXT:#define __LITTLE_ENDIAN__ 1 -// WEBASSEMBLY64-NEXT:#define __LONG_LONG_MAX__ 9223372036854775807LL -// WEBASSEMBLY64-NEXT:#define __LONG_MAX__ 9223372036854775807L -// WEBASSEMBLY64-NEXT:#define __LP64__ 1 -// WEBASSEMBLY64-NEXT:#define __NO_INLINE__ 1 -// WEBASSEMBLY64-NEXT:#define __OBJC_BOOL_IS_BOOL 0 -// WEBASSEMBLY64-NEXT:#define __OPENCL_MEMORY_SCOPE_ALL_SVM_DEVICES 3 -// WEBASSEMBLY64-NEXT:#define __OPENCL_MEMORY_SCOPE_DEVICE 2 -// WEBASSEMBLY64-NEXT:#define __OPENCL_MEMORY_SCOPE_SUB_GROUP 4 -// WEBASSEMBLY64-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_GROUP 1 -// WEBASSEMBLY64-NEXT:#define __OPENCL_MEMORY_SCOPE_WORK_ITEM 0 -// WEBASSEMBLY64-NEXT:#define __ORDER_BIG_ENDIAN__ 4321 -// WEBASSEMBLY64-NEXT:#define __ORDER_LITTLE_ENDIAN__ 1234 -// WEBASSEMBLY64-NEXT:#define __ORDER_PDP_ENDIAN__ 3412 -// WEBASSEMBLY64-NEXT:#define __POINTER_WIDTH__ 64 -// WEBASSEMBLY64-NEXT:#define __PRAGMA_REDEFINE_EXTNAME 1 -// WEBASSEMBLY64-NEXT:#define __PTRDIFF_FMTd__ "ld" -// WEBASSEMBLY64-NEXT:#define __PTRDIFF_FMTi__ "li" -// WEBASSEMBLY64-NEXT:#define __PTRDIFF_MAX__ 9223372036854775807L -// WEBASSEMBLY64-NEXT:#define __PTRDIFF_TYPE__ long int -// WEBASSEMBLY64-NEXT:#define __PTRDIFF_WIDTH__ 64 -// WEBASSEMBLY64-NOT:#define __REGISTER_PREFIX__ -// WEBASSEMBLY64-NEXT:#define __SCHAR_MAX__ 127 -// WEBASSEMBLY64-NEXT:#define __SHRT_MAX__ 32767 -// WEBASSEMBLY64-NEXT:#define __SIG_ATOMIC_MAX__ 9223372036854775807L -// WEBASSEMBLY64-NEXT:#define __SIG_ATOMIC_WIDTH__ 64 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_DOUBLE__ 8 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_FLOAT__ 4 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_INT128__ 16 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_INT__ 4 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_LONG_DOUBLE__ 16 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_LONG_LONG__ 8 // WEBASSEMBLY64-NEXT:#define __SIZEOF_LONG__ 8 // WEBASSEMBLY64-NEXT:#define __SIZEOF_POINTER__ 8 // WEBASSEMBLY64-NEXT:#define __SIZEOF_PTRDIFF_T__ 8 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_SHORT__ 2 +// WEBASSEMBLY-NEXT:#define __SIZEOF_SHORT__ 2 +// WEBASSEMBLY32-NEXT:#define __SIZEOF_SIZE_T__ 4 // WEBASSEMBLY64-NEXT:#define __SIZEOF_SIZE_T__ 8 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_WCHAR_T__ 4 -// WEBASSEMBLY64-NEXT:#define __SIZEOF_WINT_T__ 4 -// WEBASSEMBLY64-NEXT:#define __SIZE_FMTX__ "lX" -// WEBASSEMBLY64-NEXT:#define __SIZE_FMTo__ "lo" -// WEBASSEMBLY64-NEXT:#define __SIZE_FMTu__ "lu" -// WEBASSEMBLY64-NEXT:#define __SIZE_FMTx__ "lx" +// WEBASSEMBLY-NEXT:#define __SIZEOF_WCHAR_T__ 4 +// WEBASSEMBLY-NEXT:#define __SIZEOF_WINT_T__ 4 +// WEBASSEMBLY-NEXT:#define __SIZE_FMTX__ "lX" +// WEBASSEMBLY-NEXT:#define __SIZE_FMTo__ "lo" +// WEBASSEMBLY-NEXT:#define __SIZE_FMTu__ "lu" +// WEBASSEMBLY-NEXT:#define __SIZE_FMTx__ "lx" +// WEBASSEMBLY32-NEXT:#define __SIZE_MAX__ 4294967295UL // WEBASSEMBLY64-NEXT:#define __SIZE_MAX__ 18446744073709551615UL -// WEBASSEMBLY64-NEXT:#define __SIZE_TYPE__ long unsigned int +// WEBASSEMBLY-NEXT:#define __SIZE_TYPE__ long unsigned int +// WEBASSEMBLY32-NEXT:#define __SIZE_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __SIZE_WIDTH__ 64 -// WEBASSEMBLY64-NEXT:#define __STDC_HOSTED__ 0 -// WEBASSEMBLY64-NOT:#define __STDC_MB_MIGHT_NEQ_WC__ -// WEBASSEMBLY64-NOT:#define __STDC_NO_ATOMICS__ -// WEBASSEMBLY64-NOT:#define __STDC_NO_COMPLEX__ -// WEBASSEMBLY64-NOT:#define __STDC_NO_VLA__ -// WEBASSEMBLY64-NOT:#define __STDC_NO_THREADS__ -// WEBASSEMBLY64-NEXT:#define __STDC_UTF_16__ 1 -// WEBASSEMBLY64-NEXT:#define __STDC_UTF_32__ 1 -// WEBASSEMBLY64-NEXT:#define __STDC_VERSION__ 201112L -// WEBASSEMBLY64-NEXT:#define __STDC__ 1 -// WEBASSEMBLY64-NEXT:#define __UINT16_C_SUFFIX__ -// WEBASSEMBLY64-NEXT:#define __UINT16_FMTX__ "hX" -// WEBASSEMBLY64-NEXT:#define __UINT16_FMTo__ "ho" -// WEBASSEMBLY64-NEXT:#define __UINT16_FMTu__ "hu" -// WEBASSEMBLY64-NEXT:#define __UINT16_FMTx__ "hx" -// WEBASSEMBLY64-NEXT:#define __UINT16_MAX__ 65535 -// WEBASSEMBLY64-NEXT:#define __UINT16_TYPE__ unsigned short -// WEBASSEMBLY64-NEXT:#define __UINT32_C_SUFFIX__ U -// WEBASSEMBLY64-NEXT:#define __UINT32_FMTX__ "X" -// WEBASSEMBLY64-NEXT:#define __UINT32_FMTo__ "o" -// WEBASSEMBLY64-NEXT:#define __UINT32_FMTu__ "u" -// WEBASSEMBLY64-NEXT:#define __UINT32_FMTx__ "x" -// WEBASSEMBLY64-NEXT:#define __UINT32_MAX__ 4294967295U -// WEBASSEMBLY64-NEXT:#define __UINT32_TYPE__ unsigned int -// WEBASSEMBLY64-NEXT:#define __UINT64_C_SUFFIX__ ULL -// WEBASSEMBLY64-NEXT:#define __UINT64_FMTX__ "llX" -// WEBASSEMBLY64-NEXT:#define __UINT64_FMTo__ "llo" -// WEBASSEMBLY64-NEXT:#define __UINT64_FMTu__ "llu" -// WEBASSEMBLY64-NEXT:#define __UINT64_FMTx__ "llx" -// WEBASSEMBLY64-NEXT:#define __UINT64_MAX__ 18446744073709551615ULL -// WEBASSEMBLY64-NEXT:#define __UINT64_TYPE__ long long unsigned int -// WEBASSEMBLY64-NEXT:#define __UINT8_C_SUFFIX__ -// WEBASSEMBLY64-NEXT:#define __UINT8_FMTX__ "hhX" -// WEBASSEMBLY64-NEXT:#define __UINT8_FMTo__ "hho" -// WEBASSEMBLY64-NEXT:#define __UINT8_FMTu__ "hhu" -// WEBASSEMBLY64-NEXT:#define __UINT8_FMTx__ "hhx" -// WEBASSEMBLY64-NEXT:#define __UINT8_MAX__ 255 -// WEBASSEMBLY64-NEXT:#define __UINT8_TYPE__ unsigned char -// WEBASSEMBLY64-NEXT:#define __UINTMAX_C_SUFFIX__ ULL -// WEBASSEMBLY64-NEXT:#define __UINTMAX_FMTX__ "llX" -// WEBASSEMBLY64-NEXT:#define __UINTMAX_FMTo__ "llo" -// WEBASSEMBLY64-NEXT:#define __UINTMAX_FMTu__ "llu" -// WEBASSEMBLY64-NEXT:#define __UINTMAX_FMTx__ "llx" -// WEBASSEMBLY64-NEXT:#define __UINTMAX_MAX__ 18446744073709551615ULL -// WEBASSEMBLY64-NEXT:#define __UINTMAX_TYPE__ long long unsigned int -// WEBASSEMBLY64-NEXT:#define __UINTMAX_WIDTH__ 64 -// WEBASSEMBLY64-NEXT:#define __UINTPTR_FMTX__ "lX" -// WEBASSEMBLY64-NEXT:#define __UINTPTR_FMTo__ "lo" -// WEBASSEMBLY64-NEXT:#define __UINTPTR_FMTu__ "lu" -// WEBASSEMBLY64-NEXT:#define __UINTPTR_FMTx__ "lx" +// WEBASSEMBLY-NEXT:#define __STDC_HOSTED__ 0 +// WEBASSEMBLY-NOT:#define __STDC_MB_MIGHT_NEQ_WC__ +// WEBASSEMBLY-NOT:#define __STDC_NO_ATOMICS__ +// WEBASSEMBLY-NOT:#define __STDC_NO_COMPLEX__ +// WEBASSEMBLY-NOT:#define __STDC_NO_VLA__ +// WEBASSEMBLY-NOT:#define __STDC_NO_THREADS__ +// WEBASSEMBLY-NEXT:#define __STDC_UTF_16__ 1 +// WEBASSEMBLY-NEXT:#define __STDC_UTF_32__ 1 +// WEBASSEMBLY-NEXT:#define __STDC_VERSION__ 201112L +// WEBASSEMBLY-NEXT:#define __STDC__ 1 +// WEBASSEMBLY-NEXT:#define __UINT16_C_SUFFIX__ +// WEBASSEMBLY-NEXT:#define __UINT16_FMTX__ "hX" +// WEBASSEMBLY-NEXT:#define __UINT16_FMTo__ "ho" +// WEBASSEMBLY-NEXT:#define __UINT16_FMTu__ "hu" +// WEBASSEMBLY-NEXT:#define __UINT16_FMTx__ "hx" +// WEBASSEMBLY-NEXT:#define __UINT16_MAX__ 65535 +// WEBASSEMBLY-NEXT:#define __UINT16_TYPE__ unsigned short +// WEBASSEMBLY-NEXT:#define __UINT32_C_SUFFIX__ U +// WEBASSEMBLY-NEXT:#define __UINT32_FMTX__ "X" +// WEBASSEMBLY-NEXT:#define __UINT32_FMTo__ "o" +// WEBASSEMBLY-NEXT:#define __UINT32_FMTu__ "u" +// WEBASSEMBLY-NEXT:#define __UINT32_FMTx__ "x" +// WEBASSEMBLY-NEXT:#define __UINT32_MAX__ 4294967295U +// WEBASSEMBLY-NEXT:#define __UINT32_TYPE__ unsigned int +// WEBASSEMBLY-NEXT:#define __UINT64_C_SUFFIX__ ULL +// WEBASSEMBLY-NEXT:#define __UINT64_FMTX__ "llX" +// WEBASSEMBLY-NEXT:#define __UINT64_FMTo__ "llo" +// WEBASSEMBLY-NEXT:#define __UINT64_FMTu__ "llu" +// WEBASSEMBLY-NEXT:#define __UINT64_FMTx__ "llx" +// WEBASSEMBLY-NEXT:#define __UINT64_MAX__ 18446744073709551615ULL +// WEBASSEMBLY-NEXT:#define __UINT64_TYPE__ long long unsigned int +// WEBASSEMBLY-NEXT:#define __UINT8_C_SUFFIX__ +// WEBASSEMBLY-NEXT:#define __UINT8_FMTX__ "hhX" +// WEBASSEMBLY-NEXT:#define __UINT8_FMTo__ "hho" +// WEBASSEMBLY-NEXT:#define __UINT8_FMTu__ "hhu" +// WEBASSEMBLY-NEXT:#define __UINT8_FMTx__ "hhx" +// WEBASSEMBLY-NEXT:#define __UINT8_MAX__ 255 +// WEBASSEMBLY-NEXT:#define __UINT8_TYPE__ unsigned char +// WEBASSEMBLY-NEXT:#define __UINTMAX_C_SUFFIX__ ULL +// WEBASSEMBLY-NEXT:#define __UINTMAX_FMTX__ "llX" +// WEBASSEMBLY-NEXT:#define __UINTMAX_FMTo__ "llo" +// WEBASSEMBLY-NEXT:#define __UINTMAX_FMTu__ "llu" +// WEBASSEMBLY-NEXT:#define __UINTMAX_FMTx__ "llx" +// WEBASSEMBLY-NEXT:#define __UINTMAX_MAX__ 18446744073709551615ULL +// WEBASSEMBLY-NEXT:#define __UINTMAX_TYPE__ long long unsigned int +// WEBASSEMBLY-NEXT:#define __UINTMAX_WIDTH__ 64 +// WEBASSEMBLY-NEXT:#define __UINTPTR_FMTX__ "lX" +// WEBASSEMBLY-NEXT:#define __UINTPTR_FMTo__ "lo" +// WEBASSEMBLY-NEXT:#define __UINTPTR_FMTu__ "lu" +// WEBASSEMBLY-NEXT:#define __UINTPTR_FMTx__ "lx" +// WEBASSEMBLY32-NEXT:#define __UINTPTR_MAX__ 4294967295UL // WEBASSEMBLY64-NEXT:#define __UINTPTR_MAX__ 18446744073709551615UL -// WEBASSEMBLY64-NEXT:#define __UINTPTR_TYPE__ long unsigned int +// WEBASSEMBLY-NEXT:#define __UINTPTR_TYPE__ long unsigned int +// WEBASSEMBLY32-NEXT:#define __UINTPTR_WIDTH__ 32 // WEBASSEMBLY64-NEXT:#define __UINTPTR_WIDTH__ 64 -// WEBASSEMBLY64-NEXT:#define __UINT_FAST16_FMTX__ "hX" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST16_FMTo__ "ho" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST16_FMTu__ "hu" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST16_FMTx__ "hx" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST16_MAX__ 65535 -// WEBASSEMBLY64-NEXT:#define __UINT_FAST16_TYPE__ unsigned short -// WEBASSEMBLY64-NEXT:#define __UINT_FAST32_FMTX__ "X" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST32_FMTo__ "o" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST32_FMTu__ "u" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST32_FMTx__ "x" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST32_MAX__ 4294967295U -// WEBASSEMBLY64-NEXT:#define __UINT_FAST32_TYPE__ unsigned int -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTX__ "llX" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTo__ "llo" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTu__ "llu" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_FMTx__ "llx" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL -// WEBASSEMBLY64-NEXT:#define __UINT_FAST64_TYPE__ long long unsigned int -// WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTX__ "hhX" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTo__ "hho" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTu__ "hhu" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST8_FMTx__ "hhx" -// WEBASSEMBLY64-NEXT:#define __UINT_FAST8_MAX__ 255 -// WEBASSEMBLY64-NEXT:#define __UINT_FAST8_TYPE__ unsigned char -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST16_FMTX__ "hX" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST16_FMTo__ "ho" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST16_FMTu__ "hu" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST16_FMTx__ "hx" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST16_MAX__ 65535 -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST16_TYPE__ unsigned short -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_FMTX__ "X" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_FMTo__ "o" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_FMTu__ "u" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_FMTx__ "x" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_MAX__ 4294967295U -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST32_TYPE__ unsigned int -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTX__ "llX" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTo__ "llo" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTu__ "llu" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_FMTx__ "llx" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST64_TYPE__ long long unsigned int -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTX__ "hhX" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTo__ "hho" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTu__ "hhu" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_FMTx__ "hhx" -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_MAX__ 255 -// WEBASSEMBLY64-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char -// WEBASSEMBLY64-NEXT:#define __USER_LABEL_PREFIX__ -// WEBASSEMBLY64-NEXT:#define __VERSION__ "{{.*}}" -// WEBASSEMBLY64-NEXT:#define __WCHAR_MAX__ 2147483647 -// WEBASSEMBLY64-NEXT:#define __WCHAR_TYPE__ int -// WEBASSEMBLY64-NOT:#define __WCHAR_UNSIGNED__ -// WEBASSEMBLY64-NEXT:#define __WCHAR_WIDTH__ 32 -// WEBASSEMBLY64-NEXT:#define __WINT_MAX__ 2147483647 -// WEBASSEMBLY64-NEXT:#define __WINT_TYPE__ int -// WEBASSEMBLY64-NOT:#define __WINT_UNSIGNED__ -// WEBASSEMBLY64-NEXT:#define __WINT_WIDTH__ 32 -// WEBASSEMBLY64-NEXT:#define __clang__ 1 -// WEBASSEMBLY64-NEXT:#define __clang_major__ {{.*}} -// WEBASSEMBLY64-NEXT:#define __clang_minor__ {{.*}} -// WEBASSEMBLY64-NEXT:#define __clang_patchlevel__ {{.*}} -// WEBASSEMBLY64-NEXT:#define __clang_version__ "{{.*}}" -// WEBASSEMBLY64-NEXT:#define __llvm__ 1 -// WEBASSEMBLY64-NOT:#define __wasm_simd128__ -// WEBASSEMBLY64-NOT:#define __wasm_simd256__ -// WEBASSEMBLY64-NOT:#define __wasm_simd512__ -// WEBASSEMBLY64-NOT:#define __unix -// WEBASSEMBLY64-NOT:#define __unix__ -// WEBASSEMBLY64-NEXT:#define __wasm 1 +// WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTX__ "hX" +// WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTo__ "ho" +// WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTu__ "hu" +// WEBASSEMBLY-NEXT:#define __UINT_FAST16_FMTx__ "hx" +// WEBASSEMBLY-NEXT:#define __UINT_FAST16_MAX__ 65535 +// WEBASSEMBLY-NEXT:#define __UINT_FAST16_TYPE__ unsigned short +// WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTX__ "X" +// WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTo__ "o" +// WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTu__ "u" +// WEBASSEMBLY-NEXT:#define __UINT_FAST32_FMTx__ "x" +// WEBASSEMBLY-NEXT:#define __UINT_FAST32_MAX__ 4294967295U +// WEBASSEMBLY-NEXT:#define __UINT_FAST32_TYPE__ unsigned int +// WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTX__ "llX" +// WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTo__ "llo" +// WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTu__ "llu" +// WEBASSEMBLY-NEXT:#define __UINT_FAST64_FMTx__ "llx" +// WEBASSEMBLY-NEXT:#define __UINT_FAST64_MAX__ 18446744073709551615ULL +// WEBASSEMBLY-NEXT:#define __UINT_FAST64_TYPE__ long long unsigned int +// WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTX__ "hhX" +// WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTo__ "hho" +// WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTu__ "hhu" +// WEBASSEMBLY-NEXT:#define __UINT_FAST8_FMTx__ "hhx" +// WEBASSEMBLY-NEXT:#define __UINT_FAST8_MAX__ 255 +// WEBASSEMBLY-NEXT:#define __UINT_FAST8_TYPE__ unsigned char +// WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTX__ "hX" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTo__ "ho" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTu__ "hu" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST16_FMTx__ "hx" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST16_MAX__ 65535 +// WEBASSEMBLY-NEXT:#define __UINT_LEAST16_TYPE__ unsigned short +// WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTX__ "X" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTo__ "o" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTu__ "u" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST32_FMTx__ "x" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST32_MAX__ 4294967295U +// WEBASSEMBLY-NEXT:#define __UINT_LEAST32_TYPE__ unsigned int +// WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTX__ "llX" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTo__ "llo" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTu__ "llu" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST64_FMTx__ "llx" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST64_MAX__ 18446744073709551615ULL +// WEBASSEMBLY-NEXT:#define __UINT_LEAST64_TYPE__ long long unsigned int +// WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTX__ "hhX" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTo__ "hho" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTu__ "hhu" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST8_FMTx__ "hhx" +// WEBASSEMBLY-NEXT:#define __UINT_LEAST8_MAX__ 255 +// WEBASSEMBLY-NEXT:#define __UINT_LEAST8_TYPE__ unsigned char +// WEBASSEMBLY-NEXT:#define __USER_LABEL_PREFIX__ +// WEBASSEMBLY-NEXT:#define __VERSION__ "{{.*}}" +// WEBASSEMBLY-NEXT:#define __WCHAR_MAX__ 2147483647 +// WEBASSEMBLY-NEXT:#define __WCHAR_TYPE__ int +// WEBASSEMBLY-NOT:#define __WCHAR_UNSIGNED__ +// WEBASSEMBLY-NEXT:#define __WCHAR_WIDTH__ 32 +// WEBASSEMBLY-NEXT:#define __WINT_MAX__ 2147483647 +// WEBASSEMBLY-NEXT:#define __WINT_TYPE__ int +// WEBASSEMBLY-NOT:#define __WINT_UNSIGNED__ +// WEBASSEMBLY-NEXT:#define __WINT_WIDTH__ 32 +// WEBASSEMBLY-NEXT:#define __clang__ 1 +// WEBASSEMBLY-NEXT:#define __clang_major__ {{.*}} +// WEBASSEMBLY-NEXT:#define __clang_minor__ {{.*}} +// WEBASSEMBLY-NEXT:#define __clang_patchlevel__ {{.*}} +// WEBASSEMBLY-NEXT:#define __clang_version__ "{{.*}}" +// WEBASSEMBLY-NEXT:#define __llvm__ 1 +// WEBASSEMBLY-NOT:#define __unix +// WEBASSEMBLY-NOT:#define __unix__ +// WEBASSEMBLY-WASI-NEXT:#define __wasi__ 1 +// WEBASSEMBLY-NOT:#define __wasm_simd128__ +// WEBASSEMBLY-NOT:#define __wasm_simd256__ +// WEBASSEMBLY-NOT:#define __wasm_simd512__ +// WEBASSEMBLY-NEXT:#define __wasm 1 +// WEBASSEMBLY32-NEXT:#define __wasm32 1 // WEBASSEMBLY64-NOT:#define __wasm32 +// WEBASSEMBLY32-NEXT:#define __wasm32__ 1 // WEBASSEMBLY64-NOT:#define __wasm32__ +// WEBASSEMBLY32-NOT:#define __wasm64__ +// WEBASSEMBLY32-NOT:#define __wasm64 // WEBASSEMBLY64-NEXT:#define __wasm64 1 // WEBASSEMBLY64-NEXT:#define __wasm64__ 1 -// WEBASSEMBLY64-NEXT:#define __wasm__ 1 +// WEBASSEMBLY-NEXT:#define __wasm__ 1 // RUN: %clang_cc1 -E -dM -ffreestanding -triple i686-windows-cygnus < /dev/null | FileCheck -match-full-lines -check-prefix CYGWIN-X32 %s // CYGWIN-X32: #define __USER_LABEL_PREFIX__ _ diff --git a/test/Sema/Float16.c b/test/Sema/Float16.c new file mode 100644 index 000000000000..bdfb01702c37 --- /dev/null +++ b/test/Sema/Float16.c @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux-pc %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple spir-unknown-unknown %s -DHAVE +// RUN: %clang_cc1 -fsyntax-only -verify -triple armv7a-linux-gnu %s -DHAVE +// RUN: %clang_cc1 -fsyntax-only -verify -triple aarch64-linux-gnu %s -DHAVE + +#ifdef HAVE +// expected-no-diagnostics +#else +// expected-error@+2{{_Float16 is not supported on this target}} +#endif // HAVE +_Float16 f; diff --git a/test/SemaCXX/Float16.cpp b/test/SemaCXX/Float16.cpp new file mode 100644 index 000000000000..f27c3839854e --- /dev/null +++ b/test/SemaCXX/Float16.cpp @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -triple x86_64-linux-pc %s +// RUN: %clang_cc1 -fsyntax-only -verify -triple spir-unknown-unknown %s -DHAVE +// RUN: %clang_cc1 -fsyntax-only -verify -triple armv7a-linux-gnu %s -DHAVE +// RUN: %clang_cc1 -fsyntax-only -verify -triple aarch64-linux-gnu %s -DHAVE + +#ifdef HAVE +// expected-no-diagnostics +#endif // HAVE + +#ifndef HAVE +// expected-error@+2{{_Float16 is not supported on this target}} +#endif // !HAVE +_Float16 f; + +#ifndef HAVE +// expected-error@+2{{invalid suffix 'F16' on floating constant}} +#endif // !HAVE +const auto g = 1.1F16; diff --git a/test/SemaCXX/PR40395.cpp b/test/SemaCXX/PR40395.cpp new file mode 100644 index 000000000000..469c86d56209 --- /dev/null +++ b/test/SemaCXX/PR40395.cpp @@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -std=c++17 -fms-extensions -triple=x86_64-pc-win32 -verify %s +// expected-no-diagnostics + +// PR40395 - ConstantExpr shouldn't cause the template object to infinitely +// expand. +struct _GUID {}; +struct __declspec(uuid("{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}")) B {}; + +template <const _GUID* piid> +struct A { + virtual void baz() { A<piid>(); } +}; + +void f() { + A<&__uuidof(B)>(); +} diff --git a/test/SemaCXX/cxx1z-decomposition.cpp b/test/SemaCXX/cxx1z-decomposition.cpp index 3c9b181f1c8f..8b5fd6809bb4 100644 --- a/test/SemaCXX/cxx1z-decomposition.cpp +++ b/test/SemaCXX/cxx1z-decomposition.cpp @@ -81,4 +81,21 @@ struct PR37352 { void f() { static auto [a] = *this; } // expected-error {{cannot be declared 'static'}} }; +namespace instantiate_template { + +template <typename T1, typename T2> +struct pair { + T1 a; + T2 b; +}; + +const pair<int, int> &f1(); + +int f2() { + const auto &[a, b] = f1(); + return a + b; +} + +} // namespace instantiate_template + // FIXME: by-value array copies diff --git a/test/SemaObjC/enum-fixed-type.m b/test/SemaObjC/enum-fixed-type.m index 88c895a33982..b4135a555a23 100644 --- a/test/SemaObjC/enum-fixed-type.m +++ b/test/SemaObjC/enum-fixed-type.m @@ -1,9 +1,11 @@ // RUN: %clang_cc1 -fsyntax-only -pedantic -verify %s // RUN: %clang_cc1 -fsyntax-only -verify -xc %s +#ifdef __OBJC__ #if !__has_feature(objc_fixed_enum) # error Enumerations with a fixed underlying type are not supported #endif +#endif #if !__has_extension(cxx_fixed_enum) # error Enumerations with a fixed underlying type are not supported diff --git a/test/SemaOpenCL/printf-format-string-warnings.cl b/test/SemaOpenCL/printf-format-string-warnings.cl index 2b9c5cc3f319..39b859402702 100644 --- a/test/SemaOpenCL/printf-format-string-warnings.cl +++ b/test/SemaOpenCL/printf-format-string-warnings.cl @@ -1,13 +1,14 @@ // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0 -finclude-default-header -// Make sure warnings are produced based on printf format strings. +// FIXME: Make sure warnings are produced based on printf format strings. +// expected-no-diagnostics kernel void format_string_warnings(__constant char* arg) { - printf("%d", arg); // expected-warning {{format specifies type 'int' but the argument has type '__constant char *'}} + printf("%d", arg); - printf("not enough arguments %d %d", 4); // expected-warning {{more '%' conversions than data arguments}} + printf("not enough arguments %d %d", 4); - printf("too many arguments", 4); // expected-warning {{data argument not used by format string}} + printf("too many arguments", 4); } diff --git a/test/SemaOpenCL/printf-format-strings.cl b/test/SemaOpenCL/printf-format-strings.cl index 079a83495685..212e1f8981cb 100644 --- a/test/SemaOpenCL/printf-format-strings.cl +++ b/test/SemaOpenCL/printf-format-strings.cl @@ -13,10 +13,10 @@ int printf(__constant const char* st, ...) __attribute__((format(printf, 1, 2))) kernel void format_v4f32(float4 arg) { #ifdef cl_khr_fp64 - printf("%v4f\n", arg); + printf("%v4f\n", arg); // expected-warning{{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float4' (vector of 4 'float' values)}} // Precision modifier - printf("%.2v4f\n", arg); + printf("%.2v4f\n", arg); // expected-warning{{format specifies type 'double __attribute__((ext_vector_type(4)))' but the argument has type 'float4' (vector of 4 'float' values)}} #else // FIXME: These should not warn, and the type should be expected to be float. printf("%v4f\n", arg); // expected-warning {{double __attribute__((ext_vector_type(4)))' but the argument has type 'float4' (vector of 4 'float' values)}} diff --git a/unittests/Basic/FileManagerTest.cpp b/unittests/Basic/FileManagerTest.cpp index 746d9ad5e89b..8e98f44fa46d 100644 --- a/unittests/Basic/FileManagerTest.cpp +++ b/unittests/Basic/FileManagerTest.cpp @@ -222,33 +222,6 @@ TEST_F(FileManagerTest, getFileReturnsNULLForNonexistentFile) { EXPECT_EQ(nullptr, file); } -// When calling getFile(OpenFile=false); getFile(OpenFile=true) the file is -// opened for the second call. -TEST_F(FileManagerTest, getFileDefersOpen) { - llvm::IntrusiveRefCntPtr<llvm::vfs::InMemoryFileSystem> FS( - new llvm::vfs::InMemoryFileSystem()); - FS->addFile("/tmp/test", 0, llvm::MemoryBuffer::getMemBufferCopy("test")); - FS->addFile("/tmp/testv", 0, llvm::MemoryBuffer::getMemBufferCopy("testv")); - FileManager manager(options, FS); - - const FileEntry *file = manager.getFile("/tmp/test", /*OpenFile=*/false); - ASSERT_TRUE(file != nullptr); - ASSERT_TRUE(file->isValid()); - // "real path name" reveals whether the file was actually opened. - EXPECT_FALSE(file->isOpenForTests()); - - file = manager.getFile("/tmp/test", /*OpenFile=*/true); - ASSERT_TRUE(file != nullptr); - ASSERT_TRUE(file->isValid()); - EXPECT_TRUE(file->isOpenForTests()); - - // However we should never try to open a file previously opened as virtual. - ASSERT_TRUE(manager.getVirtualFile("/tmp/testv", 5, 0)); - ASSERT_TRUE(manager.getFile("/tmp/testv", /*OpenFile=*/false)); - file = manager.getFile("/tmp/testv", /*OpenFile=*/true); - EXPECT_FALSE(file->isOpenForTests()); -} - // The following tests apply to Unix-like system only. #ifndef _WIN32 diff --git a/unittests/Tooling/ToolingTest.cpp b/unittests/Tooling/ToolingTest.cpp index 186463f80af7..5813552a6cd3 100644 --- a/unittests/Tooling/ToolingTest.cpp +++ b/unittests/Tooling/ToolingTest.cpp @@ -450,6 +450,37 @@ TEST(ClangToolTest, StripDependencyFileAdjuster) { EXPECT_TRUE(HasFlag("-w")); } +// Check getClangStripPluginsAdjuster strips plugin related args. +TEST(ClangToolTest, StripPluginsAdjuster) { + FixedCompilationDatabase Compilations( + "/", {"-Xclang", "-add-plugin", "-Xclang", "random-plugin"}); + + ClangTool Tool(Compilations, std::vector<std::string>(1, "/a.cc")); + Tool.mapVirtualFile("/a.cc", "void a() {}"); + + std::unique_ptr<FrontendActionFactory> Action( + newFrontendActionFactory<SyntaxOnlyAction>()); + + CommandLineArguments FinalArgs; + ArgumentsAdjuster CheckFlagsAdjuster = + [&FinalArgs](const CommandLineArguments &Args, StringRef /*unused*/) { + FinalArgs = Args; + return Args; + }; + Tool.clearArgumentsAdjusters(); + Tool.appendArgumentsAdjuster(getStripPluginsAdjuster()); + Tool.appendArgumentsAdjuster(CheckFlagsAdjuster); + Tool.run(Action.get()); + + auto HasFlag = [&FinalArgs](const std::string &Flag) { + return std::find(FinalArgs.begin(), FinalArgs.end(), Flag) != + FinalArgs.end(); + }; + EXPECT_FALSE(HasFlag("-Xclang")); + EXPECT_FALSE(HasFlag("-add-plugin")); + EXPECT_FALSE(HasFlag("-random-plugin")); +} + namespace { /// Find a target name such that looking for it in TargetRegistry by that name /// returns the same target. We expect that there is at least one target |