├── generated-include ├── dxcetw.h ├── clang │ ├── Basic │ │ ├── DiagnosticAnalysisKinds.inc │ │ ├── Version.inc │ │ ├── DiagnosticCommentKinds.inc │ │ ├── DiagnosticSerializationKinds.inc │ │ ├── AttrList.inc │ │ ├── DiagnosticCommonKinds.inc │ │ ├── DiagnosticFrontendKinds.inc │ │ └── DiagnosticDriverKinds.inc │ ├── AST │ │ ├── CommentHTMLTagsProperties.inc │ │ ├── CommentCommandList.inc │ │ ├── CommentNodes.inc │ │ ├── CommentHTMLTags.inc │ │ └── DeclNodes.inc │ ├── Parse │ │ └── AttrParserStringSwitches.inc │ └── Sema │ │ └── AttrParsedAttrList.inc ├── DxilPIXPasses.inc ├── dxcversion.inc └── DxcDisassembler.inc ├── .gitattributes ├── .github ├── FUNDING.yml ├── pull_request_template.md └── workflows │ ├── pr.yml │ └── ci.yml ├── src ├── empty.zig ├── shared_main.cpp ├── main.zig ├── mach_dxc.h └── mach_dxc.cpp ├── config-headers ├── include │ ├── dxc │ │ └── config.h.cmake │ └── llvm │ │ ├── Config │ │ ├── abi-breaking.h.cmake │ │ ├── Targets.def.in │ │ ├── AsmParsers.def.in │ │ ├── AsmPrinters.def.in │ │ ├── Disassemblers.def.in │ │ └── llvm-config.h.cmake │ │ └── Support │ │ └── DataTypes.h.cmake └── tools │ └── clang │ └── include │ └── clang │ └── Config │ └── config.h.cmake ├── .gitignore ├── LICENSE ├── msvc ├── wrl │ ├── internal.h │ └── client.h ├── hstring.h ├── roapi.h ├── activation.h └── inspectable.h ├── LICENSE-MIT ├── update.sh ├── README.md └── LICENSE-APACHE /generated-include/dxcetw.h: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: emidoots 2 | -------------------------------------------------------------------------------- /src/empty.zig: -------------------------------------------------------------------------------- 1 | pub fn main() !void {} 2 | -------------------------------------------------------------------------------- /config-headers/include/dxc/config.h.cmake: -------------------------------------------------------------------------------- 1 | /* Disable overriding memory allocators. */ 2 | #cmakedefine DXC_DISABLE_ALLOCATOR_OVERRIDES 3 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/DiagnosticAnalysisKinds.inc: -------------------------------------------------------------------------------- 1 | #ifdef ANALYSISSTART 2 | __ANALYSISSTART = DIAG_START_ANALYSIS, 3 | #undef ANALYSISSTART 4 | #endif 5 | 6 | -------------------------------------------------------------------------------- /src/shared_main.cpp: -------------------------------------------------------------------------------- 1 | #include "mach_dxc.h" 2 | 3 | int main(void) 4 | { 5 | MachDxcCompiler comp = machDxcInit(); 6 | machDxcDeinit(comp); 7 | } 8 | 9 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/Version.inc: -------------------------------------------------------------------------------- 1 | #define CLANG_VERSION 3.7 2 | #define CLANG_VERSION_MAJOR 3 3 | #define CLANG_VERSION_MINOR 7 4 | #if 0 5 | #define CLANG_VERSION_PATCHLEVEL 6 | #endif 7 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | - [ ] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right. -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # This file is for zig-specific build artifacts. 2 | # If you have OS-specific or editor-specific files to ignore, 3 | # such as *.swp or .DS_Store, put those in your global 4 | # ~/.gitignore and put this in your ~/.gitconfig: 5 | # 6 | # [core] 7 | # excludesfile = ~/.gitignore 8 | # 9 | # Cheers! 10 | # -andrewrk 11 | 12 | .zig-cache/ 13 | zig-cache/ 14 | zig-out/ 15 | /release/ 16 | /debug/ 17 | /build/ 18 | /build-*/ 19 | /docgen_tmp/ 20 | 21 | libs/DirectXShaderCompiler 22 | 23 | atls.lib 24 | atls.arm64.pdb 25 | atls.amd64.pdb 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2021, Hexops Contributors (given via the Git commit history). 2 | 3 | All documentation, image, sound, font, and 2D/3D model files are CC-BY-4.0 licensed unless 4 | otherwise noted. You may get a copy of this license at https://creativecommons.org/licenses/by/4.0 5 | 6 | Files in a directory with a separate LICENSE file may contain files under different license terms, 7 | described within that LICENSE file. 8 | 9 | All other files are licensed under the Apache License, Version 2.0 (see LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0) 10 | or the MIT license (see LICENSE-MIT or http://opensource.org/licenses/MIT), at your option. 11 | 12 | All files in the project without exclusions may not be copied, modified, or distributed except 13 | according to the terms above. -------------------------------------------------------------------------------- /generated-include/DxilPIXPasses.inc: -------------------------------------------------------------------------------- 1 | // DxilPIXPasses.inc - Generated by hctgen.py 2 | // DO NOT MODIFY!!! 3 | // Changes to this code are made in gen_intrin_main.txt 4 | 5 | initializeDxilAddPixelHitInstrumentationPass(Registry); 6 | initializeDxilAnnotateWithVirtualRegisterPass(Registry); 7 | initializeDxilDbgValueToDbgDeclarePass(Registry); 8 | initializeDxilDebugInstrumentationPass(Registry); 9 | initializeDxilForceEarlyZPass(Registry); 10 | initializeDxilOutputColorBecomesConstantPass(Registry); 11 | initializeDxilPIXAddTidToAmplificationShaderPayloadPass(Registry); 12 | initializeDxilPIXDXRInvocationsLogPass(Registry); 13 | initializeDxilPIXMeshShaderOutputInstrumentationPass(Registry); 14 | initializeDxilReduceMSAAToSingleSamplePass(Registry); 15 | initializeDxilRemoveDiscardsPass(Registry); 16 | initializeDxilShaderAccessTrackingPass(Registry); 17 | 18 | -------------------------------------------------------------------------------- /msvc/wrl/internal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file has no copyright assigned and is placed in the Public Domain. 3 | * This file is part of the mingw-w64 runtime package. 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 | */ 6 | 7 | #ifndef _WRL_INTERNAL_H_ 8 | #define _WRL_INTERNAL_H_ 9 | 10 | #include 11 | 12 | namespace Microsoft { 13 | namespace WRL { 14 | namespace Details { 15 | struct BoolStruct { 16 | int Member; 17 | }; 18 | 19 | typedef int BoolStruct::* BoolType; 20 | 21 | inline void DECLSPEC_NORETURN RaiseException(HRESULT hr, DWORD flags = EXCEPTION_NONCONTINUABLE) throw() { 22 | ::RaiseException(static_cast(hr), flags, 0, NULL); 23 | } 24 | 25 | template 26 | struct EnableIf {}; 27 | 28 | template 29 | struct EnableIf { 30 | typedef T type; 31 | }; 32 | } 33 | } 34 | } 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /msvc/hstring.h: -------------------------------------------------------------------------------- 1 | /*** Autogenerated by WIDL 7.0 from include/hstring.idl - Do not edit ***/ 2 | 3 | #ifdef _WIN32 4 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 5 | #define __REQUIRED_RPCNDR_H_VERSION__ 475 6 | #endif 7 | #include 8 | #include 9 | #endif 10 | 11 | #ifndef COM_NO_WINDOWS_H 12 | #include 13 | #include 14 | #endif 15 | 16 | #ifndef __hstring_h__ 17 | #define __hstring_h__ 18 | 19 | /* Forward declarations */ 20 | 21 | /* Headers for imported files */ 22 | 23 | #include 24 | 25 | #ifdef __cplusplus 26 | extern "C" { 27 | #endif 28 | 29 | typedef struct HSTRING__ { 30 | int unused; 31 | } HSTRING__; 32 | typedef HSTRING__ *HSTRING; 33 | 34 | typedef struct HSTRING_HEADER { 35 | __C89_NAMELESS union { 36 | PVOID Reserved1; 37 | #ifdef _WIN64 38 | char Reserved2[24]; 39 | #else 40 | char Reserved2[20]; 41 | #endif 42 | } Reserved; 43 | } HSTRING_HEADER; 44 | 45 | DECLARE_HANDLE(HSTRING_BUFFER); 46 | /* Begin additional prototypes for all interfaces */ 47 | 48 | 49 | /* End additional prototypes */ 50 | 51 | #ifdef __cplusplus 52 | } 53 | #endif 54 | 55 | #endif /* __hstring_h__ */ 56 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2021 Hexops Contributors (given via the Git commit history). 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | rm -rf config-headers/ 2 | 3 | mkdir -p config-headers/tools/clang/include/clang/Config/ 4 | cp libs/DirectXShaderCompiler/tools/clang/include/clang/Config/config.h.cmake config-headers/tools/clang/include/clang/Config/ 5 | 6 | mkdir -p config-headers/include/llvm/Config/ 7 | cp libs/DirectXShaderCompiler/include/llvm/Config/AsmParsers.def.in config-headers/include/llvm/Config/ 8 | cp libs/DirectXShaderCompiler/include/llvm/Config/Disassemblers.def.in config-headers/include/llvm/Config/ 9 | cp libs/DirectXShaderCompiler/include/llvm/Config/Targets.def.in config-headers/include/llvm/Config/ 10 | cp libs/DirectXShaderCompiler/include/llvm/Config/AsmPrinters.def.in config-headers/include/llvm/Config/ 11 | cp libs/DirectXShaderCompiler/include/llvm/Config/abi-breaking.h.cmake config-headers/include/llvm/Config/ 12 | cp libs/DirectXShaderCompiler/include/llvm/Config/config.h.cmake config-headers/include/llvm/Config/ 13 | cp libs/DirectXShaderCompiler/include/llvm/Config/llvm-config.h.cmake config-headers/include/llvm/Config/ 14 | 15 | mkdir -p config-headers/include/llvm/Support/ 16 | cp libs/DirectXShaderCompiler/include/llvm/Support/DataTypes.h.cmake config-headers/include/llvm/Support/ 17 | 18 | mkdir -p config-headers/include/dxc/ 19 | cp libs/DirectXShaderCompiler/include/dxc/config.h.cmake config-headers/include/dxc/ 20 | -------------------------------------------------------------------------------- /config-headers/tools/clang/include/clang/Config/config.h.cmake: -------------------------------------------------------------------------------- 1 | /* This generated file is for internal use. Do not include it from headers. */ 2 | 3 | #ifdef CONFIG_H 4 | #error config.h can only be included once 5 | #else 6 | #define CONFIG_H 7 | 8 | /* Bug report URL. */ 9 | #define BUG_REPORT_URL "${BUG_REPORT_URL}" 10 | 11 | /* Default OpenMP runtime used by -fopenmp. */ 12 | #define CLANG_DEFAULT_OPENMP_RUNTIME "${CLANG_DEFAULT_OPENMP_RUNTIME}" 13 | 14 | /* Multilib suffix for libdir. */ 15 | #define CLANG_LIBDIR_SUFFIX "${CLANG_LIBDIR_SUFFIX}" 16 | 17 | /* Relative directory for resource files */ 18 | #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}" 19 | 20 | /* Directories clang will search for headers */ 21 | #define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}" 22 | 23 | /* Default to all compiler invocations for --sysroot=. */ 24 | #define DEFAULT_SYSROOT "${DEFAULT_SYSROOT}" 25 | 26 | /* Directory where gcc is installed. */ 27 | #define GCC_INSTALL_PREFIX "${GCC_INSTALL_PREFIX}" 28 | 29 | /* Define if we have libxml2 */ 30 | #cmakedefine CLANG_HAVE_LIBXML ${CLANG_HAVE_LIBXML} 31 | 32 | /* The LLVM product name and version */ 33 | #define BACKEND_PACKAGE_STRING "${BACKEND_PACKAGE_STRING}" 34 | 35 | /* Linker version detected at compile time. */ 36 | #cmakedefine HOST_LINK_VERSION "${HOST_LINK_VERSION}" 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /generated-include/dxcversion.inc: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #ifdef RC_COMPANY_NAME 4 | #undef RC_COMPANY_NAME 5 | #endif 6 | #define RC_COMPANY_NAME "Microsoft(r) Corporation" 7 | 8 | #ifdef RC_VERSION_FIELD_1 9 | #undef RC_VERSION_FIELD_1 10 | #endif 11 | #define RC_VERSION_FIELD_1 1 12 | 13 | #ifdef RC_VERSION_FIELD_2 14 | #undef RC_VERSION_FIELD_2 15 | #endif 16 | #define RC_VERSION_FIELD_2 7 17 | 18 | #ifdef RC_VERSION_FIELD_3 19 | #undef RC_VERSION_FIELD_3 20 | #endif 21 | #define RC_VERSION_FIELD_3 2308 22 | 23 | #ifdef RC_VERSION_FIELD_4 24 | #undef RC_VERSION_FIELD_4 25 | #endif 26 | #define RC_VERSION_FIELD_4 0 27 | 28 | #ifdef RC_FILE_VERSION 29 | #undef RC_FILE_VERSION 30 | #endif 31 | #define RC_FILE_VERSION "1.7.2308.0" 32 | 33 | #ifdef RC_FILE_DESCRIPTION 34 | #undef RC_FILE_DESCRIPTION 35 | #endif 36 | #define RC_FILE_DESCRIPTION "DirectX Compiler - Out Of Band" 37 | 38 | #ifdef RC_COPYRIGHT 39 | #undef RC_COPYRIGHT 40 | #endif 41 | #define RC_COPYRIGHT "(c) Microsoft Corporation. All rights reserved." 42 | 43 | #ifdef RC_PRODUCT_NAME 44 | #undef RC_PRODUCT_NAME 45 | #endif 46 | #define RC_PRODUCT_NAME "Microsoft(r) DirectX for Windows(r) - Out Of Band" 47 | 48 | #ifdef RC_PRODUCT_VERSION 49 | #undef RC_PRODUCT_VERSION 50 | #endif 51 | #define RC_PRODUCT_VERSION "1.7.2308.0" 52 | 53 | #ifdef HLSL_TOOL_NAME 54 | #undef HLSL_TOOL_NAME 55 | #endif 56 | #define HLSL_TOOL_NAME "dxcoob" 57 | 58 | #ifdef HLSL_VERSION_MACRO 59 | #undef HLSL_VERSION_MACRO 60 | #endif 61 | #define HLSL_VERSION_MACRO HLSL_TOOL_NAME " " RC_FILE_VERSION 62 | 63 | #ifdef HLSL_LLVM_IDENT 64 | #undef HLSL_LLVM_IDENT 65 | #endif 66 | #define HLSL_LLVM_IDENT HLSL_TOOL_NAME " " RC_PRODUCT_VERSION 67 | -------------------------------------------------------------------------------- /config-headers/include/llvm/Config/abi-breaking.h.cmake: -------------------------------------------------------------------------------- 1 | /*===------- llvm/Config/abi-breaking.h - llvm configuration -------*- C -*-===*/ 2 | /* */ 3 | /* The LLVM Compiler Infrastructure */ 4 | /* */ 5 | /* This file is distributed under the University of Illinois Open Source */ 6 | /* License. See LICENSE.TXT for details. */ 7 | /* */ 8 | /*===----------------------------------------------------------------------===*/ 9 | 10 | /* This file controls the C++ ABI break introduced in LLVM public header. */ 11 | 12 | #ifndef LLVM_ABI_BREAKING_CHECKS_H 13 | #define LLVM_ABI_BREAKING_CHECKS_H 14 | 15 | /* Define to enable checks that alter the LLVM C++ ABI */ 16 | #cmakedefine01 LLVM_ENABLE_ABI_BREAKING_CHECKS 17 | 18 | // ABI_BREAKING_CHECKS protection: provides link-time failure when clients build 19 | // mismatch with LLVM 20 | #if defined(_MSC_VER) 21 | // Use pragma with MSVC 22 | #define LLVM_XSTR(s) LLVM_STR(s) 23 | #define LLVM_STR(s) #s 24 | #pragma detect_mismatch("LLVM_ENABLE_ABI_BREAKING_CHECKS", LLVM_XSTR(LLVM_ENABLE_ABI_BREAKING_CHECKS)) 25 | #undef LLVM_XSTR 26 | #undef LLVM_STR 27 | #elif defined(__cplusplus) 28 | namespace llvm { 29 | #if LLVM_ENABLE_ABI_BREAKING_CHECKS 30 | extern int EnableABIBreakingChecks; 31 | __attribute__((weak, visibility ("hidden"))) int *VerifyEnableABIBreakingChecks = &EnableABIBreakingChecks; 32 | #else 33 | extern int DisableABIBreakingChecks; 34 | __attribute__((weak, visibility ("hidden"))) int *VerifyDisableABIBreakingChecks = &DisableABIBreakingChecks; 35 | #endif 36 | } 37 | #endif // _MSC_VER 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mach-dxcompiler 2 | 3 | The DirectX shader compiler, built better. 4 | 5 | See ['Building the DirectX shader compiler better than Microsoft?'](https://devlog.hexops.com/2024/building-the-directx-shader-compiler-better-than-microsoft/) for details/background information. 6 | ## Experimental 7 | 8 | This is an **experimental** project according to [our stability guarantees](https://machengine.org/about/stability): 9 | 10 | > When a project has an experimental warning, it means all bets are off. You should carefully read the warning to understand why the project is experimental, and assume the worst. 11 | 12 | **Tracking issue:** https://github.com/hexops/mach/issues/1094 13 | 14 | ## Features 15 | 16 | * Statically linked `dxcompiler` library and `dxc` executables. 17 | * Zero dependency on proprietary `dxil.dll` code-signing blob (see: [Mach Siegbert Vogt DXCSA](https://github.com/hexops/DirectXShaderCompiler/blob/4190bb0c90d374c6b4d0b0f2c7b45b604eda24b6/tools/clang/tools/dxcompiler/MachSiegbertVogtDXCSA.cpp#L178)) 18 | * Built using `build.zig` instead of 10k+ LOC CMake build system. 19 | * [Prebuilt binaries](https://github.com/hexops/mach-dxcompiler/releases) provided for many OS/arch. 20 | * Binaries for macOS and aarch64 Linux (first ever in history), among others. 21 | * [Simple C API](https://github.com/hexops/mach-dxcompiler/blob/main/src/mach_dxc.h) bundled into library as an alternative to the traditional COM API. 22 | 23 | ## Documentation 24 | 25 | [machengine.org/pkg/mach-dxcompiler](https://machengine.org/pkg/mach-dxcompiler) 26 | 27 | ## Join the community 28 | 29 | Join the [Mach community on Discord](https://discord.gg/XNG3NZgCqp) to discuss this project, ask questions, get help, etc. 30 | 31 | ## Issues 32 | 33 | Issues are tracked in the [main Mach repository](https://github.com/hexops/mach/issues?q=is%3Aissue+is%3Aopen+label%3Adxcompiler). 34 | -------------------------------------------------------------------------------- /config-headers/include/llvm/Config/Targets.def.in: -------------------------------------------------------------------------------- 1 | /*===- llvm/Config/Targets.def - LLVM Target Architectures ------*- C++ -*-===*\ 2 | |* *| 3 | |* The LLVM Compiler Infrastructure *| 4 | |* *| 5 | |* This file is distributed under the University of Illinois Open Source *| 6 | |* License. See LICENSE.TXT for details. *| 7 | |* *| 8 | |*===----------------------------------------------------------------------===*| 9 | |* *| 10 | |* This file enumerates all of the target architectures supported by *| 11 | |* this build of LLVM. Clients of this file should define the *| 12 | |* LLVM_TARGET macro to be a function-like macro with a single *| 13 | |* parameter (the name of the target); including this file will then *| 14 | |* enumerate all of the targets. *| 15 | |* *| 16 | |* The set of targets supported by LLVM is generated at configuration *| 17 | |* time, at which point this header is generated. Do not modify this *| 18 | |* header directly. *| 19 | |* *| 20 | \*===----------------------------------------------------------------------===*/ 21 | 22 | #ifndef LLVM_TARGET 23 | # error Please define the macro LLVM_TARGET(TargetName) 24 | #endif 25 | 26 | @LLVM_ENUM_TARGETS@ 27 | 28 | #undef LLVM_TARGET 29 | -------------------------------------------------------------------------------- /config-headers/include/llvm/Config/AsmParsers.def.in: -------------------------------------------------------------------------------- 1 | /*===- llvm/Config/AsmParsers.def - LLVM Assembly Parsers -------*- C++ -*-===*\ 2 | |* *| 3 | |* The LLVM Compiler Infrastructure *| 4 | |* *| 5 | |* This file is distributed under the University of Illinois Open Source *| 6 | |* License. See LICENSE.TXT for details. *| 7 | |* *| 8 | |*===----------------------------------------------------------------------===*| 9 | |* *| 10 | |* This file enumerates all of the assembly-language parsers *| 11 | |* supported by this build of LLVM. Clients of this file should define *| 12 | |* the LLVM_ASM_PARSER macro to be a function-like macro with a *| 13 | |* single parameter (the name of the target whose assembly can be *| 14 | |* generated); including this file will then enumerate all of the *| 15 | |* targets with assembly parsers. *| 16 | |* *| 17 | |* The set of targets supported by LLVM is generated at configuration *| 18 | |* time, at which point this header is generated. Do not modify this *| 19 | |* header directly. *| 20 | |* *| 21 | \*===----------------------------------------------------------------------===*/ 22 | 23 | #ifndef LLVM_ASM_PARSER 24 | # error Please define the macro LLVM_ASM_PARSER(TargetName) 25 | #endif 26 | 27 | @LLVM_ENUM_ASM_PARSERS@ 28 | 29 | #undef LLVM_ASM_PARSER 30 | -------------------------------------------------------------------------------- /config-headers/include/llvm/Config/AsmPrinters.def.in: -------------------------------------------------------------------------------- 1 | /*===- llvm/Config/AsmPrinters.def - LLVM Assembly Printers -----*- C++ -*-===*\ 2 | |* *| 3 | |* The LLVM Compiler Infrastructure *| 4 | |* *| 5 | |* This file is distributed under the University of Illinois Open Source *| 6 | |* License. See LICENSE.TXT for details. *| 7 | |* *| 8 | |*===----------------------------------------------------------------------===*| 9 | |* *| 10 | |* This file enumerates all of the assembly-language printers *| 11 | |* supported by this build of LLVM. Clients of this file should define *| 12 | |* the LLVM_ASM_PRINTER macro to be a function-like macro with a *| 13 | |* single parameter (the name of the target whose assembly can be *| 14 | |* generated); including this file will then enumerate all of the *| 15 | |* targets with assembly printers. *| 16 | |* *| 17 | |* The set of targets supported by LLVM is generated at configuration *| 18 | |* time, at which point this header is generated. Do not modify this *| 19 | |* header directly. *| 20 | |* *| 21 | \*===----------------------------------------------------------------------===*/ 22 | 23 | #ifndef LLVM_ASM_PRINTER 24 | # error Please define the macro LLVM_ASM_PRINTER(TargetName) 25 | #endif 26 | 27 | @LLVM_ENUM_ASM_PRINTERS@ 28 | 29 | #undef LLVM_ASM_PRINTER 30 | -------------------------------------------------------------------------------- /config-headers/include/llvm/Config/Disassemblers.def.in: -------------------------------------------------------------------------------- 1 | /*===- llvm/Config/Disassemblers.def - LLVM Assembly Parsers ----*- C++ -*-===*\ 2 | |* *| 3 | |* The LLVM Compiler Infrastructure *| 4 | |* *| 5 | |* This file is distributed under the University of Illinois Open Source *| 6 | |* License. See LICENSE.TXT for details. *| 7 | |* *| 8 | |*===----------------------------------------------------------------------===*| 9 | |* *| 10 | |* This file enumerates all of the assembly-language parsers *| 11 | |* supported by this build of LLVM. Clients of this file should define *| 12 | |* the LLVM_DISASSEMBLER macro to be a function-like macro with a *| 13 | |* single parameter (the name of the target whose assembly can be *| 14 | |* generated); including this file will then enumerate all of the *| 15 | |* targets with assembly parsers. *| 16 | |* *| 17 | |* The set of targets supported by LLVM is generated at configuration *| 18 | |* time, at which point this header is generated. Do not modify this *| 19 | |* header directly. *| 20 | |* *| 21 | \*===----------------------------------------------------------------------===*/ 22 | 23 | #ifndef LLVM_DISASSEMBLER 24 | # error Please define the macro LLVM_DISASSEMBLER(TargetName) 25 | #endif 26 | 27 | @LLVM_ENUM_DISASSEMBLERS@ 28 | 29 | #undef LLVM_DISASSEMBLER 30 | -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | name: PR 2 | on: 3 | pull_request: 4 | types: [opened, synchronize, reopened] 5 | paths-ignore: 6 | - "**.md" 7 | jobs: 8 | all: 9 | strategy: 10 | matrix: 11 | target: [ 12 | 'x86_64-linux-gnu', 13 | 'x86_64-linux-musl', 14 | 'aarch64-linux-gnu', 15 | 'aarch64-linux-musl', 16 | 'x86_64-windows-gnu', 17 | 'aarch64-windows-gnu', 18 | 'x86_64-macos-none', 19 | 'aarch64-macos-none', 20 | ] 21 | optimize: [Debug, ReleaseFast] 22 | include: 23 | - target: 'x86_64-linux-gnu' 24 | cpu: '-Dcpu=x86_64_v2' 25 | - target: 'x86_64-linux-musl' 26 | cpu: '-Dcpu=x86_64_v2' 27 | - target: 'x86_64-windows-gnu' 28 | cpu: '-Dcpu=x86_64_v2' 29 | - target: 'x86_64-macos-none' 30 | cpu: '-Dcpu=x86_64_v2' 31 | runs-on: ubuntu-latest 32 | steps: 33 | - name: Checkout 34 | uses: actions/checkout@v3 35 | - name: Setup Zig 36 | run: | 37 | sudo apt install xz-utils 38 | sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.14.0-dev.2577+271452d22.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' 39 | - name: build 40 | run: zig build -Dfrom_source -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} ${{ matrix.cpu }} install dxc 41 | msvc: 42 | # TODO: re-enable required MSVC builds 43 | continue-on-error: true 44 | strategy: 45 | matrix: 46 | target: [ 47 | 'x86_64-windows-msvc', 48 | # TODO: 'machine type x64 conflicts with arm64' during linking (zig bug) 49 | # 'aarch64-windows-msvc', 50 | ] 51 | optimize: [Debug, ReleaseFast] 52 | include: 53 | - target: 'x86_64-windows-msvc' 54 | cpu: '-Dcpu=x86_64_v2' 55 | runs-on: windows-latest 56 | steps: 57 | - name: Checkout 58 | uses: actions/checkout@v3 59 | - name: Setup Zig 60 | run: | 61 | $ProgressPreference = 'SilentlyContinue' 62 | Invoke-WebRequest -Uri "https://pkg.machengine.org/zig/zig-windows-x86_64-0.14.0-dev.2577+271452d22.zip" -OutFile "C:\zig.zip" 63 | cd C:\ 64 | 7z x zig.zip 65 | Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.14.0-dev.2577+271452d22\" 66 | - name: build 67 | run: zig build -Dfrom_source -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} ${{ matrix.cpu }} install dxc 68 | -------------------------------------------------------------------------------- /msvc/roapi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file has no copyright assigned and is placed in the Public Domain. 3 | * This file is part of the mingw-w64 runtime package. 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 | */ 6 | #ifndef __ROAPI_H__ 7 | #define __ROAPI_H__ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | typedef enum RO_INIT_TYPE { 17 | #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 18 | RO_INIT_SINGLETHREADED = 0, 19 | #endif 20 | RO_INIT_MULTITHREADED = 1 21 | } RO_INIT_TYPE; 22 | 23 | typedef struct { } *RO_REGISTRATION_COOKIE; 24 | 25 | typedef HRESULT (WINAPI *PFNGETACTIVATIONFACTORY)(HSTRING, IActivationFactory **); 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | HRESULT WINAPI RoActivateInstance(HSTRING activatableClassId, IInspectable **instance); 32 | 33 | HRESULT WINAPI RoGetActivationFactory(HSTRING activatableClassId, REFIID iid, void **factory); 34 | 35 | HRESULT WINAPI RoGetApartmentIdentifier(UINT64 *apartmentIdentifier); 36 | 37 | HRESULT WINAPI RoInitialize(RO_INIT_TYPE initType); 38 | 39 | HRESULT WINAPI RoRegisterActivationFactories(HSTRING *activatableClassIds, PFNGETACTIVATIONFACTORY *activationFactoryCallbacks, UINT32 count, RO_REGISTRATION_COOKIE *cookie); 40 | 41 | void WINAPI RoRevokeActivationFactories(RO_REGISTRATION_COOKIE cookie); 42 | 43 | void WINAPI RoUninitialize(void); 44 | 45 | typedef interface IApartmentShutdown IApartmentShutdown; 46 | DECLARE_HANDLE (APARTMENT_SHUTDOWN_REGISTRATION_COOKIE); 47 | 48 | HRESULT WINAPI RoRegisterForApartmentShutdown (IApartmentShutdown *callbackObj, UINT64 *apartmentId, APARTMENT_SHUTDOWN_REGISTRATION_COOKIE *regCookie); 49 | 50 | HRESULT WINAPI RoUnregisterForApartmentShutdown (APARTMENT_SHUTDOWN_REGISTRATION_COOKIE regCookie); 51 | 52 | HRESULT WINAPI RoGetApartmentIdentifier (UINT64 *apartmentId); 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | 57 | namespace Windows { 58 | namespace Foundation { 59 | __inline HRESULT Initialize (RO_INIT_TYPE it 60 | #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 61 | = RO_INIT_SINGLETHREADED 62 | #endif 63 | ) { return RoInitialize (it); } 64 | __inline void Uninitialize () 65 | { RoUninitialize (); } 66 | 67 | template __inline HRESULT GetActivationFactory(HSTRING classid, T **factory) { 68 | return RoGetActivationFactory(classid, IID_INS_ARGS(factory)); 69 | } 70 | } 71 | } 72 | 73 | namespace ABI { 74 | namespace Windows { 75 | namespace Foundation { 76 | __inline HRESULT Initialze (RO_INIT_TYPE it 77 | #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP) 78 | = RO_INIT_SINGLETHREADED 79 | #endif 80 | ) { return RoInitialize (it); } 81 | __inline void Uninitialize () 82 | { RoUninitialize (); } 83 | } 84 | 85 | template __inline HRESULT GetActivationFactory(HSTRING classid, T **factory) { 86 | return RoGetActivationFactory(classid, IID_INS_ARGS(factory)); 87 | } 88 | } 89 | } 90 | 91 | #endif 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /generated-include/clang/AST/CommentHTMLTagsProperties.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* HTML tag properties *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | bool isHTMLEndTagOptional(StringRef Name) { 10 | switch (Name.size()) { 11 | default: break; 12 | case 1: // 1 string to match. 13 | if (Name[0] != 'p') 14 | break; 15 | return true; // "p" 16 | case 2: // 6 strings to match. 17 | switch (Name[0]) { 18 | default: break; 19 | case 'd': // 2 strings to match. 20 | switch (Name[1]) { 21 | default: break; 22 | case 'd': // 1 string to match. 23 | return true; // "dd" 24 | case 't': // 1 string to match. 25 | return true; // "dt" 26 | } 27 | break; 28 | case 'l': // 1 string to match. 29 | if (Name[1] != 'i') 30 | break; 31 | return true; // "li" 32 | case 't': // 3 strings to match. 33 | switch (Name[1]) { 34 | default: break; 35 | case 'd': // 1 string to match. 36 | return true; // "td" 37 | case 'h': // 1 string to match. 38 | return true; // "th" 39 | case 'r': // 1 string to match. 40 | return true; // "tr" 41 | } 42 | break; 43 | } 44 | break; 45 | case 5: // 3 strings to match. 46 | if (Name[0] != 't') 47 | break; 48 | switch (Name[1]) { 49 | default: break; 50 | case 'b': // 1 string to match. 51 | if (memcmp(Name.data()+2, "ody", 3)) 52 | break; 53 | return true; // "tbody" 54 | case 'f': // 1 string to match. 55 | if (memcmp(Name.data()+2, "oot", 3)) 56 | break; 57 | return true; // "tfoot" 58 | case 'h': // 1 string to match. 59 | if (memcmp(Name.data()+2, "ead", 3)) 60 | break; 61 | return true; // "thead" 62 | } 63 | break; 64 | case 8: // 1 string to match. 65 | if (memcmp(Name.data()+0, "colgroup", 8)) 66 | break; 67 | return true; // "colgroup" 68 | } 69 | return false; 70 | } 71 | 72 | bool isHTMLEndTagForbidden(StringRef Name) { 73 | switch (Name.size()) { 74 | default: break; 75 | case 2: // 2 strings to match. 76 | switch (Name[0]) { 77 | default: break; 78 | case 'b': // 1 string to match. 79 | if (Name[1] != 'r') 80 | break; 81 | return true; // "br" 82 | case 'h': // 1 string to match. 83 | if (Name[1] != 'r') 84 | break; 85 | return true; // "hr" 86 | } 87 | break; 88 | case 3: // 2 strings to match. 89 | switch (Name[0]) { 90 | default: break; 91 | case 'c': // 1 string to match. 92 | if (memcmp(Name.data()+1, "ol", 2)) 93 | break; 94 | return true; // "col" 95 | case 'i': // 1 string to match. 96 | if (memcmp(Name.data()+1, "mg", 2)) 97 | break; 98 | return true; // "img" 99 | } 100 | break; 101 | } 102 | return false; 103 | } 104 | 105 | -------------------------------------------------------------------------------- /src/main.zig: -------------------------------------------------------------------------------- 1 | const c = @cImport( 2 | @cInclude("mach_dxc.h"), 3 | ); 4 | 5 | pub const Compiler = struct { 6 | handle: c.MachDxcCompiler, 7 | 8 | pub fn init() Compiler { 9 | const handle = c.machDxcInit(); 10 | return .{ .handle = handle }; 11 | } 12 | 13 | pub fn deinit(compiler: Compiler) void { 14 | c.machDxcDeinit(compiler.handle); 15 | } 16 | 17 | pub fn compile(compiler: Compiler, code: []const u8, args: []const [*:0]const u8) Result { 18 | var options: c.MachDxcCompileOptions = .{ 19 | .code = code.ptr, 20 | .code_len = code.len, 21 | .args = args.ptr, 22 | .args_len = args.len, 23 | .include_callbacks = null, 24 | }; 25 | 26 | const result = c.machDxcCompile(compiler.handle, @ptrCast(&options)); 27 | return .{ .handle = result }; 28 | } 29 | 30 | pub const Result = struct { 31 | handle: c.MachDxcCompileResult, 32 | 33 | pub fn deinit(result: Result) void { 34 | c.machDxcCompileResultDeinit(result.handle); 35 | } 36 | 37 | pub fn getError(result: Result) ?Error { 38 | if (c.machDxcCompileResultGetError(result.handle)) |err| return .{ .handle = err }; 39 | return null; 40 | } 41 | 42 | pub fn getObject(result: Result) Object { 43 | return .{ .handle = c.machDxcCompileResultGetObject(result.handle) }; 44 | } 45 | 46 | pub const Error = struct { 47 | handle: c.MachDxcCompileError, 48 | 49 | pub fn deinit(err: Error) void { 50 | c.machDxcCompileErrorDeinit(err.handle); 51 | } 52 | 53 | pub fn getString(err: Error) []const u8 { 54 | return c.machDxcCompileErrorGetString(err.handle)[0..c.machDxcCompileErrorGetStringLength(err.handle)]; 55 | } 56 | }; 57 | 58 | pub const Object = struct { 59 | handle: c.MachDxcCompileObject, 60 | 61 | pub fn deinit(obj: Object) void { 62 | c.machDxcCompileObjectDeinit(obj.handle); 63 | } 64 | 65 | pub fn getBytes(obj: Object) []const u8 { 66 | return c.machDxcCompileObjectGetBytes(obj.handle)[0..c.machDxcCompileObjectGetBytesLength(obj.handle)]; 67 | } 68 | }; 69 | }; 70 | }; 71 | 72 | test { 73 | const std = @import("std"); 74 | 75 | const code = 76 | \\ Texture1D tex[5] : register(t3); 77 | \\ SamplerState SS[3] : register(s2); 78 | \\ 79 | \\ [RootSignature("DescriptorTable(SRV(t3, numDescriptors=5)), DescriptorTable(Sampler(s2, numDescriptors=3))")] 80 | \\ float4 main(int i : A, float j : B) : SV_TARGET 81 | \\ { 82 | \\ float4 r = tex[NonUniformResourceIndex(i)].Sample(SS[NonUniformResourceIndex(i)], i); 83 | \\ r += tex[NonUniformResourceIndex(j)].Sample(SS[i], j+2); 84 | \\ return r; 85 | \\ }; 86 | ; 87 | const args = &[_][*:0]const u8{ "-E", "main", "-T", "ps_6_0", "-D", "MYDEFINE=1", "-Qstrip_debug", "-Qstrip_reflect" }; 88 | 89 | const compiler = Compiler.init(); 90 | defer compiler.deinit(); 91 | 92 | const result = compiler.compile(code, args); 93 | if (result.getError()) |err| { 94 | defer err.deinit(); 95 | std.debug.print("compiler error: {s}\n", .{err.getString()}); 96 | return error.ShaderCompilationFailed; 97 | } 98 | 99 | const object = result.getObject(); 100 | defer object.deinit(); 101 | 102 | try std.testing.expectEqual(@as(usize, 2392), object.getBytes().len); 103 | } 104 | -------------------------------------------------------------------------------- /generated-include/clang/Parse/AttrParserStringSwitches.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* Parser-related llvm::StringSwitch cases *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | #if defined(CLANG_ATTR_ARG_CONTEXT_LIST) 10 | .Case("acquire_capability", true) 11 | .Case("acquire_shared_capability", true) 12 | .Case("exclusive_lock_function", true) 13 | .Case("shared_lock_function", true) 14 | .Case("acquired_after", true) 15 | .Case("acquired_before", true) 16 | .Case("assert_capability", true) 17 | .Case("assert_shared_capability", true) 18 | .Case("assert_exclusive_lock", true) 19 | .Case("assert_shared_lock", true) 20 | .Case("exclusive_trylock_function", true) 21 | .Case("guarded_by", true) 22 | .Case("lock_returned", true) 23 | .Case("locks_excluded", true) 24 | .Case("pt_guarded_by", true) 25 | .Case("release_capability", true) 26 | .Case("release_shared_capability", true) 27 | .Case("release_generic_capability", true) 28 | .Case("unlock_function", true) 29 | .Case("requires_capability", true) 30 | .Case("exclusive_locks_required", true) 31 | .Case("requires_shared_capability", true) 32 | .Case("shared_locks_required", true) 33 | .Case("shared_trylock_function", true) 34 | .Case("try_acquire_capability", true) 35 | .Case("try_acquire_shared_capability", true) 36 | #endif // CLANG_ATTR_ARG_CONTEXT_LIST 37 | 38 | #if defined(CLANG_ATTR_IDENTIFIER_ARG_LIST) 39 | .Case("interrupt", true) 40 | .Case("argument_with_type_tag", true) 41 | .Case("pointer_with_type_tag", true) 42 | .Case("availability", true) 43 | .Case("blocks", true) 44 | .Case("callable_when", true) 45 | .Case("consumable", true) 46 | .Case("format", true) 47 | .Case("loop", true) 48 | .Case("unroll", true) 49 | .Case("nounroll", true) 50 | .Case("mode", true) 51 | .Case("objc_bridge", true) 52 | .Case("objc_bridge_mutable", true) 53 | .Case("objc_bridge_related", true) 54 | .Case("objc_gc", true) 55 | .Case("objc_method_family", true) 56 | .Case("objc_ownership", true) 57 | .Case("ownership_holds", true) 58 | .Case("ownership_returns", true) 59 | .Case("ownership_takes", true) 60 | .Case("param_typestate", true) 61 | .Case("pcs", true) 62 | .Case("return_typestate", true) 63 | .Case("set_typestate", true) 64 | .Case("test_typestate", true) 65 | .Case("type_tag_for_datatype", true) 66 | .Case("type_visibility", true) 67 | .Case("image_format", true) 68 | .Case("visibility", true) 69 | #endif // CLANG_ATTR_IDENTIFIER_ARG_LIST 70 | 71 | #if defined(CLANG_ATTR_TYPE_ARG_LIST) 72 | .Case("iboutletcollection", true) 73 | .Case("vec_type_hint", true) 74 | #endif // CLANG_ATTR_TYPE_ARG_LIST 75 | 76 | #if defined(CLANG_ATTR_LATE_PARSED_LIST) 77 | .Case("acquire_capability", 1) 78 | .Case("acquire_shared_capability", 1) 79 | .Case("exclusive_lock_function", 1) 80 | .Case("shared_lock_function", 1) 81 | .Case("acquired_after", 1) 82 | .Case("acquired_before", 1) 83 | .Case("assert_capability", 1) 84 | .Case("assert_shared_capability", 1) 85 | .Case("assert_exclusive_lock", 1) 86 | .Case("assert_shared_lock", 1) 87 | .Case("exclusive_trylock_function", 1) 88 | .Case("guarded_by", 1) 89 | .Case("lock_returned", 1) 90 | .Case("locks_excluded", 1) 91 | .Case("pt_guarded_by", 1) 92 | .Case("release_capability", 1) 93 | .Case("release_shared_capability", 1) 94 | .Case("release_generic_capability", 1) 95 | .Case("unlock_function", 1) 96 | .Case("requires_capability", 1) 97 | .Case("exclusive_locks_required", 1) 98 | .Case("requires_shared_capability", 1) 99 | .Case("shared_locks_required", 1) 100 | .Case("shared_trylock_function", 1) 101 | .Case("try_acquire_capability", 1) 102 | .Case("try_acquire_shared_capability", 1) 103 | #endif // CLANG_ATTR_LATE_PARSED_LIST 104 | 105 | -------------------------------------------------------------------------------- /generated-include/clang/AST/CommentCommandList.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* A list of commands useable in documentation comments *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | #ifndef COMMENT_COMMAND 10 | # define COMMENT_COMMAND(NAME) 11 | #endif 12 | COMMENT_COMMAND(a) 13 | COMMENT_COMMAND(abstract) 14 | COMMENT_COMMAND(addtogroup) 15 | COMMENT_COMMAND(arg) 16 | COMMENT_COMMAND(attention) 17 | COMMENT_COMMAND(author) 18 | COMMENT_COMMAND(authors) 19 | COMMENT_COMMAND(b) 20 | COMMENT_COMMAND(brief) 21 | COMMENT_COMMAND(bug) 22 | COMMENT_COMMAND(c) 23 | COMMENT_COMMAND(callback) 24 | COMMENT_COMMAND(category) 25 | COMMENT_COMMAND(class) 26 | COMMENT_COMMAND(classdesign) 27 | COMMENT_COMMAND(coclass) 28 | COMMENT_COMMAND(code) 29 | COMMENT_COMMAND(endcode) 30 | COMMENT_COMMAND(const) 31 | COMMENT_COMMAND(constant) 32 | COMMENT_COMMAND(copyright) 33 | COMMENT_COMMAND(date) 34 | COMMENT_COMMAND(def) 35 | COMMENT_COMMAND(defgroup) 36 | COMMENT_COMMAND(dependency) 37 | COMMENT_COMMAND(deprecated) 38 | COMMENT_COMMAND(details) 39 | COMMENT_COMMAND(discussion) 40 | COMMENT_COMMAND(dot) 41 | COMMENT_COMMAND(enddot) 42 | COMMENT_COMMAND(e) 43 | COMMENT_COMMAND(em) 44 | COMMENT_COMMAND(enum) 45 | COMMENT_COMMAND(exception) 46 | COMMENT_COMMAND(flbrace) 47 | COMMENT_COMMAND(frbrace) 48 | COMMENT_COMMAND(flsquare) 49 | COMMENT_COMMAND(frsquare) 50 | COMMENT_COMMAND(fdollar) 51 | COMMENT_COMMAND(fn) 52 | COMMENT_COMMAND(function) 53 | COMMENT_COMMAND(functiongroup) 54 | COMMENT_COMMAND(headerfile) 55 | COMMENT_COMMAND(helper) 56 | COMMENT_COMMAND(helperclass) 57 | COMMENT_COMMAND(helps) 58 | COMMENT_COMMAND(htmlonly) 59 | COMMENT_COMMAND(endhtmlonly) 60 | COMMENT_COMMAND(ingroup) 61 | COMMENT_COMMAND(instancesize) 62 | COMMENT_COMMAND(interface) 63 | COMMENT_COMMAND(invariant) 64 | COMMENT_COMMAND(latexonly) 65 | COMMENT_COMMAND(endlatexonly) 66 | COMMENT_COMMAND(li) 67 | COMMENT_COMMAND(link) 68 | COMMENT_COMMAND(slashlink) 69 | COMMENT_COMMAND(mainpage) 70 | COMMENT_COMMAND(manonly) 71 | COMMENT_COMMAND(endmanonly) 72 | COMMENT_COMMAND(method) 73 | COMMENT_COMMAND(methodgroup) 74 | COMMENT_COMMAND(msc) 75 | COMMENT_COMMAND(endmsc) 76 | COMMENT_COMMAND(name) 77 | COMMENT_COMMAND(namespace) 78 | COMMENT_COMMAND(note) 79 | COMMENT_COMMAND(overload) 80 | COMMENT_COMMAND(ownership) 81 | COMMENT_COMMAND(p) 82 | COMMENT_COMMAND(par) 83 | COMMENT_COMMAND(paragraph) 84 | COMMENT_COMMAND(param) 85 | COMMENT_COMMAND(performance) 86 | COMMENT_COMMAND(post) 87 | COMMENT_COMMAND(pre) 88 | COMMENT_COMMAND(property) 89 | COMMENT_COMMAND(protocol) 90 | COMMENT_COMMAND(ref) 91 | COMMENT_COMMAND(related) 92 | COMMENT_COMMAND(relatedalso) 93 | COMMENT_COMMAND(relates) 94 | COMMENT_COMMAND(relatesalso) 95 | COMMENT_COMMAND(remark) 96 | COMMENT_COMMAND(remarks) 97 | COMMENT_COMMAND(result) 98 | COMMENT_COMMAND(return) 99 | COMMENT_COMMAND(returns) 100 | COMMENT_COMMAND(rtfonly) 101 | COMMENT_COMMAND(endrtfonly) 102 | COMMENT_COMMAND(sa) 103 | COMMENT_COMMAND(section) 104 | COMMENT_COMMAND(security) 105 | COMMENT_COMMAND(see) 106 | COMMENT_COMMAND(seealso) 107 | COMMENT_COMMAND(short) 108 | COMMENT_COMMAND(since) 109 | COMMENT_COMMAND(struct) 110 | COMMENT_COMMAND(subpage) 111 | COMMENT_COMMAND(subsection) 112 | COMMENT_COMMAND(subsubsection) 113 | COMMENT_COMMAND(superclass) 114 | COMMENT_COMMAND(template) 115 | COMMENT_COMMAND(templatefield) 116 | COMMENT_COMMAND(textblock) 117 | COMMENT_COMMAND(slashtextblock) 118 | COMMENT_COMMAND(throw) 119 | COMMENT_COMMAND(throws) 120 | COMMENT_COMMAND(todo) 121 | COMMENT_COMMAND(tparam) 122 | COMMENT_COMMAND(typedef) 123 | COMMENT_COMMAND(union) 124 | COMMENT_COMMAND(var) 125 | COMMENT_COMMAND(verbatim) 126 | COMMENT_COMMAND(endverbatim) 127 | COMMENT_COMMAND(version) 128 | COMMENT_COMMAND(warning) 129 | COMMENT_COMMAND(weakgroup) 130 | COMMENT_COMMAND(xmlonly) 131 | COMMENT_COMMAND(endxmlonly) 132 | -------------------------------------------------------------------------------- /config-headers/include/llvm/Config/llvm-config.h.cmake: -------------------------------------------------------------------------------- 1 | /*===------- llvm/Config/llvm-config.h - llvm configuration -------*- C -*-===*/ 2 | /* */ 3 | /* The LLVM Compiler Infrastructure */ 4 | /* */ 5 | /* This file is distributed under the University of Illinois Open Source */ 6 | /* License. See LICENSE.TXT for details. */ 7 | /* */ 8 | /*===----------------------------------------------------------------------===*/ 9 | 10 | /* This file enumerates variables from the LLVM configuration so that they 11 | can be in exported headers and won't override package specific directives. 12 | This is a C header that can be included in the llvm-c headers. */ 13 | 14 | #ifndef LLVM_CONFIG_H 15 | #define LLVM_CONFIG_H 16 | 17 | /* Installation directory for binary executables */ 18 | #cmakedefine LLVM_BINDIR "${LLVM_BINDIR}" 19 | 20 | /* Time at which LLVM was configured */ 21 | #cmakedefine LLVM_CONFIGTIME "${LLVM_CONFIGTIME}" 22 | 23 | /* Installation directory for data files */ 24 | #cmakedefine LLVM_DATADIR "${LLVM_DATADIR}" 25 | 26 | /* Target triple LLVM will generate code for by default */ 27 | #cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}" 28 | 29 | /* Installation directory for documentation */ 30 | #cmakedefine LLVM_DOCSDIR "${LLVM_DOCSDIR}" 31 | 32 | /* Define if threads enabled */ 33 | #cmakedefine01 LLVM_ENABLE_THREADS 34 | 35 | /* Installation directory for config files */ 36 | #cmakedefine LLVM_ETCDIR "${LLVM_ETCDIR}" 37 | 38 | /* Has gcc/MSVC atomic intrinsics */ 39 | #cmakedefine01 LLVM_HAS_ATOMICS 40 | 41 | /* Host triple LLVM will be executed on */ 42 | #cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}" 43 | 44 | /* Installation directory for include files */ 45 | #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}" 46 | 47 | /* Installation directory for .info files */ 48 | #cmakedefine LLVM_INFODIR "${LLVM_INFODIR}" 49 | 50 | /* Installation directory for man pages */ 51 | #cmakedefine LLVM_MANDIR "${LLVM_MANDIR}" 52 | 53 | /* LLVM architecture name for the native architecture, if available */ 54 | #cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH} 55 | 56 | /* LLVM name for the native AsmParser init function, if available */ 57 | #cmakedefine LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser 58 | 59 | /* LLVM name for the native AsmPrinter init function, if available */ 60 | #cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter 61 | 62 | /* LLVM name for the native Disassembler init function, if available */ 63 | #cmakedefine LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}Disassembler 64 | 65 | /* LLVM name for the native Target init function, if available */ 66 | #cmakedefine LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target 67 | 68 | /* LLVM name for the native TargetInfo init function, if available */ 69 | #cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo 70 | 71 | /* LLVM name for the native target MC init function, if available */ 72 | #cmakedefine LLVM_NATIVE_TARGETMC LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC 73 | 74 | /* Define if this is Unixish platform */ 75 | #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX} 76 | 77 | /* Define if this is Win32ish platform */ 78 | #cmakedefine LLVM_ON_WIN32 ${LLVM_ON_WIN32} 79 | 80 | /* Installation prefix directory */ 81 | #cmakedefine LLVM_PREFIX "${LLVM_PREFIX}" 82 | 83 | /* Define if we have the Intel JIT API runtime support library */ 84 | #cmakedefine LLVM_USE_INTEL_JITEVENTS 1 85 | 86 | /* Define if we have the oprofile JIT-support library */ 87 | #cmakedefine LLVM_USE_OPROFILE 1 88 | 89 | /* Major version of the LLVM API */ 90 | #define LLVM_VERSION_MAJOR ${LLVM_VERSION_MAJOR} 91 | 92 | /* Minor version of the LLVM API */ 93 | #define LLVM_VERSION_MINOR ${LLVM_VERSION_MINOR} 94 | 95 | /* Patch version of the LLVM API */ 96 | #define LLVM_VERSION_PATCH ${LLVM_VERSION_PATCH} 97 | 98 | /* LLVM version string */ 99 | #define LLVM_VERSION_STRING "${PACKAGE_VERSION}" 100 | 101 | /* Define if we link Polly to the tools */ 102 | #cmakedefine LINK_POLLY_INTO_TOOLS 103 | 104 | #endif 105 | -------------------------------------------------------------------------------- /generated-include/clang/AST/CommentNodes.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* List of AST nodes of a particular kind *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | #ifndef ABSTRACT_COMMENT 10 | # define ABSTRACT_COMMENT(Type) Type 11 | #endif 12 | #ifndef COMMENT_RANGE 13 | # define COMMENT_RANGE(Base, First, Last) 14 | #endif 15 | 16 | #ifndef LAST_COMMENT_RANGE 17 | # define LAST_COMMENT_RANGE(Base, First, Last) COMMENT_RANGE(Base, First, Last) 18 | #endif 19 | 20 | #ifndef BLOCKCONTENTCOMMENT 21 | # define BLOCKCONTENTCOMMENT(Type, Base) COMMENT(Type, Base) 22 | #endif 23 | ABSTRACT_COMMENT(BLOCKCONTENTCOMMENT(BlockContentComment, Comment)) 24 | #ifndef BLOCKCOMMANDCOMMENT 25 | # define BLOCKCOMMANDCOMMENT(Type, Base) BLOCKCONTENTCOMMENT(Type, Base) 26 | #endif 27 | BLOCKCOMMANDCOMMENT(BlockCommandComment, BlockContentComment) 28 | #ifndef PARAMCOMMANDCOMMENT 29 | # define PARAMCOMMANDCOMMENT(Type, Base) BLOCKCOMMANDCOMMENT(Type, Base) 30 | #endif 31 | PARAMCOMMANDCOMMENT(ParamCommandComment, BlockCommandComment) 32 | #undef PARAMCOMMANDCOMMENT 33 | 34 | #ifndef TPARAMCOMMANDCOMMENT 35 | # define TPARAMCOMMANDCOMMENT(Type, Base) BLOCKCOMMANDCOMMENT(Type, Base) 36 | #endif 37 | TPARAMCOMMANDCOMMENT(TParamCommandComment, BlockCommandComment) 38 | #undef TPARAMCOMMANDCOMMENT 39 | 40 | #ifndef VERBATIMBLOCKCOMMENT 41 | # define VERBATIMBLOCKCOMMENT(Type, Base) BLOCKCOMMANDCOMMENT(Type, Base) 42 | #endif 43 | VERBATIMBLOCKCOMMENT(VerbatimBlockComment, BlockCommandComment) 44 | #undef VERBATIMBLOCKCOMMENT 45 | 46 | #ifndef VERBATIMLINECOMMENT 47 | # define VERBATIMLINECOMMENT(Type, Base) BLOCKCOMMANDCOMMENT(Type, Base) 48 | #endif 49 | VERBATIMLINECOMMENT(VerbatimLineComment, BlockCommandComment) 50 | #undef VERBATIMLINECOMMENT 51 | 52 | COMMENT_RANGE(BlockCommandComment, BlockCommandComment, VerbatimLineComment) 53 | 54 | #undef BLOCKCOMMANDCOMMENT 55 | 56 | #ifndef PARAGRAPHCOMMENT 57 | # define PARAGRAPHCOMMENT(Type, Base) BLOCKCONTENTCOMMENT(Type, Base) 58 | #endif 59 | PARAGRAPHCOMMENT(ParagraphComment, BlockContentComment) 60 | #undef PARAGRAPHCOMMENT 61 | 62 | COMMENT_RANGE(BlockContentComment, BlockCommandComment, ParagraphComment) 63 | 64 | #undef BLOCKCONTENTCOMMENT 65 | 66 | #ifndef FULLCOMMENT 67 | # define FULLCOMMENT(Type, Base) COMMENT(Type, Base) 68 | #endif 69 | FULLCOMMENT(FullComment, Comment) 70 | #undef FULLCOMMENT 71 | 72 | #ifndef INLINECONTENTCOMMENT 73 | # define INLINECONTENTCOMMENT(Type, Base) COMMENT(Type, Base) 74 | #endif 75 | ABSTRACT_COMMENT(INLINECONTENTCOMMENT(InlineContentComment, Comment)) 76 | #ifndef HTMLTAGCOMMENT 77 | # define HTMLTAGCOMMENT(Type, Base) INLINECONTENTCOMMENT(Type, Base) 78 | #endif 79 | ABSTRACT_COMMENT(HTMLTAGCOMMENT(HTMLTagComment, InlineContentComment)) 80 | #ifndef HTMLENDTAGCOMMENT 81 | # define HTMLENDTAGCOMMENT(Type, Base) HTMLTAGCOMMENT(Type, Base) 82 | #endif 83 | HTMLENDTAGCOMMENT(HTMLEndTagComment, HTMLTagComment) 84 | #undef HTMLENDTAGCOMMENT 85 | 86 | #ifndef HTMLSTARTTAGCOMMENT 87 | # define HTMLSTARTTAGCOMMENT(Type, Base) HTMLTAGCOMMENT(Type, Base) 88 | #endif 89 | HTMLSTARTTAGCOMMENT(HTMLStartTagComment, HTMLTagComment) 90 | #undef HTMLSTARTTAGCOMMENT 91 | 92 | COMMENT_RANGE(HTMLTagComment, HTMLEndTagComment, HTMLStartTagComment) 93 | 94 | #undef HTMLTAGCOMMENT 95 | 96 | #ifndef INLINECOMMANDCOMMENT 97 | # define INLINECOMMANDCOMMENT(Type, Base) INLINECONTENTCOMMENT(Type, Base) 98 | #endif 99 | INLINECOMMANDCOMMENT(InlineCommandComment, InlineContentComment) 100 | #undef INLINECOMMANDCOMMENT 101 | 102 | #ifndef TEXTCOMMENT 103 | # define TEXTCOMMENT(Type, Base) INLINECONTENTCOMMENT(Type, Base) 104 | #endif 105 | TEXTCOMMENT(TextComment, InlineContentComment) 106 | #undef TEXTCOMMENT 107 | 108 | COMMENT_RANGE(InlineContentComment, HTMLEndTagComment, TextComment) 109 | 110 | #undef INLINECONTENTCOMMENT 111 | 112 | #ifndef VERBATIMBLOCKLINECOMMENT 113 | # define VERBATIMBLOCKLINECOMMENT(Type, Base) COMMENT(Type, Base) 114 | #endif 115 | VERBATIMBLOCKLINECOMMENT(VerbatimBlockLineComment, Comment) 116 | #undef VERBATIMBLOCKLINECOMMENT 117 | 118 | LAST_COMMENT_RANGE(Comment, BlockCommandComment, VerbatimBlockLineComment) 119 | 120 | #undef COMMENT 121 | #undef COMMENT_RANGE 122 | #undef LAST_COMMENT_RANGE 123 | #undef ABSTRACT_COMMENT 124 | -------------------------------------------------------------------------------- /src/mach_dxc.h: -------------------------------------------------------------------------------- 1 | #ifndef MACH_DXC_H_ 2 | #define MACH_DXC_H_ 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #if defined(MACH_DXC_C_SHARED_LIBRARY) 9 | # if defined(_WIN32) 10 | # if defined(MACH_DXC_C_IMPLEMENTATION) 11 | # define MACH_EXPORT __declspec(dllexport) 12 | # else 13 | # define MACH_EXPORT __declspec(dllimport) 14 | # endif 15 | # else // defined(_WIN32) 16 | # if defined(MACH_DXC_C_IMPLEMENTATION) 17 | # define MACH_EXPORT __attribute__((visibility("default"))) 18 | # else 19 | # define MACH_EXPORT 20 | # endif 21 | # endif // defined(_WIN32) 22 | #else // defined(MACH_DXC_C_SHARED_LIBRARY) 23 | # define MACH_EXPORT 24 | #endif // defined(MACH_DXC_C_SHARED_LIBRARY) 25 | 26 | #if !defined(MACH_OBJECT_ATTRIBUTE) 27 | #define MACH_OBJECT_ATTRIBUTE 28 | #endif 29 | 30 | #include 31 | 32 | typedef struct MachDxcCompilerImpl* MachDxcCompiler MACH_OBJECT_ATTRIBUTE; 33 | typedef struct MachDxcCompileResultImpl* MachDxcCompileResult MACH_OBJECT_ATTRIBUTE; 34 | typedef struct MachDxcCompileErrorImpl* MachDxcCompileError MACH_OBJECT_ATTRIBUTE; 35 | typedef struct MachDxcCompileObjectImpl* MachDxcCompileObject MACH_OBJECT_ATTRIBUTE; 36 | 37 | 38 | typedef struct MachDxcIncludeResult { 39 | const char* header_data; // UTF-8 or null 40 | size_t header_length; 41 | } MachDxcIncludeResult; 42 | 43 | typedef MachDxcIncludeResult* (*MachDxcIncludeFunc)(void* ctx, const char* header_name); 44 | 45 | typedef int (*MachDxcFreeIncludeFunc)(void* ctx, MachDxcIncludeResult* result); 46 | 47 | typedef struct MachDxcIncludeCallbacks { 48 | void* include_ctx; 49 | MachDxcIncludeFunc include_func; 50 | MachDxcFreeIncludeFunc free_func; 51 | } MachDxcIncludeCallbacks; 52 | 53 | 54 | typedef struct MachDxcCompileOptions { 55 | // Required 56 | char const* code; 57 | size_t code_len; 58 | char const* const* args; 59 | size_t args_len; 60 | 61 | // Optional 62 | MachDxcIncludeCallbacks* include_callbacks; // nullable 63 | } MachDxcCompileOptions; 64 | 65 | 66 | //---------------- 67 | // MachDxcCompiler 68 | //---------------- 69 | 70 | /// Initializes a DXC compiler 71 | /// 72 | /// Invoke machDxcDeinit when done with the compiler. 73 | MACH_EXPORT MachDxcCompiler machDxcInit(); 74 | 75 | /// Deinitializes the DXC compiler. 76 | MACH_EXPORT void machDxcDeinit(MachDxcCompiler compiler); 77 | 78 | //--------------------- 79 | // MachDxcCompileResult 80 | //--------------------- 81 | 82 | /// Compiles the given code with the given dxc.exe CLI arguments 83 | /// 84 | /// Invoke machDxcCompileResultDeinit when done with the result. 85 | MACH_EXPORT MachDxcCompileResult machDxcCompile( 86 | MachDxcCompiler compiler, 87 | MachDxcCompileOptions* options 88 | ); 89 | 90 | /// Returns an error object, or null in the case of success. 91 | /// 92 | /// Invoke machDxcCompileErrorDeinit when done with the error, iff it was non-null. 93 | MACH_EXPORT MachDxcCompileError machDxcCompileResultGetError(MachDxcCompileResult err); 94 | 95 | /// Returns the compiled object code, or null if an error occurred. 96 | MACH_EXPORT MachDxcCompileObject machDxcCompileResultGetObject(MachDxcCompileResult err); 97 | 98 | /// Deinitializes the DXC compiler. 99 | MACH_EXPORT void machDxcCompileResultDeinit(MachDxcCompileResult err); 100 | 101 | //--------------------- 102 | // MachDxcCompileObject 103 | //--------------------- 104 | 105 | /// Returns a pointer to the raw bytes of the compiled object file. 106 | MACH_EXPORT char const* machDxcCompileObjectGetBytes(MachDxcCompileObject err); 107 | 108 | /// Returns the length of the compiled object file. 109 | MACH_EXPORT size_t machDxcCompileObjectGetBytesLength(MachDxcCompileObject err); 110 | 111 | /// Deinitializes the compiled object, calling Get methods after this is illegal. 112 | MACH_EXPORT void machDxcCompileObjectDeinit(MachDxcCompileObject err); 113 | 114 | //-------------------- 115 | // MachDxcCompileError 116 | //-------------------- 117 | 118 | /// Returns a pointer to the null-terminated UTF-8 encoded error string. This includes 119 | /// compiler warnings, unless they were disabled in the compile arguments. 120 | MACH_EXPORT char const* machDxcCompileErrorGetString(MachDxcCompileError err); 121 | 122 | /// Returns the length of the error string. 123 | MACH_EXPORT size_t machDxcCompileErrorGetStringLength(MachDxcCompileError err); 124 | 125 | /// Deinitializes the error, calling Get methods after this is illegal. 126 | MACH_EXPORT void machDxcCompileErrorDeinit(MachDxcCompileError err); 127 | 128 | #ifdef __cplusplus 129 | } // extern "C" 130 | #endif 131 | 132 | #endif // MACH_DXC_H_ 133 | -------------------------------------------------------------------------------- /config-headers/include/llvm/Support/DataTypes.h.cmake: -------------------------------------------------------------------------------- 1 | /*===-- include/Support/DataTypes.h - Define fixed size types -----*- C -*-===*\ 2 | |* *| 3 | |* The LLVM Compiler Infrastructure *| 4 | |* *| 5 | |* This file is distributed under the University of Illinois Open Source *| 6 | |* License. See LICENSE.TXT for details. *| 7 | |* *| 8 | |*===----------------------------------------------------------------------===*| 9 | |* *| 10 | |* This file contains definitions to figure out the size of _HOST_ data types.*| 11 | |* This file is important because different host OS's define different macros,*| 12 | |* which makes portability tough. This file exports the following *| 13 | |* definitions: *| 14 | |* *| 15 | |* [u]int(32|64)_t : typedefs for signed and unsigned 32/64 bit system types*| 16 | |* [U]INT(8|16|32|64)_(MIN|MAX) : Constants for the min and max values. *| 17 | |* *| 18 | |* No library is required when using these functions. *| 19 | |* *| 20 | |*===----------------------------------------------------------------------===*/ 21 | 22 | /* Please leave this file C-compatible. */ 23 | 24 | /* Please keep this file in sync with DataTypes.h.in */ 25 | 26 | #ifndef SUPPORT_DATATYPES_H 27 | #define SUPPORT_DATATYPES_H 28 | 29 | #cmakedefine HAVE_INTTYPES_H ${HAVE_INTTYPES_H} 30 | #cmakedefine HAVE_STDINT_H ${HAVE_STDINT_H} 31 | #cmakedefine HAVE_UINT64_T ${HAVE_UINT64_T} 32 | #cmakedefine HAVE_U_INT64_T ${HAVE_U_INT64_T} 33 | 34 | #ifdef __cplusplus 35 | #include 36 | #else 37 | #include 38 | #endif 39 | 40 | #ifdef HAVE_INTTYPES_H 41 | #include 42 | #endif 43 | 44 | #ifdef HAVE_STDINT_H 45 | #include 46 | #else 47 | #error "Compiler must provide an implementation of stdint.h" 48 | #endif 49 | 50 | #ifndef _MSC_VER 51 | 52 | /* Note that this header's correct operation depends on __STDC_LIMIT_MACROS 53 | being defined. We would define it here, but in order to prevent Bad Things 54 | happening when system headers or C++ STL headers include stdint.h before we 55 | define it here, we define it on the g++ command line (in Makefile.rules). */ 56 | #if !defined(__STDC_LIMIT_MACROS) 57 | # error "Must #define __STDC_LIMIT_MACROS before #including Support/DataTypes.h" 58 | #endif 59 | 60 | #if !defined(__STDC_CONSTANT_MACROS) 61 | # error "Must #define __STDC_CONSTANT_MACROS before " \ 62 | "#including Support/DataTypes.h" 63 | #endif 64 | 65 | /* Note that includes , if this is a C99 system. */ 66 | #include 67 | 68 | #ifdef _AIX 69 | #include "llvm/Support/AIXDataTypesFix.h" 70 | #endif 71 | 72 | /* Handle incorrect definition of uint64_t as u_int64_t */ 73 | #ifndef HAVE_UINT64_T 74 | #ifdef HAVE_U_INT64_T 75 | typedef u_int64_t uint64_t; 76 | #else 77 | # error "Don't have a definition for uint64_t on this platform" 78 | #endif 79 | #endif 80 | 81 | #else /* _MSC_VER */ 82 | #include 83 | #include 84 | #include 85 | #ifdef __cplusplus 86 | #include 87 | #else 88 | #include 89 | #endif 90 | 91 | #if defined(_WIN64) 92 | typedef signed __int64 ssize_t; 93 | #else 94 | typedef signed int ssize_t; 95 | #endif /* _WIN64 */ 96 | 97 | #ifndef HAVE_INTTYPES_H 98 | #define PRId64 "I64d" 99 | #define PRIi64 "I64i" 100 | #define PRIo64 "I64o" 101 | #define PRIu64 "I64u" 102 | #define PRIx64 "I64x" 103 | #define PRIX64 "I64X" 104 | 105 | #define PRId32 "d" 106 | #define PRIi32 "i" 107 | #define PRIo32 "o" 108 | #define PRIu32 "u" 109 | #define PRIx32 "x" 110 | #define PRIX32 "X" 111 | #endif /* HAVE_INTTYPES_H */ 112 | 113 | #endif /* _MSC_VER */ 114 | 115 | /* Set defaults for constants which we cannot find. */ 116 | #if !defined(INT64_MAX) 117 | # define INT64_MAX 9223372036854775807LL 118 | #endif 119 | #if !defined(INT64_MIN) 120 | # define INT64_MIN ((-INT64_MAX)-1) 121 | #endif 122 | #if !defined(UINT64_MAX) 123 | # define UINT64_MAX 0xffffffffffffffffULL 124 | #endif 125 | 126 | #ifndef HUGE_VALF 127 | #define HUGE_VALF (float)HUGE_VAL 128 | #endif 129 | 130 | #endif /* SUPPORT_DATATYPES_H */ 131 | -------------------------------------------------------------------------------- /msvc/activation.h: -------------------------------------------------------------------------------- 1 | /*** Autogenerated by WIDL 7.0 from include/activation.idl - Do not edit ***/ 2 | 3 | #ifdef _WIN32 4 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 5 | #define __REQUIRED_RPCNDR_H_VERSION__ 475 6 | #endif 7 | #include 8 | #include 9 | #endif 10 | 11 | #ifndef COM_NO_WINDOWS_H 12 | #include 13 | #include 14 | #endif 15 | 16 | #ifndef __activation_h__ 17 | #define __activation_h__ 18 | 19 | /* Forward declarations */ 20 | 21 | #ifndef __IActivationFactory_FWD_DEFINED__ 22 | #define __IActivationFactory_FWD_DEFINED__ 23 | typedef interface IActivationFactory IActivationFactory; 24 | #ifdef __cplusplus 25 | interface IActivationFactory; 26 | #endif /* __cplusplus */ 27 | #endif 28 | 29 | /* Headers for imported files */ 30 | 31 | #include 32 | 33 | #ifdef __cplusplus 34 | extern "C" { 35 | #endif 36 | 37 | /***************************************************************************** 38 | * IActivationFactory interface 39 | */ 40 | #ifndef __IActivationFactory_INTERFACE_DEFINED__ 41 | #define __IActivationFactory_INTERFACE_DEFINED__ 42 | 43 | DEFINE_GUID(IID_IActivationFactory, 0x00000035, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46); 44 | #if defined(__cplusplus) && !defined(CINTERFACE) 45 | MIDL_INTERFACE("00000035-0000-0000-c000-000000000046") 46 | IActivationFactory : public IInspectable 47 | { 48 | virtual HRESULT STDMETHODCALLTYPE ActivateInstance( 49 | IInspectable **instance) = 0; 50 | 51 | }; 52 | #ifdef __CRT_UUID_DECL 53 | __CRT_UUID_DECL(IActivationFactory, 0x00000035, 0x0000, 0x0000, 0xc0,0x00, 0x00,0x00,0x00,0x00,0x00,0x46) 54 | #endif 55 | #else 56 | typedef struct IActivationFactoryVtbl { 57 | BEGIN_INTERFACE 58 | 59 | /*** IUnknown methods ***/ 60 | HRESULT (STDMETHODCALLTYPE *QueryInterface)( 61 | IActivationFactory *This, 62 | REFIID riid, 63 | void **ppvObject); 64 | 65 | ULONG (STDMETHODCALLTYPE *AddRef)( 66 | IActivationFactory *This); 67 | 68 | ULONG (STDMETHODCALLTYPE *Release)( 69 | IActivationFactory *This); 70 | 71 | /*** IInspectable methods ***/ 72 | HRESULT (STDMETHODCALLTYPE *GetIids)( 73 | IActivationFactory *This, 74 | ULONG *iidCount, 75 | IID **iids); 76 | 77 | HRESULT (STDMETHODCALLTYPE *GetRuntimeClassName)( 78 | IActivationFactory *This, 79 | HSTRING *className); 80 | 81 | HRESULT (STDMETHODCALLTYPE *GetTrustLevel)( 82 | IActivationFactory *This, 83 | TrustLevel *trustLevel); 84 | 85 | /*** IActivationFactory methods ***/ 86 | HRESULT (STDMETHODCALLTYPE *ActivateInstance)( 87 | IActivationFactory *This, 88 | IInspectable **instance); 89 | 90 | END_INTERFACE 91 | } IActivationFactoryVtbl; 92 | 93 | interface IActivationFactory { 94 | CONST_VTBL IActivationFactoryVtbl* lpVtbl; 95 | }; 96 | 97 | #ifdef COBJMACROS 98 | #ifndef WIDL_C_INLINE_WRAPPERS 99 | /*** IUnknown methods ***/ 100 | #define IActivationFactory_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 101 | #define IActivationFactory_AddRef(This) (This)->lpVtbl->AddRef(This) 102 | #define IActivationFactory_Release(This) (This)->lpVtbl->Release(This) 103 | /*** IInspectable methods ***/ 104 | #define IActivationFactory_GetIids(This,iidCount,iids) (This)->lpVtbl->GetIids(This,iidCount,iids) 105 | #define IActivationFactory_GetRuntimeClassName(This,className) (This)->lpVtbl->GetRuntimeClassName(This,className) 106 | #define IActivationFactory_GetTrustLevel(This,trustLevel) (This)->lpVtbl->GetTrustLevel(This,trustLevel) 107 | /*** IActivationFactory methods ***/ 108 | #define IActivationFactory_ActivateInstance(This,instance) (This)->lpVtbl->ActivateInstance(This,instance) 109 | #else 110 | /*** IUnknown methods ***/ 111 | static FORCEINLINE HRESULT IActivationFactory_QueryInterface(IActivationFactory* This,REFIID riid,void **ppvObject) { 112 | return This->lpVtbl->QueryInterface(This,riid,ppvObject); 113 | } 114 | static FORCEINLINE ULONG IActivationFactory_AddRef(IActivationFactory* This) { 115 | return This->lpVtbl->AddRef(This); 116 | } 117 | static FORCEINLINE ULONG IActivationFactory_Release(IActivationFactory* This) { 118 | return This->lpVtbl->Release(This); 119 | } 120 | /*** IInspectable methods ***/ 121 | static FORCEINLINE HRESULT IActivationFactory_GetIids(IActivationFactory* This,ULONG *iidCount,IID **iids) { 122 | return This->lpVtbl->GetIids(This,iidCount,iids); 123 | } 124 | static FORCEINLINE HRESULT IActivationFactory_GetRuntimeClassName(IActivationFactory* This,HSTRING *className) { 125 | return This->lpVtbl->GetRuntimeClassName(This,className); 126 | } 127 | static FORCEINLINE HRESULT IActivationFactory_GetTrustLevel(IActivationFactory* This,TrustLevel *trustLevel) { 128 | return This->lpVtbl->GetTrustLevel(This,trustLevel); 129 | } 130 | /*** IActivationFactory methods ***/ 131 | static FORCEINLINE HRESULT IActivationFactory_ActivateInstance(IActivationFactory* This,IInspectable **instance) { 132 | return This->lpVtbl->ActivateInstance(This,instance); 133 | } 134 | #endif 135 | #endif 136 | 137 | #endif 138 | 139 | 140 | #endif /* __IActivationFactory_INTERFACE_DEFINED__ */ 141 | 142 | /* Begin additional prototypes for all interfaces */ 143 | 144 | 145 | /* End additional prototypes */ 146 | 147 | #ifdef __cplusplus 148 | } 149 | #endif 150 | 151 | #endif /* __activation_h__ */ 152 | -------------------------------------------------------------------------------- /msvc/inspectable.h: -------------------------------------------------------------------------------- 1 | /*** Autogenerated by WIDL 7.0 from include/inspectable.idl - Do not edit ***/ 2 | 3 | #ifdef _WIN32 4 | #ifndef __REQUIRED_RPCNDR_H_VERSION__ 5 | #define __REQUIRED_RPCNDR_H_VERSION__ 475 6 | #endif 7 | #include 8 | #include 9 | #endif 10 | 11 | #ifndef COM_NO_WINDOWS_H 12 | #include 13 | #include 14 | #endif 15 | 16 | #ifndef __inspectable_h__ 17 | #define __inspectable_h__ 18 | 19 | /* Forward declarations */ 20 | 21 | #ifndef __IInspectable_FWD_DEFINED__ 22 | #define __IInspectable_FWD_DEFINED__ 23 | typedef interface IInspectable IInspectable; 24 | #ifdef __cplusplus 25 | interface IInspectable; 26 | #endif /* __cplusplus */ 27 | #endif 28 | 29 | /* Headers for imported files */ 30 | 31 | #include 32 | #include 33 | #include 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | typedef enum TrustLevel { 40 | BaseTrust = 0, 41 | PartialTrust = 1, 42 | FullTrust = 2 43 | } TrustLevel; 44 | /***************************************************************************** 45 | * IInspectable interface 46 | */ 47 | #ifndef __IInspectable_INTERFACE_DEFINED__ 48 | #define __IInspectable_INTERFACE_DEFINED__ 49 | 50 | DEFINE_GUID(IID_IInspectable, 0xaf86e2e0, 0xb12d, 0x4c6a, 0x9c,0x5a, 0xd7,0xaa,0x65,0x10,0x1e,0x90); 51 | #if defined(__cplusplus) && !defined(CINTERFACE) 52 | MIDL_INTERFACE("af86e2e0-b12d-4c6a-9c5a-d7aa65101e90") 53 | IInspectable : public IUnknown 54 | { 55 | virtual HRESULT STDMETHODCALLTYPE GetIids( 56 | ULONG *iidCount, 57 | IID **iids) = 0; 58 | 59 | virtual HRESULT STDMETHODCALLTYPE GetRuntimeClassName( 60 | HSTRING *className) = 0; 61 | 62 | virtual HRESULT STDMETHODCALLTYPE GetTrustLevel( 63 | TrustLevel *trustLevel) = 0; 64 | 65 | }; 66 | #ifdef __CRT_UUID_DECL 67 | __CRT_UUID_DECL(IInspectable, 0xaf86e2e0, 0xb12d, 0x4c6a, 0x9c,0x5a, 0xd7,0xaa,0x65,0x10,0x1e,0x90) 68 | #endif 69 | #else 70 | typedef struct IInspectableVtbl { 71 | BEGIN_INTERFACE 72 | 73 | /*** IUnknown methods ***/ 74 | HRESULT (STDMETHODCALLTYPE *QueryInterface)( 75 | IInspectable *This, 76 | REFIID riid, 77 | void **ppvObject); 78 | 79 | ULONG (STDMETHODCALLTYPE *AddRef)( 80 | IInspectable *This); 81 | 82 | ULONG (STDMETHODCALLTYPE *Release)( 83 | IInspectable *This); 84 | 85 | /*** IInspectable methods ***/ 86 | HRESULT (STDMETHODCALLTYPE *GetIids)( 87 | IInspectable *This, 88 | ULONG *iidCount, 89 | IID **iids); 90 | 91 | HRESULT (STDMETHODCALLTYPE *GetRuntimeClassName)( 92 | IInspectable *This, 93 | HSTRING *className); 94 | 95 | HRESULT (STDMETHODCALLTYPE *GetTrustLevel)( 96 | IInspectable *This, 97 | TrustLevel *trustLevel); 98 | 99 | END_INTERFACE 100 | } IInspectableVtbl; 101 | 102 | interface IInspectable { 103 | CONST_VTBL IInspectableVtbl* lpVtbl; 104 | }; 105 | 106 | #ifdef COBJMACROS 107 | #ifndef WIDL_C_INLINE_WRAPPERS 108 | /*** IUnknown methods ***/ 109 | #define IInspectable_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 110 | #define IInspectable_AddRef(This) (This)->lpVtbl->AddRef(This) 111 | #define IInspectable_Release(This) (This)->lpVtbl->Release(This) 112 | /*** IInspectable methods ***/ 113 | #define IInspectable_GetIids(This,iidCount,iids) (This)->lpVtbl->GetIids(This,iidCount,iids) 114 | #define IInspectable_GetRuntimeClassName(This,className) (This)->lpVtbl->GetRuntimeClassName(This,className) 115 | #define IInspectable_GetTrustLevel(This,trustLevel) (This)->lpVtbl->GetTrustLevel(This,trustLevel) 116 | #else 117 | /*** IUnknown methods ***/ 118 | static FORCEINLINE HRESULT IInspectable_QueryInterface(IInspectable* This,REFIID riid,void **ppvObject) { 119 | return This->lpVtbl->QueryInterface(This,riid,ppvObject); 120 | } 121 | static FORCEINLINE ULONG IInspectable_AddRef(IInspectable* This) { 122 | return This->lpVtbl->AddRef(This); 123 | } 124 | static FORCEINLINE ULONG IInspectable_Release(IInspectable* This) { 125 | return This->lpVtbl->Release(This); 126 | } 127 | /*** IInspectable methods ***/ 128 | static FORCEINLINE HRESULT IInspectable_GetIids(IInspectable* This,ULONG *iidCount,IID **iids) { 129 | return This->lpVtbl->GetIids(This,iidCount,iids); 130 | } 131 | static FORCEINLINE HRESULT IInspectable_GetRuntimeClassName(IInspectable* This,HSTRING *className) { 132 | return This->lpVtbl->GetRuntimeClassName(This,className); 133 | } 134 | static FORCEINLINE HRESULT IInspectable_GetTrustLevel(IInspectable* This,TrustLevel *trustLevel) { 135 | return This->lpVtbl->GetTrustLevel(This,trustLevel); 136 | } 137 | #endif 138 | #endif 139 | 140 | #endif 141 | 142 | 143 | #endif /* __IInspectable_INTERFACE_DEFINED__ */ 144 | 145 | 146 | #if !defined (CINTERFACE) && defined (__cplusplus) 147 | extern "C++" { 148 | template void **IID_INS_ARGS_internal (T **p) { 149 | static_cast (*p); 150 | return reinterpret_cast (p); 151 | } 152 | } 153 | 154 | #define IID_INS_ARGS(P) __uuidof(**(P)), IID_INS_ARGS_internal(P) 155 | #endif 156 | /* Begin additional prototypes for all interfaces */ 157 | 158 | ULONG __RPC_USER HSTRING_UserSize (ULONG *, ULONG, HSTRING *); 159 | unsigned char * __RPC_USER HSTRING_UserMarshal (ULONG *, unsigned char *, HSTRING *); 160 | unsigned char * __RPC_USER HSTRING_UserUnmarshal(ULONG *, unsigned char *, HSTRING *); 161 | void __RPC_USER HSTRING_UserFree (ULONG *, HSTRING *); 162 | 163 | /* End additional prototypes */ 164 | 165 | #ifdef __cplusplus 166 | } 167 | #endif 168 | 169 | #endif /* __inspectable_h__ */ 170 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/DiagnosticCommentKinds.inc: -------------------------------------------------------------------------------- 1 | #ifdef COMMENTSTART 2 | __COMMENTSTART = DIAG_START_COMMENT, 3 | #undef COMMENTSTART 4 | #endif 5 | 6 | DIAG(note_add_deprecation_attr, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "add a deprecation attribute to the declaration to silence this warning", 0, SFINAE_Suppress, false, false, 22) 7 | DIAG(note_doc_block_command_previous, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous command '%select{\\|@}0%1' here", 0, SFINAE_Suppress, false, false, 22) 8 | DIAG(note_doc_block_command_previous_alias, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous command '%select{\\|@}0%1' (an alias of '\\%2') here", 0, SFINAE_Suppress, false, false, 22) 9 | DIAG(note_doc_html_end_tag, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "end tag", 0, SFINAE_Suppress, false, false, 22) 10 | DIAG(note_doc_html_tag_started_here, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "HTML tag started here", 0, SFINAE_Suppress, false, false, 22) 11 | DIAG(note_doc_param_name_suggestion, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "did you mean '%0'?", 0, SFINAE_Suppress, false, false, 22) 12 | DIAG(note_doc_param_previous, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous documentation", 0, SFINAE_Suppress, false, false, 22) 13 | DIAG(note_doc_tparam_name_suggestion, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "did you mean '%0'?", 0, SFINAE_Suppress, false, false, 22) 14 | DIAG(note_doc_tparam_previous, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous documentation", 0, SFINAE_Suppress, false, false, 22) 15 | DIAG(warn_correct_comment_command_name, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "unknown command tag name '%0'; did you mean '%1'?", 149, SFINAE_Suppress, false, false, 22) 16 | DIAG(warn_doc_api_container_decl_mismatch, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0%select{class|interface|protocol|struct|union}1' command should not be used in a comment attached to a non-%select{class|interface|protocol|struct|union}2 declaration", 145, SFINAE_Suppress, false, false, 22) 17 | DIAG(warn_doc_block_command_duplicate, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "duplicated command '%select{\\|@}0%1'", 145, SFINAE_Suppress, false, false, 22) 18 | DIAG(warn_doc_block_command_empty_paragraph, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "empty paragraph passed to '%select{\\|@}0%1' command", 145, SFINAE_Suppress, false, false, 22) 19 | DIAG(warn_doc_container_decl_mismatch, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0%select{classdesign|coclass|dependency|helper|helperclass|helps|instancesize|ownership|performance|security|superclass}1' command should not be used in a comment attached to a non-container declaration", 145, SFINAE_Suppress, false, false, 22) 20 | DIAG(warn_doc_deprecated_not_sync, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "declaration is marked with '\\deprecated' command but does not have a deprecation attribute", 146, SFINAE_Suppress, false, false, 22) 21 | DIAG(warn_doc_function_method_decl_mismatch, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0%select{function|functiongroup|method|methodgroup|callback}1' command should be used in a comment attached to %select{a function|a function|an Objective-C method|an Objective-C method|a pointer to function}2 declaration", 145, SFINAE_Suppress, false, false, 22) 22 | DIAG(warn_doc_html_end_forbidden, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "HTML end tag '%0' is forbidden", 147, SFINAE_Suppress, false, false, 22) 23 | DIAG(warn_doc_html_end_unbalanced, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "HTML end tag does not match any start tag", 147, SFINAE_Suppress, false, false, 22) 24 | DIAG(warn_doc_html_missing_end_tag, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "HTML tag '%0' requires an end tag", 147, SFINAE_Suppress, false, false, 22) 25 | DIAG(warn_doc_html_start_end_mismatch, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "HTML start tag '%0' closed by '%1'", 147, SFINAE_Suppress, false, false, 22) 26 | DIAG(warn_doc_html_start_tag_expected_ident_or_greater, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "HTML start tag prematurely ended, expected attribute name or '>'", 145, SFINAE_Suppress, false, false, 22) 27 | DIAG(warn_doc_html_start_tag_expected_quoted_string, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "expected quoted string after equals sign", 145, SFINAE_Suppress, false, false, 22) 28 | DIAG(warn_doc_param_duplicate, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "parameter '%0' is already documented", 145, SFINAE_Suppress, false, false, 22) 29 | DIAG(warn_doc_param_invalid_direction, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "unrecognized parameter passing direction, valid directions are '[in]', '[out]' and '[in,out]'", 145, SFINAE_Suppress, false, false, 22) 30 | DIAG(warn_doc_param_not_attached_to_a_function_decl, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0param' command used in a comment that is not attached to a function declaration", 145, SFINAE_Suppress, false, false, 22) 31 | DIAG(warn_doc_param_not_found, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "parameter '%0' not found in the function declaration", 145, SFINAE_Suppress, false, false, 22) 32 | DIAG(warn_doc_param_spaces_in_direction, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "whitespace is not allowed in parameter passing direction", 148, SFINAE_Suppress, false, false, 22) 33 | DIAG(warn_doc_returns_attached_to_a_void_function, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0%1' command used in a comment that is attached to a %select{function returning void|constructor|destructor|method returning void}2", 145, SFINAE_Suppress, false, false, 22) 34 | DIAG(warn_doc_returns_not_attached_to_a_function_decl, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0%1' command used in a comment that is not attached to a function or method declaration", 145, SFINAE_Suppress, false, false, 22) 35 | DIAG(warn_doc_tparam_duplicate, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "template parameter '%0' is already documented", 145, SFINAE_Suppress, false, false, 22) 36 | DIAG(warn_doc_tparam_not_attached_to_a_template_decl, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0tparam' command used in a comment that is not attached to a template declaration", 145, SFINAE_Suppress, false, false, 22) 37 | DIAG(warn_doc_tparam_not_found, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "template parameter '%0' not found in the template declaration", 145, SFINAE_Suppress, false, false, 22) 38 | DIAG(warn_unknown_comment_command_name, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "unknown command tag name", 149, SFINAE_Suppress, false, false, 22) 39 | DIAG(warn_verbatim_block_end_without_start, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'%select{\\|@}0%1' command does not terminate a verbatim text block", 145, SFINAE_Suppress, false, false, 22) 40 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/DiagnosticSerializationKinds.inc: -------------------------------------------------------------------------------- 1 | #ifdef SERIALIZATIONSTART 2 | __SERIALIZATIONSTART = DIAG_START_SERIALIZATION, 3 | #undef SERIALIZATIONSTART 4 | #endif 5 | 6 | DIAG(err_fe_not_a_pch_file, CLASS_ERROR, (unsigned)diag::Severity::Error, "input is not a PCH file: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 14) 7 | DIAG(err_fe_pch_file_modified, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "file '%0' has been modified since the precompiled header '%1' was built", 0, SFINAE_SubstitutionFailure, false, true, 14) 8 | DIAG(err_fe_pch_file_overridden, CLASS_ERROR, (unsigned)diag::Severity::Error, "file '%0' from the precompiled header has been overridden", 0, SFINAE_SubstitutionFailure, false, true, 14) 9 | DIAG(err_fe_pch_malformed, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "malformed or corrupted AST file: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 14) 10 | DIAG(err_fe_pch_malformed_block, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "malformed block record in PCH file: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 14) 11 | DIAG(err_fe_unable_to_read_pch_file, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to read PCH file %0: '%1'", 0, SFINAE_SubstitutionFailure, false, true, 14) 12 | DIAG(err_imported_module_modmap_changed, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "module '%0' imported by AST file '%1' found in a different module map file (%2) than when the importing AST file was built (%3)", 0, SFINAE_SubstitutionFailure, false, true, 14) 13 | DIAG(err_imported_module_not_found, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "module '%0' in AST file '%1' (imported by AST file '%2') is not defined in any loaded module map file; maybe you need to load '%3'?", 0, SFINAE_SubstitutionFailure, false, true, 14) 14 | DIAG(err_imported_module_relocated, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "module '%0' was built in directory '%1' but now resides in directory '%2'", 0, SFINAE_SubstitutionFailure, false, true, 14) 15 | DIAG(err_module_different_modmap, CLASS_ERROR, (unsigned)diag::Severity::Error, "module '%0' %select{uses|does not use}1 additional module map '%2'%select{| not}1 used when the module was built", 0, SFINAE_SubstitutionFailure, false, true, 14) 16 | DIAG(err_module_odr_violation_different_definitions, CLASS_ERROR, (unsigned)diag::Severity::Error, "%q0 has different definitions in different modules; %select{definition in module '%2' is here|defined here}1", 0, SFINAE_SubstitutionFailure, false, true, 14) 17 | DIAG(err_module_odr_violation_different_instantiations, CLASS_ERROR, (unsigned)diag::Severity::Error, "instantiation of %q0 is different in different modules", 0, SFINAE_SubstitutionFailure, false, true, 14) 18 | DIAG(err_module_odr_violation_missing_decl, CLASS_ERROR, (unsigned)diag::Severity::Error, "%q0 from module '%1' is not present in definition of %q2%select{ in module '%4'| provided earlier}3", 0, SFINAE_Report, false, true, 14) 19 | DIAG(err_not_a_pch_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "'%0' does not appear to be a precompiled header file", 0, SFINAE_SubstitutionFailure, false, true, 14) 20 | DIAG(err_pch_diagopt_mismatch, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 is currently enabled, but was not in the PCH file", 0, SFINAE_SubstitutionFailure, false, true, 14) 21 | DIAG(err_pch_different_branch, CLASS_ERROR, (unsigned)diag::Severity::Error, "PCH file built from a different branch (%0) than the compiler (%1)", 0, SFINAE_SubstitutionFailure, false, true, 14) 22 | DIAG(err_pch_langopt_mismatch, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 was %select{disabled|enabled}1 in PCH file but is currently %select{disabled|enabled}2", 0, SFINAE_SubstitutionFailure, false, true, 14) 23 | DIAG(err_pch_langopt_value_mismatch, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 differs in PCH file vs. current file", 0, SFINAE_SubstitutionFailure, false, true, 14) 24 | DIAG(err_pch_macro_def_conflict, CLASS_ERROR, (unsigned)diag::Severity::Error, "definition of macro '%0' differs between the precompiled header ('%1') and the command line ('%2')", 0, SFINAE_SubstitutionFailure, false, true, 14) 25 | DIAG(err_pch_macro_def_undef, CLASS_ERROR, (unsigned)diag::Severity::Error, "macro '%0' was %select{defined|undef'd}1 in the precompiled header but %select{undef'd|defined}1 on the command line", 0, SFINAE_SubstitutionFailure, false, true, 14) 26 | DIAG(err_pch_modulecache_mismatch, CLASS_ERROR, (unsigned)diag::Severity::Error, "PCH was compiled with module cache path '%0', but the path is currently '%1'", 0, SFINAE_SubstitutionFailure, false, true, 14) 27 | DIAG(err_pch_pp_detailed_record, CLASS_ERROR, (unsigned)diag::Severity::Error, "%select{command line contains|precompiled header was built with}0 '-detailed-preprocessing-record' but %select{precompiled header was not built with it|it is not present on the command line}0", 0, SFINAE_SubstitutionFailure, false, true, 14) 28 | DIAG(err_pch_targetopt_feature_mismatch, CLASS_ERROR, (unsigned)diag::Severity::Error, "%select{AST file|current translation unit}0 was compiled with the target feature'%1' but the %select{current translation unit is|AST file was}0 not", 0, SFINAE_SubstitutionFailure, false, true, 14) 29 | DIAG(err_pch_targetopt_mismatch, CLASS_ERROR, (unsigned)diag::Severity::Error, "PCH file was compiled for the %0 '%1' but the current translation unit is being compiled for target '%2'", 0, SFINAE_SubstitutionFailure, false, true, 14) 30 | DIAG(err_pch_undef, CLASS_ERROR, (unsigned)diag::Severity::Error, "%select{command line contains|precompiled header was built with}0 '-undef' but %select{precompiled header was not built with it|it is not present on the command line}0", 0, SFINAE_SubstitutionFailure, false, true, 14) 31 | DIAG(err_pch_version_too_new, CLASS_ERROR, (unsigned)diag::Severity::Error, "PCH file uses a newer PCH format that cannot be read", 0, SFINAE_SubstitutionFailure, false, true, 14) 32 | DIAG(err_pch_version_too_old, CLASS_ERROR, (unsigned)diag::Severity::Error, "PCH file uses an older PCH format that is no longer supported", 0, SFINAE_SubstitutionFailure, false, true, 14) 33 | DIAG(err_pch_with_compiler_errors, CLASS_ERROR, (unsigned)diag::Severity::Error, "PCH file contains compiler errors", 0, SFINAE_SubstitutionFailure, false, true, 14) 34 | DIAG(note_module_cache_path, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "after modifying system headers, please delete the module cache at '%0'", 0, SFINAE_Suppress, false, false, 14) 35 | DIAG(note_module_odr_violation_different_definitions, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "definition in module '%0' is here", 0, SFINAE_Suppress, false, false, 14) 36 | DIAG(note_module_odr_violation_no_possible_decls, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "definition has no member %0", 0, SFINAE_Suppress, false, false, 14) 37 | DIAG(note_module_odr_violation_possible_decl, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "declaration of %0 does not match", 0, SFINAE_Suppress, false, false, 14) 38 | DIAG(note_pch_rebuild_required, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "please rebuild precompiled header '%0'", 0, SFINAE_Suppress, false, false, 14) 39 | DIAG(note_pch_required_by, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "'%0' required by '%1'", 0, SFINAE_Suppress, false, false, 14) 40 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | on: 3 | push: 4 | branches: 5 | - 'main' 6 | jobs: 7 | draft_release: 8 | if: ${{ !contains(github.event.head_commit.message, 'update to latest binary release') }} 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v3 13 | - name: Create draft 14 | run: | 15 | export RELEASE="$(date -u +%Y.%m.%d)+$(git rev-parse --short HEAD).${{ github.run_attempt }}" 16 | gh release create "$RELEASE" --draft --title "$RELEASE" 17 | env: 18 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 19 | - name: Create draft 20 | run: | 21 | export RELEASE="$(date -u +%Y.%m.%d)+$(git rev-parse --short HEAD).${{ github.run_attempt }}" 22 | gh release edit "$RELEASE" --draft=false 23 | env: 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | all: 26 | needs: draft_release 27 | strategy: 28 | matrix: 29 | target: [ 30 | 'x86_64-linux-gnu', 31 | 'x86_64-linux-musl', 32 | 'aarch64-linux-gnu', 33 | 'aarch64-linux-musl', 34 | 'x86_64-windows-gnu', 35 | 'aarch64-windows-gnu', 36 | 'x86_64-macos-none', 37 | 'aarch64-macos-none', 38 | ] 39 | optimize: [Debug, ReleaseFast] 40 | include: 41 | - target: 'x86_64-linux-gnu' 42 | cpu: '-Dcpu=x86_64_v2' 43 | - target: 'x86_64-linux-musl' 44 | cpu: '-Dcpu=x86_64_v2' 45 | - target: 'x86_64-windows-gnu' 46 | cpu: '-Dcpu=x86_64_v2' 47 | - target: 'x86_64-macos-none' 48 | cpu: '-Dcpu=x86_64_v2' 49 | runs-on: ubuntu-latest 50 | steps: 51 | - name: Checkout 52 | uses: actions/checkout@v3 53 | - name: Setup Zig 54 | run: | 55 | sudo apt install xz-utils 56 | sudo sh -c 'wget -c https://pkg.machengine.org/zig/zig-linux-x86_64-0.14.0-dev.2577+271452d22.tar.xz -O - | tar -xJ --strip-components=1 -C /usr/local/bin' 57 | - name: build 58 | run: zig build -Dfrom_source -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} ${{ matrix.cpu }} install dxc 59 | - name: upload 60 | run: | 61 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_lib.tar.zst" -C zig-out/lib . 62 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_bin.tar.zst" -C zig-out/bin . 63 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_lib.tar.gz" -C zig-out/lib . 64 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_bin.tar.gz" -C zig-out/bin . 65 | export RELEASE="$(date -u +%Y.%m.%d)+$(git rev-parse --short HEAD).${{ github.run_attempt }}" 66 | gh release upload "$RELEASE" "${TARGET_OPT}_lib.tar.zst" 67 | gh release upload "$RELEASE" "${TARGET_OPT}_bin.tar.zst" 68 | gh release upload "$RELEASE" "${TARGET_OPT}_lib.tar.gz" 69 | gh release upload "$RELEASE" "${TARGET_OPT}_bin.tar.gz" 70 | env: 71 | TARGET_OPT: ${{ matrix.target }}_${{ matrix.optimize }} 72 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 73 | msvc: 74 | # TODO: re-enable required MSVC builds 75 | continue-on-error: true 76 | needs: draft_release 77 | strategy: 78 | matrix: 79 | target: [ 80 | 'x86_64-windows-msvc', 81 | # TODO: 'machine type x64 conflicts with arm64' during linking (zig bug) 82 | # 'aarch64-windows-msvc', 83 | ] 84 | optimize: [Debug, ReleaseFast] 85 | include: 86 | - target: 'x86_64-windows-msvc' 87 | cpu: '-Dcpu=x86_64_v2' 88 | runs-on: windows-latest 89 | steps: 90 | - name: Checkout 91 | uses: actions/checkout@v3 92 | - name: Setup Zig 93 | run: | 94 | $ProgressPreference = 'SilentlyContinue' 95 | Invoke-WebRequest -Uri "https://pkg.machengine.org/zig/zig-windows-x86_64-0.14.0-dev.2577+271452d22.zip" -OutFile "C:\zig.zip" 96 | cd C:\ 97 | 7z x zig.zip 98 | Add-Content $env:GITHUB_PATH "C:\zig-windows-x86_64-0.14.0-dev.2577+271452d22\" 99 | - name: build 100 | run: zig build -Dfrom_source -Dtarget=${{ matrix.target }} -Doptimize=${{ matrix.optimize }} ${{ matrix.cpu }} install dxc 101 | - name: upload 102 | run: | 103 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_lib.tar.zst" -C zig-out/lib . 104 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_bin.tar.zst" -C zig-out/bin . 105 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_lib.tar.gz" -C zig-out/lib . 106 | ZSTD_CLEVEL=19 tar -acf "${TARGET_OPT}_bin.tar.gz" -C zig-out/bin . 107 | export RELEASE="$(date -u +%Y.%m.%d)+$(git rev-parse --short HEAD).${{ github.run_attempt }}" 108 | gh release upload "$RELEASE" "${TARGET_OPT}_lib.tar.zst" 109 | gh release upload "$RELEASE" "${TARGET_OPT}_bin.tar.zst" 110 | gh release upload "$RELEASE" "${TARGET_OPT}_lib.tar.gz" 111 | gh release upload "$RELEASE" "${TARGET_OPT}_bin.tar.gz" 112 | shell: bash 113 | env: 114 | WINDOWS: true 115 | TARGET_OPT: ${{ matrix.target }}_${{ matrix.optimize }} 116 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 117 | publish: 118 | # TODO: re-enable required MSVC builds 119 | # needs: [all, msvc] 120 | needs: [all] 121 | runs-on: ubuntu-latest 122 | steps: 123 | - name: Checkout 124 | uses: actions/checkout@v3 125 | - name: Publish release 126 | run: | 127 | export RELEASE="$(date -u +%Y.%m.%d)+$(git rev-parse --short HEAD).${{ github.run_attempt }}" 128 | gh release edit "$RELEASE" --draft=false 129 | env: 130 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 131 | - name: Record latest release version 132 | id: recorded_release_version 133 | # Note: we find the latest non-'update to latest binary release' commit here, which is not 134 | # necessarily HEAD because another build could have succeeded before us and HEAD may now refer 135 | # to 'update to latest binary release' instead of the commit we were building. 136 | # By doing this, we ensure any update we push would refer to the absolute latest binary 137 | # release even if *this* CI run is older. 138 | run: echo "recorded_release_version=$(git log --oneline | grep -v 'update to latest binary release' | head -n1 | cut -d " " -f1)" >> $GITHUB_ENV 139 | - name: Checkout hexops/mach-dxcompiler repo 140 | uses: actions/checkout@v3 141 | with: 142 | repository: hexops/mach-dxcompiler 143 | token: ${{ secrets.HEXOPS_MACH_DXCOMPILER_PUSH }} 144 | - name: 'update hard-coded binary release version' 145 | env: 146 | RELEASE_COMMIT: ${{env.recorded_release_version}} 147 | run: | 148 | export RELEASE="$(date -u +%Y.%m.%d)+$(git rev-parse --short HEAD).${{ github.run_attempt }}" 149 | sed -i "/const latest_binary_release =/c\const latest_binary_release = \"$RELEASE\";" ./build.zig 150 | git config user.name 'Release automation' 151 | git config user.email 'wrench@hexops.com' 152 | git add . 153 | git commit -m 'update to latest binary release' 154 | git push -u origin HEAD 155 | -------------------------------------------------------------------------------- /generated-include/clang/AST/CommentHTMLTags.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* HTML tag name matcher *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | bool isHTMLTagName(StringRef Name) { 10 | switch (Name.size()) { 11 | default: break; 12 | case 1: // 6 strings to match. 13 | switch (Name[0]) { 14 | default: break; 15 | case 'a': // 1 string to match. 16 | return true; // "a" 17 | case 'b': // 1 string to match. 18 | return true; // "b" 19 | case 'i': // 1 string to match. 20 | return true; // "i" 21 | case 'p': // 1 string to match. 22 | return true; // "p" 23 | case 's': // 1 string to match. 24 | return true; // "s" 25 | case 'u': // 1 string to match. 26 | return true; // "u" 27 | } 28 | break; 29 | case 2: // 19 strings to match. 30 | switch (Name[0]) { 31 | default: break; 32 | case 'b': // 1 string to match. 33 | if (Name[1] != 'r') 34 | break; 35 | return true; // "br" 36 | case 'd': // 3 strings to match. 37 | switch (Name[1]) { 38 | default: break; 39 | case 'd': // 1 string to match. 40 | return true; // "dd" 41 | case 'l': // 1 string to match. 42 | return true; // "dl" 43 | case 't': // 1 string to match. 44 | return true; // "dt" 45 | } 46 | break; 47 | case 'e': // 1 string to match. 48 | if (Name[1] != 'm') 49 | break; 50 | return true; // "em" 51 | case 'h': // 7 strings to match. 52 | switch (Name[1]) { 53 | default: break; 54 | case '1': // 1 string to match. 55 | return true; // "h1" 56 | case '2': // 1 string to match. 57 | return true; // "h2" 58 | case '3': // 1 string to match. 59 | return true; // "h3" 60 | case '4': // 1 string to match. 61 | return true; // "h4" 62 | case '5': // 1 string to match. 63 | return true; // "h5" 64 | case '6': // 1 string to match. 65 | return true; // "h6" 66 | case 'r': // 1 string to match. 67 | return true; // "hr" 68 | } 69 | break; 70 | case 'l': // 1 string to match. 71 | if (Name[1] != 'i') 72 | break; 73 | return true; // "li" 74 | case 'o': // 1 string to match. 75 | if (Name[1] != 'l') 76 | break; 77 | return true; // "ol" 78 | case 't': // 4 strings to match. 79 | switch (Name[1]) { 80 | default: break; 81 | case 'd': // 1 string to match. 82 | return true; // "td" 83 | case 'h': // 1 string to match. 84 | return true; // "th" 85 | case 'r': // 1 string to match. 86 | return true; // "tr" 87 | case 't': // 1 string to match. 88 | return true; // "tt" 89 | } 90 | break; 91 | case 'u': // 1 string to match. 92 | if (Name[1] != 'l') 93 | break; 94 | return true; // "ul" 95 | } 96 | break; 97 | case 3: // 9 strings to match. 98 | switch (Name[0]) { 99 | default: break; 100 | case 'b': // 1 string to match. 101 | if (memcmp(Name.data()+1, "ig", 2)) 102 | break; 103 | return true; // "big" 104 | case 'c': // 1 string to match. 105 | if (memcmp(Name.data()+1, "ol", 2)) 106 | break; 107 | return true; // "col" 108 | case 'd': // 2 strings to match. 109 | switch (Name[1]) { 110 | default: break; 111 | case 'e': // 1 string to match. 112 | if (Name[2] != 'l') 113 | break; 114 | return true; // "del" 115 | case 'i': // 1 string to match. 116 | if (Name[2] != 'v') 117 | break; 118 | return true; // "div" 119 | } 120 | break; 121 | case 'i': // 2 strings to match. 122 | switch (Name[1]) { 123 | default: break; 124 | case 'm': // 1 string to match. 125 | if (Name[2] != 'g') 126 | break; 127 | return true; // "img" 128 | case 'n': // 1 string to match. 129 | if (Name[2] != 's') 130 | break; 131 | return true; // "ins" 132 | } 133 | break; 134 | case 'p': // 1 string to match. 135 | if (memcmp(Name.data()+1, "re", 2)) 136 | break; 137 | return true; // "pre" 138 | case 's': // 2 strings to match. 139 | if (Name[1] != 'u') 140 | break; 141 | switch (Name[2]) { 142 | default: break; 143 | case 'b': // 1 string to match. 144 | return true; // "sub" 145 | case 'p': // 1 string to match. 146 | return true; // "sup" 147 | } 148 | break; 149 | } 150 | break; 151 | case 4: // 3 strings to match. 152 | switch (Name[0]) { 153 | default: break; 154 | case 'c': // 1 string to match. 155 | if (memcmp(Name.data()+1, "ode", 3)) 156 | break; 157 | return true; // "code" 158 | case 'f': // 1 string to match. 159 | if (memcmp(Name.data()+1, "ont", 3)) 160 | break; 161 | return true; // "font" 162 | case 's': // 1 string to match. 163 | if (memcmp(Name.data()+1, "pan", 3)) 164 | break; 165 | return true; // "span" 166 | } 167 | break; 168 | case 5: // 5 strings to match. 169 | switch (Name[0]) { 170 | default: break; 171 | case 's': // 1 string to match. 172 | if (memcmp(Name.data()+1, "mall", 4)) 173 | break; 174 | return true; // "small" 175 | case 't': // 4 strings to match. 176 | switch (Name[1]) { 177 | default: break; 178 | case 'a': // 1 string to match. 179 | if (memcmp(Name.data()+2, "ble", 3)) 180 | break; 181 | return true; // "table" 182 | case 'b': // 1 string to match. 183 | if (memcmp(Name.data()+2, "ody", 3)) 184 | break; 185 | return true; // "tbody" 186 | case 'f': // 1 string to match. 187 | if (memcmp(Name.data()+2, "oot", 3)) 188 | break; 189 | return true; // "tfoot" 190 | case 'h': // 1 string to match. 191 | if (memcmp(Name.data()+2, "ead", 3)) 192 | break; 193 | return true; // "thead" 194 | } 195 | break; 196 | } 197 | break; 198 | case 6: // 2 strings to match. 199 | if (memcmp(Name.data()+0, "str", 3)) 200 | break; 201 | switch (Name[3]) { 202 | default: break; 203 | case 'i': // 1 string to match. 204 | if (memcmp(Name.data()+4, "ke", 2)) 205 | break; 206 | return true; // "strike" 207 | case 'o': // 1 string to match. 208 | if (memcmp(Name.data()+4, "ng", 2)) 209 | break; 210 | return true; // "strong" 211 | } 212 | break; 213 | case 7: // 1 string to match. 214 | if (memcmp(Name.data()+0, "caption", 7)) 215 | break; 216 | return true; // "caption" 217 | case 8: // 1 string to match. 218 | if (memcmp(Name.data()+0, "colgroup", 8)) 219 | break; 220 | return true; // "colgroup" 221 | case 10: // 1 string to match. 222 | if (memcmp(Name.data()+0, "blockquote", 10)) 223 | break; 224 | return true; // "blockquote" 225 | } 226 | return false; 227 | } 228 | 229 | -------------------------------------------------------------------------------- /src/mach_dxc.cpp: -------------------------------------------------------------------------------- 1 | // TODO: investigate if we can eliminate this for Windows builds 2 | #ifdef _WIN32 3 | #ifdef _MSC_VER 4 | #define __C89_NAMELESS 5 | #define __C89_NAMELESSUNIONNAME 6 | #define WIN32_LEAN_AND_MEAN 7 | #include 8 | #include 9 | #define CComPtr Microsoft::WRL::ComPtr 10 | #else // _MSC_VER 11 | #include 12 | #include 13 | #endif // _MSC_VER 14 | #endif // _WIN32 15 | 16 | // Avoid __declspec(dllimport) since dxcompiler is static. 17 | #define DXC_API_IMPORT 18 | #include 19 | #include 20 | #include 21 | #include 22 | 23 | #include "mach_dxc.h" 24 | #include "dxc/Support/FileIOHelper.h" 25 | 26 | #ifdef __cplusplus 27 | extern "C" { 28 | #endif 29 | 30 | // Dynamic allocation for multibyte string conversion. 31 | char* wcstombsAlloc(const wchar_t* inval) 32 | { 33 | size_t size = std::wcslen(inval); 34 | size_t outsz = (size + 1) * MB_CUR_MAX; 35 | 36 | auto buf = (char*)std::malloc(outsz); 37 | std::memset(buf, 0, outsz); 38 | std::setlocale(LC_CTYPE,""); 39 | size = std::wcstombs(buf, inval, size * sizeof(wchar_t)); 40 | 41 | if (size == (size_t)(-1)) { 42 | std::free(buf); 43 | buf = nullptr; 44 | } else { 45 | buf = (char*)std::realloc(buf, size + 1); 46 | } 47 | 48 | return buf; 49 | } 50 | 51 | // Provides a way for C applications to override file inclusion by offloading it to a function pointer 52 | class MachDxcIncludeHandler : public IDxcIncludeHandler 53 | { 54 | public: 55 | ULONG STDMETHODCALLTYPE AddRef() override { return 0; } 56 | ULONG STDMETHODCALLTYPE Release() override { return 0; } 57 | 58 | HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void **ppvObject) override { 59 | if (riid == __uuidof(IDxcIncludeHandler) || riid == __uuidof(IUnknown)) { 60 | *ppvObject = this; 61 | return S_OK; 62 | } 63 | *ppvObject = nullptr; 64 | return E_NOINTERFACE; 65 | } 66 | 67 | MachDxcIncludeCallbacks* callbacks; 68 | IDxcUtils* utils; 69 | 70 | MachDxcIncludeHandler(MachDxcIncludeCallbacks* callbacks_ptr, IDxcUtils* util_ptr) { 71 | callbacks = callbacks_ptr; 72 | utils = util_ptr; 73 | } 74 | 75 | HRESULT STDMETHODCALLTYPE LoadSource(LPCWSTR filename, IDxcBlob **ppIncludeSource) override { 76 | if (callbacks->include_func == nullptr || callbacks->free_func == nullptr) 77 | return E_POINTER; 78 | 79 | char* filename_utf8 = wcstombsAlloc(filename); 80 | 81 | if (filename_utf8 == nullptr) 82 | filename_utf8 = strdup(u8""); 83 | 84 | MachDxcIncludeResult* include_result = callbacks->include_func(callbacks->include_ctx, filename_utf8); 85 | 86 | std::free(filename_utf8); 87 | 88 | const char* include_text = include_result != nullptr && include_result->header_data != nullptr ? include_result->header_data : u8""; 89 | size_t include_len = include_result != nullptr ? include_result->header_length : 0; 90 | 91 | CComPtr text_blob; 92 | HRESULT result = utils->CreateBlob(include_text, include_len, CP_UTF8, &text_blob); 93 | 94 | if (SUCCEEDED(result)) 95 | *ppIncludeSource = text_blob.Detach(); 96 | 97 | callbacks->free_func(callbacks->include_ctx, include_result); 98 | 99 | return S_OK; 100 | } 101 | }; 102 | 103 | 104 | // Mach change start: static dxcompiler/dxil 105 | BOOL MachDxcompilerInvokeDllMain(); 106 | void MachDxcompilerInvokeDllShutdown(); 107 | 108 | //---------------- 109 | // MachDxcCompiler 110 | //---------------- 111 | MACH_EXPORT MachDxcCompiler machDxcInit() { 112 | MachDxcompilerInvokeDllMain(); 113 | CComPtr dxcInstance; 114 | HRESULT hr = DxcCreateInstance(CLSID_DxcCompiler, IID_PPV_ARGS(&dxcInstance)); 115 | assert(SUCCEEDED(hr)); 116 | return reinterpret_cast(dxcInstance.Detach()); 117 | } 118 | 119 | MACH_EXPORT void machDxcDeinit(MachDxcCompiler compiler) { 120 | CComPtr dxcInstance = CComPtr(reinterpret_cast(compiler)); 121 | dxcInstance.Release(); 122 | MachDxcompilerInvokeDllShutdown(); 123 | } 124 | 125 | 126 | //--------------------- 127 | // MachDxcCompileResult 128 | //--------------------- 129 | MACH_EXPORT MachDxcCompileResult machDxcCompile( 130 | MachDxcCompiler compiler, 131 | MachDxcCompileOptions* options 132 | ) { 133 | CComPtr dxcInstance = CComPtr(reinterpret_cast(compiler)); 134 | 135 | CComPtr pUtils; 136 | DxcCreateInstance(CLSID_DxcUtils, IID_PPV_ARGS(&pUtils)); 137 | CComPtr pSource; 138 | pUtils->CreateBlob(options->code, options->code_len, CP_UTF8, &pSource); 139 | 140 | DxcBuffer sourceBuffer; 141 | sourceBuffer.Ptr = pSource->GetBufferPointer(); 142 | sourceBuffer.Size = pSource->GetBufferSize(); 143 | sourceBuffer.Encoding = 0; 144 | 145 | // We have args in char form, but dxcInstance->Compile expects wchar_t form. 146 | LPCWSTR* arguments = (LPCWSTR*)malloc(sizeof(LPCWSTR) * options->args_len); 147 | wchar_t* wtext_buf = (wchar_t*)malloc(4096); 148 | wchar_t* wtext_cursor = wtext_buf; 149 | assert(arguments); 150 | assert(wtext_buf); 151 | 152 | for (int i=0; i < options->args_len; i++) { 153 | size_t available = 4096 / sizeof(wchar_t) - (wtext_cursor - wtext_buf); 154 | size_t written = std::mbstowcs(wtext_cursor, options->args[i], available); 155 | arguments[i] = wtext_cursor; 156 | wtext_cursor += written + 1; 157 | } 158 | 159 | MachDxcIncludeHandler* handler = nullptr; 160 | if (options->include_callbacks != nullptr) // Leave include handler as default (nullptr) unless there's available callbacks 161 | handler = new MachDxcIncludeHandler(options->include_callbacks, pUtils); 162 | 163 | CComPtr pCompileResult; 164 | HRESULT hr = dxcInstance->Compile( 165 | &sourceBuffer, 166 | arguments, 167 | (uint32_t)options->args_len, 168 | handler, 169 | IID_PPV_ARGS(&pCompileResult) 170 | ); 171 | 172 | if (handler != nullptr) 173 | delete handler; 174 | 175 | assert(SUCCEEDED(hr)); 176 | free(arguments); 177 | free(wtext_buf); 178 | 179 | return reinterpret_cast(pCompileResult.Detach()); 180 | } 181 | 182 | MACH_EXPORT MachDxcCompileError machDxcCompileResultGetError(MachDxcCompileResult err) { 183 | CComPtr pCompileResult = CComPtr(reinterpret_cast(err)); 184 | 185 | CComPtr pErrors = nullptr; 186 | HRESULT hr = pCompileResult->GetErrorBuffer(&pErrors); 187 | 188 | if (hr == S_OK && !hlsl::IsBlobNullOrEmpty(pErrors)) { 189 | return reinterpret_cast(pErrors.Detach()); 190 | } 191 | 192 | return nullptr; 193 | } 194 | 195 | MACH_EXPORT MachDxcCompileObject machDxcCompileResultGetObject(MachDxcCompileResult err) { 196 | CComPtr pCompileResult = CComPtr(reinterpret_cast(err)); 197 | 198 | CComPtr pObject = nullptr; 199 | HRESULT hr = pCompileResult->GetResult(&pObject); 200 | 201 | if (hr == S_OK && !hlsl::IsBlobNullOrEmpty(pObject)) { 202 | return reinterpret_cast(pObject.Detach()); 203 | } 204 | 205 | return nullptr; 206 | } 207 | 208 | MACH_EXPORT void machDxcCompileResultDeinit(MachDxcCompileResult err) { 209 | CComPtr pCompileResult = CComPtr(reinterpret_cast(err)); 210 | pCompileResult.Release(); 211 | } 212 | 213 | //--------------------- 214 | // MachDxcCompileObject 215 | //--------------------- 216 | MACH_EXPORT char const* machDxcCompileObjectGetBytes(MachDxcCompileObject err) { 217 | CComPtr pObject = CComPtr(reinterpret_cast(err)); 218 | return (char const*)(pObject->GetBufferPointer()); 219 | } 220 | 221 | MACH_EXPORT size_t machDxcCompileObjectGetBytesLength(MachDxcCompileObject err) { 222 | CComPtr pObject = CComPtr(reinterpret_cast(err)); 223 | return pObject->GetBufferSize(); 224 | } 225 | 226 | MACH_EXPORT void machDxcCompileObjectDeinit(MachDxcCompileObject err) { 227 | CComPtr pObject = CComPtr(reinterpret_cast(err)); 228 | pObject.Release(); 229 | } 230 | 231 | //-------------------- 232 | // MachDxcCompileError 233 | //-------------------- 234 | MACH_EXPORT char const* machDxcCompileErrorGetString(MachDxcCompileError err) { 235 | CComPtr pErrors = CComPtr(reinterpret_cast(err)); 236 | return (char const*)(pErrors->GetBufferPointer()); 237 | } 238 | 239 | MACH_EXPORT size_t machDxcCompileErrorGetStringLength(MachDxcCompileError err) { 240 | CComPtr pErrors = CComPtr(reinterpret_cast(err)); 241 | return pErrors->GetStringLength(); 242 | } 243 | 244 | MACH_EXPORT void machDxcCompileErrorDeinit(MachDxcCompileError err) { 245 | CComPtr pErrors = CComPtr(reinterpret_cast(err)); 246 | pErrors.Release(); 247 | } 248 | 249 | #ifdef __cplusplus 250 | } // extern "C" 251 | #endif 252 | -------------------------------------------------------------------------------- /generated-include/clang/Sema/AttrParsedAttrList.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* List of all attributes that Clang recognizes *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | #ifndef PARSED_ATTR 10 | #define PARSED_ATTR(NAME) NAME 11 | #endif 12 | 13 | PARSED_ATTR(AMDGPUNumSGPR) 14 | PARSED_ATTR(AMDGPUNumVGPR) 15 | PARSED_ATTR(Interrupt) 16 | PARSED_ATTR(AcquireCapability) 17 | PARSED_ATTR(AcquiredAfter) 18 | PARSED_ATTR(AcquiredBefore) 19 | PARSED_ATTR(AddressSpace) 20 | PARSED_ATTR(Alias) 21 | PARSED_ATTR(AlignValue) 22 | PARSED_ATTR(Aligned) 23 | PARSED_ATTR(AlwaysInline) 24 | PARSED_ATTR(AnalyzerNoReturn) 25 | PARSED_ATTR(Annotate) 26 | PARSED_ATTR(ArcWeakrefUnavailable) 27 | PARSED_ATTR(ArgumentWithTypeTag) 28 | PARSED_ATTR(AssertCapability) 29 | PARSED_ATTR(AssertExclusiveLock) 30 | PARSED_ATTR(AssertSharedLock) 31 | PARSED_ATTR(AssumeAligned) 32 | PARSED_ATTR(Availability) 33 | PARSED_ATTR(Blocks) 34 | PARSED_ATTR(CDecl) 35 | PARSED_ATTR(CFAuditedTransfer) 36 | PARSED_ATTR(CFConsumed) 37 | PARSED_ATTR(CFReturnsNotRetained) 38 | PARSED_ATTR(CFReturnsRetained) 39 | PARSED_ATTR(CFUnknownTransfer) 40 | PARSED_ATTR(CUDAConstant) 41 | PARSED_ATTR(CUDADevice) 42 | PARSED_ATTR(CUDAGlobal) 43 | PARSED_ATTR(CUDAHost) 44 | PARSED_ATTR(CUDAInvalidTarget) 45 | PARSED_ATTR(CUDALaunchBounds) 46 | PARSED_ATTR(CUDAShared) 47 | PARSED_ATTR(CXX11NoReturn) 48 | PARSED_ATTR(CallableWhen) 49 | PARSED_ATTR(Capability) 50 | PARSED_ATTR(CarriesDependency) 51 | PARSED_ATTR(Cleanup) 52 | PARSED_ATTR(Cold) 53 | PARSED_ATTR(Common) 54 | PARSED_ATTR(Const) 55 | PARSED_ATTR(Constructor) 56 | PARSED_ATTR(Consumable) 57 | PARSED_ATTR(ConsumableAutoCast) 58 | PARSED_ATTR(ConsumableSetOnRead) 59 | PARSED_ATTR(DLLExport) 60 | PARSED_ATTR(DLLImport) 61 | PARSED_ATTR(Deprecated) 62 | PARSED_ATTR(Destructor) 63 | PARSED_ATTR(EnableIf) 64 | PARSED_ATTR(ExclusiveTrylockFunction) 65 | PARSED_ATTR(ExtVectorType) 66 | PARSED_ATTR(FallThrough) 67 | PARSED_ATTR(FastCall) 68 | PARSED_ATTR(FlagEnum) 69 | PARSED_ATTR(Flatten) 70 | PARSED_ATTR(Format) 71 | PARSED_ATTR(FormatArg) 72 | PARSED_ATTR(GNUInline) 73 | PARSED_ATTR(GuardedBy) 74 | PARSED_ATTR(GuardedVar) 75 | PARSED_ATTR(HLSLAllowUAVCondition) 76 | PARSED_ATTR(HLSLBranch) 77 | PARSED_ATTR(HLSLCXXOverload) 78 | PARSED_ATTR(HLSLCall) 79 | PARSED_ATTR(HLSLCenter) 80 | PARSED_ATTR(HLSLCentroid) 81 | PARSED_ATTR(HLSLClipPlanes) 82 | PARSED_ATTR(HLSLColumnMajor) 83 | PARSED_ATTR(HLSLDomain) 84 | PARSED_ATTR(HLSLEarlyDepthStencil) 85 | PARSED_ATTR(HLSLExperimental) 86 | PARSED_ATTR(HLSLExport) 87 | PARSED_ATTR(HLSLFastOpt) 88 | PARSED_ATTR(HLSLFlatten) 89 | PARSED_ATTR(HLSLForceCase) 90 | PARSED_ATTR(HLSLGloballyCoherent) 91 | PARSED_ATTR(HLSLGroupShared) 92 | PARSED_ATTR(HLSLIn) 93 | PARSED_ATTR(HLSLInOut) 94 | PARSED_ATTR(HLSLIndices) 95 | PARSED_ATTR(HLSLInstance) 96 | PARSED_ATTR(HLSLIntrinsic) 97 | PARSED_ATTR(HLSLLine) 98 | PARSED_ATTR(HLSLLineAdj) 99 | PARSED_ATTR(HLSLLinear) 100 | PARSED_ATTR(HLSLLoop) 101 | PARSED_ATTR(HLSLMaxTessFactor) 102 | PARSED_ATTR(HLSLMaxVertexCount) 103 | PARSED_ATTR(HLSLMaybeUnused) 104 | PARSED_ATTR(HLSLNoInterpolation) 105 | PARSED_ATTR(HLSLNoPerspective) 106 | PARSED_ATTR(HLSLNumThreads) 107 | PARSED_ATTR(HLSLOut) 108 | PARSED_ATTR(HLSLOutputControlPoints) 109 | PARSED_ATTR(HLSLOutputTopology) 110 | PARSED_ATTR(HLSLPartitioning) 111 | PARSED_ATTR(HLSLPatchConstantFunc) 112 | PARSED_ATTR(HLSLPayload) 113 | PARSED_ATTR(HLSLPoint) 114 | PARSED_ATTR(HLSLPrecise) 115 | PARSED_ATTR(HLSLPrimitives) 116 | PARSED_ATTR(HLSLRayPayload) 117 | PARSED_ATTR(HLSLRootSignature) 118 | PARSED_ATTR(HLSLRowMajor) 119 | PARSED_ATTR(HLSLSample) 120 | PARSED_ATTR(HLSLSemantic) 121 | PARSED_ATTR(HLSLShader) 122 | PARSED_ATTR(HLSLShared) 123 | PARSED_ATTR(HLSLSnorm) 124 | PARSED_ATTR(HLSLTriangle) 125 | PARSED_ATTR(HLSLTriangleAdj) 126 | PARSED_ATTR(HLSLUniform) 127 | PARSED_ATTR(HLSLUnorm) 128 | PARSED_ATTR(HLSLUnroll) 129 | PARSED_ATTR(HLSLVertices) 130 | PARSED_ATTR(HLSLWaveOpsIncludeHelperLanes) 131 | PARSED_ATTR(HLSLWaveSensitive) 132 | PARSED_ATTR(HLSLWaveSize) 133 | PARSED_ATTR(Hot) 134 | PARSED_ATTR(IBAction) 135 | PARSED_ATTR(IBOutlet) 136 | PARSED_ATTR(IBOutletCollection) 137 | PARSED_ATTR(InitPriority) 138 | PARSED_ATTR(IntelOclBicc) 139 | PARSED_ATTR(LockReturned) 140 | PARSED_ATTR(Lockable) 141 | PARSED_ATTR(LocksExcluded) 142 | PARSED_ATTR(LoopHint) 143 | PARSED_ATTR(MSABI) 144 | PARSED_ATTR(MSInheritance) 145 | PARSED_ATTR(MSNoVTable) 146 | PARSED_ATTR(MSStruct) 147 | PARSED_ATTR(MayAlias) 148 | PARSED_ATTR(MinSize) 149 | PARSED_ATTR(Mips16) 150 | PARSED_ATTR(Mode) 151 | PARSED_ATTR(NSConsumed) 152 | PARSED_ATTR(NSConsumesSelf) 153 | PARSED_ATTR(NSReturnsAutoreleased) 154 | PARSED_ATTR(NSReturnsNotRetained) 155 | PARSED_ATTR(NSReturnsRetained) 156 | PARSED_ATTR(Naked) 157 | PARSED_ATTR(NeonPolyVectorType) 158 | PARSED_ATTR(NeonVectorType) 159 | PARSED_ATTR(NoCommon) 160 | PARSED_ATTR(NoDebug) 161 | PARSED_ATTR(NoDuplicate) 162 | PARSED_ATTR(NoInline) 163 | PARSED_ATTR(NoInstrumentFunction) 164 | PARSED_ATTR(NoMips16) 165 | PARSED_ATTR(NoReturn) 166 | PARSED_ATTR(NoSanitize) 167 | PARSED_ATTR(NoSanitizeSpecific) 168 | PARSED_ATTR(NoSplitStack) 169 | PARSED_ATTR(NoThreadSafetyAnalysis) 170 | PARSED_ATTR(NoThrow) 171 | PARSED_ATTR(NonNull) 172 | PARSED_ATTR(ObjCBoxable) 173 | PARSED_ATTR(ObjCBridge) 174 | PARSED_ATTR(ObjCBridgeMutable) 175 | PARSED_ATTR(ObjCBridgeRelated) 176 | PARSED_ATTR(ObjCDesignatedInitializer) 177 | PARSED_ATTR(ObjCException) 178 | PARSED_ATTR(ObjCExplicitProtocolImpl) 179 | PARSED_ATTR(ObjCGC) 180 | PARSED_ATTR(ObjCIndependentClass) 181 | PARSED_ATTR(ObjCKindOf) 182 | PARSED_ATTR(ObjCMethodFamily) 183 | PARSED_ATTR(ObjCNSObject) 184 | PARSED_ATTR(ObjCOwnership) 185 | PARSED_ATTR(ObjCPreciseLifetime) 186 | PARSED_ATTR(ObjCRequiresPropertyDefs) 187 | PARSED_ATTR(ObjCRequiresSuper) 188 | PARSED_ATTR(ObjCReturnsInnerPointer) 189 | PARSED_ATTR(ObjCRootClass) 190 | PARSED_ATTR(ObjCRuntimeName) 191 | PARSED_ATTR(OpenCLConstantAddressSpace) 192 | PARSED_ATTR(OpenCLGenericAddressSpace) 193 | PARSED_ATTR(OpenCLGlobalAddressSpace) 194 | PARSED_ATTR(OpenCLImageAccess) 195 | PARSED_ATTR(OpenCLKernel) 196 | PARSED_ATTR(OpenCLLocalAddressSpace) 197 | PARSED_ATTR(OpenCLPrivateAddressSpace) 198 | PARSED_ATTR(OptimizeNone) 199 | PARSED_ATTR(Overloadable) 200 | PARSED_ATTR(Ownership) 201 | PARSED_ATTR(Packed) 202 | PARSED_ATTR(ParamTypestate) 203 | PARSED_ATTR(Pascal) 204 | PARSED_ATTR(Pcs) 205 | PARSED_ATTR(PtGuardedBy) 206 | PARSED_ATTR(PtGuardedVar) 207 | PARSED_ATTR(Ptr32) 208 | PARSED_ATTR(Ptr64) 209 | PARSED_ATTR(Pure) 210 | PARSED_ATTR(Regparm) 211 | PARSED_ATTR(ReleaseCapability) 212 | PARSED_ATTR(ReqdWorkGroupSize) 213 | PARSED_ATTR(RequiresCapability) 214 | PARSED_ATTR(Restrict) 215 | PARSED_ATTR(ReturnTypestate) 216 | PARSED_ATTR(ReturnsNonNull) 217 | PARSED_ATTR(ReturnsTwice) 218 | PARSED_ATTR(SPtr) 219 | PARSED_ATTR(ScopedLockable) 220 | PARSED_ATTR(Section) 221 | PARSED_ATTR(SelectAny) 222 | PARSED_ATTR(Sentinel) 223 | PARSED_ATTR(SetTypestate) 224 | PARSED_ATTR(SharedTrylockFunction) 225 | PARSED_ATTR(StdCall) 226 | PARSED_ATTR(SysVABI) 227 | PARSED_ATTR(TLSModel) 228 | PARSED_ATTR(Target) 229 | PARSED_ATTR(TestTypestate) 230 | PARSED_ATTR(ThisCall) 231 | PARSED_ATTR(Thread) 232 | PARSED_ATTR(TransparentUnion) 233 | PARSED_ATTR(TryAcquireCapability) 234 | PARSED_ATTR(TypeNonNull) 235 | PARSED_ATTR(TypeNullUnspecified) 236 | PARSED_ATTR(TypeNullable) 237 | PARSED_ATTR(TypeTagForDatatype) 238 | PARSED_ATTR(TypeVisibility) 239 | PARSED_ATTR(UPtr) 240 | PARSED_ATTR(Unavailable) 241 | PARSED_ATTR(Unused) 242 | PARSED_ATTR(Used) 243 | PARSED_ATTR(Uuid) 244 | PARSED_ATTR(VKBinding) 245 | PARSED_ATTR(VKBuiltIn) 246 | PARSED_ATTR(VKCapabilityExt) 247 | PARSED_ATTR(VKCombinedImageSampler) 248 | PARSED_ATTR(VKConstantId) 249 | PARSED_ATTR(VKCounterBinding) 250 | PARSED_ATTR(VKDecorateExt) 251 | PARSED_ATTR(VKDecorateIdExt) 252 | PARSED_ATTR(VKDecorateStringExt) 253 | PARSED_ATTR(VKDepthUnchanged) 254 | PARSED_ATTR(VKEarlyAndLateTests) 255 | PARSED_ATTR(VKExtensionExt) 256 | PARSED_ATTR(VKImageFormat) 257 | PARSED_ATTR(VKIndex) 258 | PARSED_ATTR(VKInputAttachmentIndex) 259 | PARSED_ATTR(VKInstructionExt) 260 | PARSED_ATTR(VKLiteralExt) 261 | PARSED_ATTR(VKLocation) 262 | PARSED_ATTR(VKOffset) 263 | PARSED_ATTR(VKPostDepthCoverage) 264 | PARSED_ATTR(VKPushConstant) 265 | PARSED_ATTR(VKReferenceExt) 266 | PARSED_ATTR(VKShaderRecordEXT) 267 | PARSED_ATTR(VKShaderRecordNV) 268 | PARSED_ATTR(VKSpvExecutionMode) 269 | PARSED_ATTR(VKStencilRefGreaterEqualBack) 270 | PARSED_ATTR(VKStencilRefGreaterEqualFront) 271 | PARSED_ATTR(VKStencilRefLessEqualBack) 272 | PARSED_ATTR(VKStencilRefLessEqualFront) 273 | PARSED_ATTR(VKStencilRefUnchangedBack) 274 | PARSED_ATTR(VKStencilRefUnchangedFront) 275 | PARSED_ATTR(VKStorageClassExt) 276 | PARSED_ATTR(VKTypeDefExt) 277 | PARSED_ATTR(VecReturn) 278 | PARSED_ATTR(VecTypeHint) 279 | PARSED_ATTR(VectorCall) 280 | PARSED_ATTR(VectorSize) 281 | PARSED_ATTR(Visibility) 282 | PARSED_ATTR(WarnUnused) 283 | PARSED_ATTR(WarnUnusedResult) 284 | PARSED_ATTR(Weak) 285 | PARSED_ATTR(WeakImport) 286 | PARSED_ATTR(WeakRef) 287 | PARSED_ATTR(WorkGroupSizeHint) 288 | PARSED_ATTR(X86ForceAlignArgPointer) 289 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/AttrList.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* List of all attributes that Clang recognizes *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | #ifndef LAST_ATTR 10 | #define LAST_ATTR(NAME) ATTR(NAME) 11 | #endif 12 | 13 | #ifndef INHERITABLE_ATTR 14 | #define INHERITABLE_ATTR(NAME) ATTR(NAME) 15 | #endif 16 | 17 | #ifndef LAST_INHERITABLE_ATTR 18 | #define LAST_INHERITABLE_ATTR(NAME) INHERITABLE_ATTR(NAME) 19 | #endif 20 | 21 | #ifndef INHERITABLE_PARAM_ATTR 22 | #define INHERITABLE_PARAM_ATTR(NAME) ATTR(NAME) 23 | #endif 24 | 25 | #ifndef LAST_INHERITABLE_PARAM_ATTR 26 | #define LAST_INHERITABLE_PARAM_ATTR(NAME) INHERITABLE_PARAM_ATTR(NAME) 27 | #endif 28 | 29 | #ifndef PRAGMA_SPELLING_ATTR 30 | #define PRAGMA_SPELLING_ATTR(NAME) 31 | #endif 32 | 33 | #ifndef LAST_PRAGMA_SPELLING_ATTR 34 | #define LAST_PRAGMA_SPELLING_ATTR(NAME) PRAGMA_SPELLING_ATTR(NAME) 35 | #endif 36 | 37 | PRAGMA_SPELLING_ATTR(InitSeg) 38 | LAST_PRAGMA_SPELLING_ATTR(LoopHint) 39 | 40 | INHERITABLE_PARAM_ATTR(Annotate) 41 | INHERITABLE_PARAM_ATTR(CFConsumed) 42 | INHERITABLE_PARAM_ATTR(CarriesDependency) 43 | LAST_INHERITABLE_PARAM_ATTR(NSConsumed) 44 | 45 | INHERITABLE_ATTR(AMDGPUNumSGPR) 46 | INHERITABLE_ATTR(AMDGPUNumVGPR) 47 | INHERITABLE_ATTR(ARMInterrupt) 48 | INHERITABLE_ATTR(AcquireCapability) 49 | INHERITABLE_ATTR(AcquiredAfter) 50 | INHERITABLE_ATTR(AcquiredBefore) 51 | INHERITABLE_ATTR(AlignMac68k) 52 | INHERITABLE_ATTR(Aligned) 53 | INHERITABLE_ATTR(AlwaysInline) 54 | INHERITABLE_ATTR(AnalyzerNoReturn) 55 | INHERITABLE_ATTR(ArcWeakrefUnavailable) 56 | INHERITABLE_ATTR(ArgumentWithTypeTag) 57 | INHERITABLE_ATTR(AsmLabel) 58 | INHERITABLE_ATTR(AssertCapability) 59 | INHERITABLE_ATTR(AssertExclusiveLock) 60 | INHERITABLE_ATTR(AssertSharedLock) 61 | INHERITABLE_ATTR(AssumeAligned) 62 | INHERITABLE_ATTR(Availability) 63 | INHERITABLE_ATTR(Blocks) 64 | INHERITABLE_ATTR(C11NoReturn) 65 | INHERITABLE_ATTR(CDecl) 66 | INHERITABLE_ATTR(CFAuditedTransfer) 67 | INHERITABLE_ATTR(CFReturnsNotRetained) 68 | INHERITABLE_ATTR(CFReturnsRetained) 69 | INHERITABLE_ATTR(CFUnknownTransfer) 70 | INHERITABLE_ATTR(CUDAConstant) 71 | INHERITABLE_ATTR(CUDADevice) 72 | INHERITABLE_ATTR(CUDAGlobal) 73 | INHERITABLE_ATTR(CUDAHost) 74 | INHERITABLE_ATTR(CUDAInvalidTarget) 75 | INHERITABLE_ATTR(CUDALaunchBounds) 76 | INHERITABLE_ATTR(CUDAShared) 77 | INHERITABLE_ATTR(CXX11NoReturn) 78 | INHERITABLE_ATTR(CallableWhen) 79 | INHERITABLE_ATTR(Capability) 80 | INHERITABLE_ATTR(CapturedRecord) 81 | INHERITABLE_ATTR(Cleanup) 82 | INHERITABLE_ATTR(Cold) 83 | INHERITABLE_ATTR(Common) 84 | INHERITABLE_ATTR(Const) 85 | INHERITABLE_ATTR(Constructor) 86 | INHERITABLE_ATTR(Consumable) 87 | INHERITABLE_ATTR(ConsumableAutoCast) 88 | INHERITABLE_ATTR(ConsumableSetOnRead) 89 | INHERITABLE_ATTR(DLLExport) 90 | INHERITABLE_ATTR(DLLImport) 91 | INHERITABLE_ATTR(Deprecated) 92 | INHERITABLE_ATTR(Destructor) 93 | INHERITABLE_ATTR(EnableIf) 94 | INHERITABLE_ATTR(ExclusiveTrylockFunction) 95 | INHERITABLE_ATTR(FastCall) 96 | INHERITABLE_ATTR(Final) 97 | INHERITABLE_ATTR(FlagEnum) 98 | INHERITABLE_ATTR(Flatten) 99 | INHERITABLE_ATTR(Format) 100 | INHERITABLE_ATTR(FormatArg) 101 | INHERITABLE_ATTR(GNUInline) 102 | INHERITABLE_ATTR(GuardedBy) 103 | INHERITABLE_ATTR(GuardedVar) 104 | INHERITABLE_ATTR(HLSLCXXOverload) 105 | INHERITABLE_ATTR(HLSLCenter) 106 | INHERITABLE_ATTR(HLSLCentroid) 107 | INHERITABLE_ATTR(HLSLClipPlanes) 108 | INHERITABLE_ATTR(HLSLDomain) 109 | INHERITABLE_ATTR(HLSLEarlyDepthStencil) 110 | INHERITABLE_ATTR(HLSLExperimental) 111 | INHERITABLE_ATTR(HLSLExport) 112 | INHERITABLE_ATTR(HLSLGloballyCoherent) 113 | INHERITABLE_ATTR(HLSLGroupShared) 114 | INHERITABLE_ATTR(HLSLIn) 115 | INHERITABLE_ATTR(HLSLInOut) 116 | INHERITABLE_ATTR(HLSLIndices) 117 | INHERITABLE_ATTR(HLSLInstance) 118 | INHERITABLE_ATTR(HLSLIntrinsic) 119 | INHERITABLE_ATTR(HLSLLine) 120 | INHERITABLE_ATTR(HLSLLineAdj) 121 | INHERITABLE_ATTR(HLSLLinear) 122 | INHERITABLE_ATTR(HLSLMaxTessFactor) 123 | INHERITABLE_ATTR(HLSLMaxVertexCount) 124 | INHERITABLE_ATTR(HLSLMaybeUnused) 125 | INHERITABLE_ATTR(HLSLNoInterpolation) 126 | INHERITABLE_ATTR(HLSLNoPerspective) 127 | INHERITABLE_ATTR(HLSLNumThreads) 128 | INHERITABLE_ATTR(HLSLOut) 129 | INHERITABLE_ATTR(HLSLOutputControlPoints) 130 | INHERITABLE_ATTR(HLSLOutputTopology) 131 | INHERITABLE_ATTR(HLSLPartitioning) 132 | INHERITABLE_ATTR(HLSLPatchConstantFunc) 133 | INHERITABLE_ATTR(HLSLPayload) 134 | INHERITABLE_ATTR(HLSLPoint) 135 | INHERITABLE_ATTR(HLSLPrecise) 136 | INHERITABLE_ATTR(HLSLPrimitives) 137 | INHERITABLE_ATTR(HLSLRayPayload) 138 | INHERITABLE_ATTR(HLSLRootSignature) 139 | INHERITABLE_ATTR(HLSLSample) 140 | INHERITABLE_ATTR(HLSLSemantic) 141 | INHERITABLE_ATTR(HLSLShader) 142 | INHERITABLE_ATTR(HLSLShared) 143 | INHERITABLE_ATTR(HLSLSnorm) 144 | INHERITABLE_ATTR(HLSLTriangle) 145 | INHERITABLE_ATTR(HLSLTriangleAdj) 146 | INHERITABLE_ATTR(HLSLUniform) 147 | INHERITABLE_ATTR(HLSLUnorm) 148 | INHERITABLE_ATTR(HLSLVertices) 149 | INHERITABLE_ATTR(HLSLWaveOpsIncludeHelperLanes) 150 | INHERITABLE_ATTR(HLSLWaveSensitive) 151 | INHERITABLE_ATTR(HLSLWaveSize) 152 | INHERITABLE_ATTR(Hot) 153 | INHERITABLE_ATTR(IBAction) 154 | INHERITABLE_ATTR(IBOutlet) 155 | INHERITABLE_ATTR(IBOutletCollection) 156 | INHERITABLE_ATTR(InitPriority) 157 | INHERITABLE_ATTR(IntelOclBicc) 158 | INHERITABLE_ATTR(LockReturned) 159 | INHERITABLE_ATTR(LocksExcluded) 160 | INHERITABLE_ATTR(MSABI) 161 | INHERITABLE_ATTR(MSInheritance) 162 | INHERITABLE_ATTR(MSNoVTable) 163 | INHERITABLE_ATTR(MSP430Interrupt) 164 | INHERITABLE_ATTR(MSStruct) 165 | INHERITABLE_ATTR(MSVtorDisp) 166 | INHERITABLE_ATTR(MaxFieldAlignment) 167 | INHERITABLE_ATTR(MayAlias) 168 | INHERITABLE_ATTR(MinSize) 169 | INHERITABLE_ATTR(Mips16) 170 | INHERITABLE_ATTR(NSConsumesSelf) 171 | INHERITABLE_ATTR(NSReturnsAutoreleased) 172 | INHERITABLE_ATTR(NSReturnsNotRetained) 173 | INHERITABLE_ATTR(NSReturnsRetained) 174 | INHERITABLE_ATTR(Naked) 175 | INHERITABLE_ATTR(NoCommon) 176 | INHERITABLE_ATTR(NoDebug) 177 | INHERITABLE_ATTR(NoDuplicate) 178 | INHERITABLE_ATTR(NoInline) 179 | INHERITABLE_ATTR(NoInstrumentFunction) 180 | INHERITABLE_ATTR(NoMips16) 181 | INHERITABLE_ATTR(NoReturn) 182 | INHERITABLE_ATTR(NoSanitize) 183 | INHERITABLE_ATTR(NoSplitStack) 184 | INHERITABLE_ATTR(NoThreadSafetyAnalysis) 185 | INHERITABLE_ATTR(NoThrow) 186 | INHERITABLE_ATTR(NonNull) 187 | INHERITABLE_ATTR(OMPThreadPrivateDecl) 188 | INHERITABLE_ATTR(ObjCBridge) 189 | INHERITABLE_ATTR(ObjCBridgeMutable) 190 | INHERITABLE_ATTR(ObjCBridgeRelated) 191 | INHERITABLE_ATTR(ObjCException) 192 | INHERITABLE_ATTR(ObjCExplicitProtocolImpl) 193 | INHERITABLE_ATTR(ObjCIndependentClass) 194 | INHERITABLE_ATTR(ObjCMethodFamily) 195 | INHERITABLE_ATTR(ObjCNSObject) 196 | INHERITABLE_ATTR(ObjCPreciseLifetime) 197 | INHERITABLE_ATTR(ObjCRequiresPropertyDefs) 198 | INHERITABLE_ATTR(ObjCRequiresSuper) 199 | INHERITABLE_ATTR(ObjCReturnsInnerPointer) 200 | INHERITABLE_ATTR(ObjCRootClass) 201 | INHERITABLE_ATTR(OpenCLKernel) 202 | INHERITABLE_ATTR(OptimizeNone) 203 | INHERITABLE_ATTR(Override) 204 | INHERITABLE_ATTR(Ownership) 205 | INHERITABLE_ATTR(Packed) 206 | INHERITABLE_ATTR(ParamTypestate) 207 | INHERITABLE_ATTR(Pascal) 208 | INHERITABLE_ATTR(Pcs) 209 | INHERITABLE_ATTR(PtGuardedBy) 210 | INHERITABLE_ATTR(PtGuardedVar) 211 | INHERITABLE_ATTR(Pure) 212 | INHERITABLE_ATTR(ReleaseCapability) 213 | INHERITABLE_ATTR(ReqdWorkGroupSize) 214 | INHERITABLE_ATTR(RequiresCapability) 215 | INHERITABLE_ATTR(Restrict) 216 | INHERITABLE_ATTR(ReturnTypestate) 217 | INHERITABLE_ATTR(ReturnsNonNull) 218 | INHERITABLE_ATTR(ReturnsTwice) 219 | INHERITABLE_ATTR(ScopedLockable) 220 | INHERITABLE_ATTR(Section) 221 | INHERITABLE_ATTR(SelectAny) 222 | INHERITABLE_ATTR(Sentinel) 223 | INHERITABLE_ATTR(SetTypestate) 224 | INHERITABLE_ATTR(SharedTrylockFunction) 225 | INHERITABLE_ATTR(StdCall) 226 | INHERITABLE_ATTR(SysVABI) 227 | INHERITABLE_ATTR(TLSModel) 228 | INHERITABLE_ATTR(Target) 229 | INHERITABLE_ATTR(TestTypestate) 230 | INHERITABLE_ATTR(ThisCall) 231 | INHERITABLE_ATTR(TransparentUnion) 232 | INHERITABLE_ATTR(TryAcquireCapability) 233 | INHERITABLE_ATTR(TypeTagForDatatype) 234 | INHERITABLE_ATTR(TypeVisibility) 235 | INHERITABLE_ATTR(Unavailable) 236 | INHERITABLE_ATTR(Unused) 237 | INHERITABLE_ATTR(Used) 238 | INHERITABLE_ATTR(Uuid) 239 | INHERITABLE_ATTR(VKBinding) 240 | INHERITABLE_ATTR(VKBuiltIn) 241 | INHERITABLE_ATTR(VKCapabilityExt) 242 | INHERITABLE_ATTR(VKCombinedImageSampler) 243 | INHERITABLE_ATTR(VKConstantId) 244 | INHERITABLE_ATTR(VKCounterBinding) 245 | INHERITABLE_ATTR(VKDecorateExt) 246 | INHERITABLE_ATTR(VKDecorateIdExt) 247 | INHERITABLE_ATTR(VKDecorateStringExt) 248 | INHERITABLE_ATTR(VKDepthUnchanged) 249 | INHERITABLE_ATTR(VKEarlyAndLateTests) 250 | INHERITABLE_ATTR(VKExtensionExt) 251 | INHERITABLE_ATTR(VKImageFormat) 252 | INHERITABLE_ATTR(VKIndex) 253 | INHERITABLE_ATTR(VKInputAttachmentIndex) 254 | INHERITABLE_ATTR(VKInstructionExt) 255 | INHERITABLE_ATTR(VKLiteralExt) 256 | INHERITABLE_ATTR(VKLocation) 257 | INHERITABLE_ATTR(VKOffset) 258 | INHERITABLE_ATTR(VKPostDepthCoverage) 259 | INHERITABLE_ATTR(VKPushConstant) 260 | INHERITABLE_ATTR(VKReferenceExt) 261 | INHERITABLE_ATTR(VKShaderRecordEXT) 262 | INHERITABLE_ATTR(VKShaderRecordNV) 263 | INHERITABLE_ATTR(VKSpvExecutionMode) 264 | INHERITABLE_ATTR(VKStencilRefGreaterEqualBack) 265 | INHERITABLE_ATTR(VKStencilRefGreaterEqualFront) 266 | INHERITABLE_ATTR(VKStencilRefLessEqualBack) 267 | INHERITABLE_ATTR(VKStencilRefLessEqualFront) 268 | INHERITABLE_ATTR(VKStencilRefUnchangedBack) 269 | INHERITABLE_ATTR(VKStencilRefUnchangedFront) 270 | INHERITABLE_ATTR(VKStorageClassExt) 271 | INHERITABLE_ATTR(VKTypeDefExt) 272 | INHERITABLE_ATTR(VecReturn) 273 | INHERITABLE_ATTR(VecTypeHint) 274 | INHERITABLE_ATTR(VectorCall) 275 | INHERITABLE_ATTR(Visibility) 276 | INHERITABLE_ATTR(WarnUnused) 277 | INHERITABLE_ATTR(WarnUnusedResult) 278 | INHERITABLE_ATTR(Weak) 279 | INHERITABLE_ATTR(WeakImport) 280 | INHERITABLE_ATTR(WeakRef) 281 | INHERITABLE_ATTR(WorkGroupSizeHint) 282 | LAST_INHERITABLE_ATTR(X86ForceAlignArgPointer) 283 | 284 | ATTR(Alias) 285 | ATTR(AlignValue) 286 | ATTR(FallThrough) 287 | ATTR(HLSLAllowUAVCondition) 288 | ATTR(HLSLBranch) 289 | ATTR(HLSLCall) 290 | ATTR(HLSLFastOpt) 291 | ATTR(HLSLFlatten) 292 | ATTR(HLSLForceCase) 293 | ATTR(HLSLLoop) 294 | ATTR(HLSLUnroll) 295 | ATTR(InitSeg) 296 | ATTR(LoopHint) 297 | ATTR(Mode) 298 | ATTR(ObjCBoxable) 299 | ATTR(ObjCDesignatedInitializer) 300 | ATTR(ObjCRuntimeName) 301 | ATTR(OpenCLImageAccess) 302 | ATTR(Overloadable) 303 | LAST_ATTR(Thread) 304 | 305 | #undef LAST_ATTR 306 | #undef INHERITABLE_ATTR 307 | #undef LAST_INHERITABLE_ATTR 308 | #undef LAST_INHERITABLE_PARAM_ATTR 309 | #undef LAST_PRAGMA_ATTR 310 | #undef PRAGMA_SPELLING_ATTR 311 | #undef ATTR 312 | -------------------------------------------------------------------------------- /msvc/wrl/client.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file has no copyright assigned and is placed in the Public Domain. 3 | * This file is part of the mingw-w64 runtime package. 4 | * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 | */ 6 | 7 | #ifndef _WRL_CLIENT_H_ 8 | #define _WRL_CLIENT_H_ 9 | 10 | #include 11 | #include 12 | /* #include */ 13 | #include 14 | 15 | /* #include */ 16 | #include 17 | 18 | namespace Microsoft { 19 | namespace WRL { 20 | namespace Details { 21 | template class ComPtrRefBase { 22 | protected: 23 | T* ptr_; 24 | 25 | public: 26 | typedef typename T::InterfaceType InterfaceType; 27 | 28 | #ifndef __WRL_CLASSIC_COM__ 29 | operator IInspectable**() const throw() { 30 | static_assert(__is_base_of(IInspectable, InterfaceType), "Invalid cast"); 31 | return reinterpret_cast(ptr_->ReleaseAndGetAddressOf()); 32 | } 33 | #endif 34 | 35 | operator IUnknown**() const throw() { 36 | static_assert(__is_base_of(IUnknown, InterfaceType), "Invalid cast"); 37 | return reinterpret_cast(ptr_->ReleaseAndGetAddressOf()); 38 | } 39 | }; 40 | 41 | template class ComPtrRef : public Details::ComPtrRefBase { 42 | public: 43 | ComPtrRef(T *ptr) throw() { 44 | ComPtrRefBase::ptr_ = ptr; 45 | } 46 | 47 | operator void**() const throw() { 48 | return reinterpret_cast(ComPtrRefBase::ptr_->ReleaseAndGetAddressOf()); 49 | } 50 | 51 | operator T*() throw() { 52 | *ComPtrRefBase::ptr_ = nullptr; 53 | return ComPtrRefBase::ptr_; 54 | } 55 | 56 | operator typename ComPtrRefBase::InterfaceType**() throw() { 57 | return ComPtrRefBase::ptr_->ReleaseAndGetAddressOf(); 58 | } 59 | 60 | typename ComPtrRefBase::InterfaceType *operator*() throw() { 61 | return ComPtrRefBase::ptr_->Get(); 62 | } 63 | 64 | typename ComPtrRefBase::InterfaceType *const *GetAddressOf() const throw() { 65 | return ComPtrRefBase::ptr_->GetAddressOf(); 66 | } 67 | 68 | typename ComPtrRefBase::InterfaceType **ReleaseAndGetAddressOf() throw() { 69 | return ComPtrRefBase::ptr_->ReleaseAndGetAddressOf(); 70 | } 71 | }; 72 | 73 | } 74 | 75 | template class ComPtr { 76 | public: 77 | typedef T InterfaceType; 78 | 79 | ComPtr() throw() : ptr_(nullptr) {} 80 | ComPtr(decltype(nullptr)) throw() : ptr_(nullptr) {} 81 | 82 | template ComPtr(U *other) throw() : ptr_(other) { 83 | InternalAddRef(); 84 | } 85 | 86 | ComPtr(const ComPtr &other) throw() : ptr_(other.ptr_) { 87 | InternalAddRef(); 88 | } 89 | 90 | template 91 | ComPtr(const ComPtr &other) throw() : ptr_(other.Get()) { 92 | InternalAddRef(); 93 | } 94 | 95 | ComPtr(ComPtr &&other) throw() : ptr_(nullptr) { 96 | if(this != reinterpret_cast(&reinterpret_cast(other))) 97 | Swap(other); 98 | } 99 | 100 | template 101 | ComPtr(ComPtr&& other) throw() : ptr_(other.Detach()) {} 102 | 103 | ~ComPtr() throw() { 104 | InternalRelease(); 105 | } 106 | 107 | ComPtr &operator=(decltype(nullptr)) throw() { 108 | InternalRelease(); 109 | return *this; 110 | } 111 | 112 | ComPtr &operator=(InterfaceType *other) throw() { 113 | if (ptr_ != other) { 114 | InternalRelease(); 115 | ptr_ = other; 116 | InternalAddRef(); 117 | } 118 | return *this; 119 | } 120 | 121 | template 122 | ComPtr &operator=(U *other) throw() { 123 | if (ptr_ != other) { 124 | InternalRelease(); 125 | ptr_ = other; 126 | InternalAddRef(); 127 | } 128 | return *this; 129 | } 130 | 131 | ComPtr& operator=(const ComPtr &other) throw() { 132 | if (ptr_ != other.ptr_) 133 | ComPtr(other).Swap(*this); 134 | return *this; 135 | } 136 | 137 | template 138 | ComPtr &operator=(const ComPtr &other) throw() { 139 | ComPtr(other).Swap(*this); 140 | return *this; 141 | } 142 | 143 | ComPtr& operator=(ComPtr &&other) throw() { 144 | ComPtr(other).Swap(*this); 145 | return *this; 146 | } 147 | 148 | template 149 | ComPtr& operator=(ComPtr &&other) throw() { 150 | ComPtr(other).Swap(*this); 151 | return *this; 152 | } 153 | 154 | void Swap(ComPtr &&r) throw() { 155 | InterfaceType *tmp = ptr_; 156 | ptr_ = r.ptr_; 157 | r.ptr_ = tmp; 158 | } 159 | 160 | void Swap(ComPtr &r) throw() { 161 | InterfaceType *tmp = ptr_; 162 | ptr_ = r.ptr_; 163 | r.ptr_ = tmp; 164 | } 165 | 166 | operator Details::BoolType() const throw() { 167 | return Get() != nullptr ? &Details::BoolStruct::Member : nullptr; 168 | } 169 | 170 | InterfaceType *Get() const throw() { 171 | return ptr_; 172 | } 173 | 174 | InterfaceType *operator->() const throw() { 175 | return ptr_; 176 | } 177 | 178 | Details::ComPtrRef> operator&() throw() { 179 | return Details::ComPtrRef>(this); 180 | } 181 | 182 | const Details::ComPtrRef> operator&() const throw() { 183 | return Details::ComPtrRef>(this); 184 | } 185 | 186 | InterfaceType *const *GetAddressOf() const throw() { 187 | return &ptr_; 188 | } 189 | 190 | InterfaceType **GetAddressOf() throw() { 191 | return &ptr_; 192 | } 193 | 194 | InterfaceType **ReleaseAndGetAddressOf() throw() { 195 | InternalRelease(); 196 | return &ptr_; 197 | } 198 | 199 | InterfaceType *Detach() throw() { 200 | T* ptr = ptr_; 201 | ptr_ = nullptr; 202 | return ptr; 203 | } 204 | 205 | void Attach(InterfaceType *other) throw() { 206 | if (ptr_ != other) { 207 | InternalRelease(); 208 | ptr_ = other; 209 | InternalAddRef(); 210 | } 211 | } 212 | 213 | unsigned long Reset() { 214 | return InternalRelease(); 215 | } 216 | 217 | HRESULT CopyTo(InterfaceType **ptr) const throw() { 218 | InternalAddRef(); 219 | *ptr = ptr_; 220 | return S_OK; 221 | } 222 | 223 | HRESULT CopyTo(REFIID riid, void **ptr) const throw() { 224 | return ptr_->QueryInterface(riid, ptr); 225 | } 226 | 227 | template 228 | HRESULT CopyTo(U **ptr) const throw() { 229 | return ptr_->QueryInterface(__uuidof(U), reinterpret_cast(ptr)); 230 | } 231 | 232 | template 233 | HRESULT As(Details::ComPtrRef> p) const throw() { 234 | return ptr_->QueryInterface(__uuidof(U), p); 235 | } 236 | 237 | template 238 | HRESULT As(ComPtr *p) const throw() { 239 | return ptr_->QueryInterface(__uuidof(U), reinterpret_cast(p->ReleaseAndGetAddressOf())); 240 | } 241 | 242 | HRESULT AsIID(REFIID riid, ComPtr *p) const throw() { 243 | return ptr_->QueryInterface(riid, reinterpret_cast(p->ReleaseAndGetAddressOf())); 244 | } 245 | 246 | /* 247 | HRESULT AsWeak(WeakRef *pWeakRef) const throw() { 248 | return ::Microsoft::WRL::AsWeak(ptr_, pWeakRef); 249 | } 250 | */ 251 | protected: 252 | InterfaceType *ptr_; 253 | 254 | void InternalAddRef() const throw() { 255 | if(ptr_) 256 | ptr_->AddRef(); 257 | } 258 | 259 | unsigned long InternalRelease() throw() { 260 | InterfaceType *tmp = ptr_; 261 | if(!tmp) 262 | return 0; 263 | ptr_ = nullptr; 264 | return tmp->Release(); 265 | } 266 | }; 267 | } 268 | } 269 | 270 | template 271 | void **IID_PPV_ARGS_Helper(::Microsoft::WRL::Details::ComPtrRef pp) throw() { 272 | static_assert(__is_base_of(IUnknown, typename T::InterfaceType), "Expected COM interface"); 273 | return pp; 274 | } 275 | 276 | namespace Windows { 277 | namespace Foundation { 278 | template 279 | inline HRESULT ActivateInstance(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef instance) throw() { 280 | return ActivateInstance(classid, instance.ReleaseAndGetAddressOf()); 281 | } 282 | 283 | template 284 | inline HRESULT GetActivationFactory(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef factory) throw() { 285 | return RoGetActivationFactory(classid, IID_INS_ARGS(factory.ReleaseAndGetAddressOf())); 286 | } 287 | } 288 | } 289 | 290 | namespace ABI { 291 | namespace Windows { 292 | namespace Foundation { 293 | template 294 | inline HRESULT ActivateInstance(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef instance) throw() { 295 | return ActivateInstance(classid, instance.ReleaseAndGetAddressOf()); 296 | } 297 | 298 | template 299 | inline HRESULT GetActivationFactory(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef factory) throw() { 300 | return RoGetActivationFactory(classid, IID_INS_ARGS(factory.ReleaseAndGetAddressOf())); 301 | } 302 | } 303 | } 304 | } 305 | 306 | #endif 307 | -------------------------------------------------------------------------------- /generated-include/DxcDisassembler.inc: -------------------------------------------------------------------------------- 1 | // DxcDisassembler.inc - Generated by hctgen.py 2 | // DO NOT MODIFY!!! 3 | // Changes to this code are made in gen_intrin_main.txt 4 | 5 | static const char *OpCodeSignatures[] = { 6 | "(index)", // TempRegLoad 7 | "(index,value)", // TempRegStore 8 | "(regIndex,index,component)", // MinPrecXRegLoad 9 | "(regIndex,index,component,value)", // MinPrecXRegStore 10 | "(inputSigId,rowIndex,colIndex,gsVertexAxis)", // LoadInput 11 | "(outputSigId,rowIndex,colIndex,value)", // StoreOutput 12 | "(value)", // FAbs 13 | "(value)", // Saturate 14 | "(value)", // IsNaN 15 | "(value)", // IsInf 16 | "(value)", // IsFinite 17 | "(value)", // IsNormal 18 | "(value)", // Cos 19 | "(value)", // Sin 20 | "(value)", // Tan 21 | "(value)", // Acos 22 | "(value)", // Asin 23 | "(value)", // Atan 24 | "(value)", // Hcos 25 | "(value)", // Hsin 26 | "(value)", // Htan 27 | "(value)", // Exp 28 | "(value)", // Frc 29 | "(value)", // Log 30 | "(value)", // Sqrt 31 | "(value)", // Rsqrt 32 | "(value)", // Round_ne 33 | "(value)", // Round_ni 34 | "(value)", // Round_pi 35 | "(value)", // Round_z 36 | "(value)", // Bfrev 37 | "(value)", // Countbits 38 | "(value)", // FirstbitLo 39 | "(value)", // FirstbitHi 40 | "(value)", // FirstbitSHi 41 | "(a,b)", // FMax 42 | "(a,b)", // FMin 43 | "(a,b)", // IMax 44 | "(a,b)", // IMin 45 | "(a,b)", // UMax 46 | "(a,b)", // UMin 47 | "(a,b)", // IMul 48 | "(a,b)", // UMul 49 | "(a,b)", // UDiv 50 | "(a,b)", // UAddc 51 | "(a,b)", // USubb 52 | "(a,b,c)", // FMad 53 | "(a,b,c)", // Fma 54 | "(a,b,c)", // IMad 55 | "(a,b,c)", // UMad 56 | "(a,b,c)", // Msad 57 | "(a,b,c)", // Ibfe 58 | "(a,b,c)", // Ubfe 59 | "(width,offset,value,replacedValue)", // Bfi 60 | "(ax,ay,bx,by)", // Dot2 61 | "(ax,ay,az,bx,by,bz)", // Dot3 62 | "(ax,ay,az,aw,bx,by,bz,bw)", // Dot4 63 | "(resourceClass,rangeId,index,nonUniformIndex)", // CreateHandle 64 | "(handle,byteOffset,alignment)", // CBufferLoad 65 | "(handle,regIndex)", // CBufferLoadLegacy 66 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,clamp)", // Sample 67 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,bias,clamp)", // SampleBias 68 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,LOD)", // SampleLevel 69 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,ddx0,ddx1,ddx2,ddy0,ddy1,ddy2,clamp)", // SampleGrad 70 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,compareValue,clamp)", // SampleCmp 71 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,compareValue)", // SampleCmpLevelZero 72 | "(srv,mipLevelOrSampleCount,coord0,coord1,coord2,offset0,offset1,offset2)", // TextureLoad 73 | "(srv,coord0,coord1,coord2,value0,value1,value2,value3,mask)", // TextureStore 74 | "(srv,index,wot)", // BufferLoad 75 | "(uav,coord0,coord1,value0,value1,value2,value3,mask)", // BufferStore 76 | "(uav,inc)", // BufferUpdateCounter 77 | "(status)", // CheckAccessFullyMapped 78 | "(handle,mipLevel)", // GetDimensions 79 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,channel)", // TextureGather 80 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,channel,compareValue)", // TextureGatherCmp 81 | "(srv,index)", // Texture2DMSGetSamplePosition 82 | "(index)", // RenderTargetGetSamplePosition 83 | "()", // RenderTargetGetSampleCount 84 | "(handle,atomicOp,offset0,offset1,offset2,newValue)", // AtomicBinOp 85 | "(handle,offset0,offset1,offset2,compareValue,newValue)", // AtomicCompareExchange 86 | "(barrierMode)", // Barrier 87 | "(handle,sampler,coord0,coord1,coord2,clamped)", // CalculateLOD 88 | "(condition)", // Discard 89 | "(value)", // DerivCoarseX 90 | "(value)", // DerivCoarseY 91 | "(value)", // DerivFineX 92 | "(value)", // DerivFineY 93 | "(inputSigId,inputRowIndex,inputColIndex,offsetX,offsetY)", // EvalSnapped 94 | "(inputSigId,inputRowIndex,inputColIndex,sampleIndex)", // EvalSampleIndex 95 | "(inputSigId,inputRowIndex,inputColIndex)", // EvalCentroid 96 | "()", // SampleIndex 97 | "()", // Coverage 98 | "()", // InnerCoverage 99 | "(component)", // ThreadId 100 | "(component)", // GroupId 101 | "(component)", // ThreadIdInGroup 102 | "()", // FlattenedThreadIdInGroup 103 | "(streamId)", // EmitStream 104 | "(streamId)", // CutStream 105 | "(streamId)", // EmitThenCutStream 106 | "()", // GSInstanceID 107 | "(lo,hi)", // MakeDouble 108 | "(value)", // SplitDouble 109 | "(inputSigId,row,col,index)", // LoadOutputControlPoint 110 | "(inputSigId,row,col)", // LoadPatchConstant 111 | "(component)", // DomainLocation 112 | "(outputSigID,row,col,value)", // StorePatchConstant 113 | "()", // OutputControlPointID 114 | "()", // PrimitiveID 115 | "()", // CycleCounterLegacy 116 | "()", // WaveIsFirstLane 117 | "()", // WaveGetLaneIndex 118 | "()", // WaveGetLaneCount 119 | "(cond)", // WaveAnyTrue 120 | "(cond)", // WaveAllTrue 121 | "(value)", // WaveActiveAllEqual 122 | "(cond)", // WaveActiveBallot 123 | "(value,lane)", // WaveReadLaneAt 124 | "(value)", // WaveReadLaneFirst 125 | "(value,op,sop)", // WaveActiveOp 126 | "(value,op)", // WaveActiveBit 127 | "(value,op,sop)", // WavePrefixOp 128 | "(value,quadLane)", // QuadReadLaneAt 129 | "(value,op)", // QuadOp 130 | "(value)", // BitcastI16toF16 131 | "(value)", // BitcastF16toI16 132 | "(value)", // BitcastI32toF32 133 | "(value)", // BitcastF32toI32 134 | "(value)", // BitcastI64toF64 135 | "(value)", // BitcastF64toI64 136 | "(value)", // LegacyF32ToF16 137 | "(value)", // LegacyF16ToF32 138 | "(value)", // LegacyDoubleToFloat 139 | "(value)", // LegacyDoubleToSInt32 140 | "(value)", // LegacyDoubleToUInt32 141 | "(value)", // WaveAllBitCount 142 | "(value)", // WavePrefixBitCount 143 | "(inputSigId,inputRowIndex,inputColIndex,VertexID)", // AttributeAtVertex 144 | "()", // ViewID 145 | "(srv,index,elementOffset,mask,alignment)", // RawBufferLoad 146 | "(uav,index,elementOffset,value0,value1,value2,value3,mask,alignment)", // RawBufferStore 147 | "()", // InstanceID 148 | "()", // InstanceIndex 149 | "()", // HitKind 150 | "()", // RayFlags 151 | "(col)", // DispatchRaysIndex 152 | "(col)", // DispatchRaysDimensions 153 | "(col)", // WorldRayOrigin 154 | "(col)", // WorldRayDirection 155 | "(col)", // ObjectRayOrigin 156 | "(col)", // ObjectRayDirection 157 | "(row,col)", // ObjectToWorld 158 | "(row,col)", // WorldToObject 159 | "()", // RayTMin 160 | "()", // RayTCurrent 161 | "()", // IgnoreHit 162 | "()", // AcceptHitAndEndSearch 163 | "(AccelerationStructure,RayFlags,InstanceInclusionMask,RayContributionToHitGroupIndex,MultiplierForGeometryContributionToShaderIndex,MissShaderIndex,Origin_X,Origin_Y,Origin_Z,TMin,Direction_X,Direction_Y,Direction_Z,TMax,payload)", // TraceRay 164 | "(THit,HitKind,Attributes)", // ReportHit 165 | "(ShaderIndex,Parameter)", // CallShader 166 | "(Resource)", // CreateHandleForLib 167 | "()", // PrimitiveIndex 168 | "(acc,ax,ay,bx,by)", // Dot2AddHalf 169 | "(acc,a,b)", // Dot4AddI8Packed 170 | "(acc,a,b)", // Dot4AddU8Packed 171 | "(value)", // WaveMatch 172 | "(value,mask0,mask1,mask2,mask3,op,sop)", // WaveMultiPrefixOp 173 | "(value,mask0,mask1,mask2,mask3)", // WaveMultiPrefixBitCount 174 | "(numVertices,numPrimitives)", // SetMeshOutputCounts 175 | "(PrimitiveIndex,VertexIndex0,VertexIndex1,VertexIndex2)", // EmitIndices 176 | "()", // GetMeshPayload 177 | "(outputSigId,rowIndex,colIndex,value,vertexIndex)", // StoreVertexOutput 178 | "(outputSigId,rowIndex,colIndex,value,primitiveIndex)", // StorePrimitiveOutput 179 | "(threadGroupCountX,threadGroupCountY,threadGroupCountZ,payload)", // DispatchMesh 180 | "(feedbackTex,sampledTex,sampler,c0,c1,c2,c3,clamp)", // WriteSamplerFeedback 181 | "(feedbackTex,sampledTex,sampler,c0,c1,c2,c3,bias,clamp)", // WriteSamplerFeedbackBias 182 | "(feedbackTex,sampledTex,sampler,c0,c1,c2,c3,lod)", // WriteSamplerFeedbackLevel 183 | "(feedbackTex,sampledTex,sampler,c0,c1,c2,c3,ddx0,ddx1,ddx2,ddy0,ddy1,ddy2,clamp)", // WriteSamplerFeedbackGrad 184 | "(constRayFlags)", // AllocateRayQuery 185 | "(rayQueryHandle,accelerationStructure,rayFlags,instanceInclusionMask,origin_X,origin_Y,origin_Z,tMin,direction_X,direction_Y,direction_Z,tMax)", // RayQuery_TraceRayInline 186 | "(rayQueryHandle)", // RayQuery_Proceed 187 | "(rayQueryHandle)", // RayQuery_Abort 188 | "(rayQueryHandle)", // RayQuery_CommitNonOpaqueTriangleHit 189 | "(rayQueryHandle,t)", // RayQuery_CommitProceduralPrimitiveHit 190 | "(rayQueryHandle)", // RayQuery_CommittedStatus 191 | "(rayQueryHandle)", // RayQuery_CandidateType 192 | "(rayQueryHandle,row,col)", // RayQuery_CandidateObjectToWorld3x4 193 | "(rayQueryHandle,row,col)", // RayQuery_CandidateWorldToObject3x4 194 | "(rayQueryHandle,row,col)", // RayQuery_CommittedObjectToWorld3x4 195 | "(rayQueryHandle,row,col)", // RayQuery_CommittedWorldToObject3x4 196 | "(rayQueryHandle)", // RayQuery_CandidateProceduralPrimitiveNonOpaque 197 | "(rayQueryHandle)", // RayQuery_CandidateTriangleFrontFace 198 | "(rayQueryHandle)", // RayQuery_CommittedTriangleFrontFace 199 | "(rayQueryHandle,component)", // RayQuery_CandidateTriangleBarycentrics 200 | "(rayQueryHandle,component)", // RayQuery_CommittedTriangleBarycentrics 201 | "(rayQueryHandle)", // RayQuery_RayFlags 202 | "(rayQueryHandle,component)", // RayQuery_WorldRayOrigin 203 | "(rayQueryHandle,component)", // RayQuery_WorldRayDirection 204 | "(rayQueryHandle)", // RayQuery_RayTMin 205 | "(rayQueryHandle)", // RayQuery_CandidateTriangleRayT 206 | "(rayQueryHandle)", // RayQuery_CommittedRayT 207 | "(rayQueryHandle)", // RayQuery_CandidateInstanceIndex 208 | "(rayQueryHandle)", // RayQuery_CandidateInstanceID 209 | "(rayQueryHandle)", // RayQuery_CandidateGeometryIndex 210 | "(rayQueryHandle)", // RayQuery_CandidatePrimitiveIndex 211 | "(rayQueryHandle,component)", // RayQuery_CandidateObjectRayOrigin 212 | "(rayQueryHandle,component)", // RayQuery_CandidateObjectRayDirection 213 | "(rayQueryHandle)", // RayQuery_CommittedInstanceIndex 214 | "(rayQueryHandle)", // RayQuery_CommittedInstanceID 215 | "(rayQueryHandle)", // RayQuery_CommittedGeometryIndex 216 | "(rayQueryHandle)", // RayQuery_CommittedPrimitiveIndex 217 | "(rayQueryHandle,component)", // RayQuery_CommittedObjectRayOrigin 218 | "(rayQueryHandle,component)", // RayQuery_CommittedObjectRayDirection 219 | "()", // GeometryIndex 220 | "(rayQueryHandle)", // RayQuery_CandidateInstanceContributionToHitGroupIndex 221 | "(rayQueryHandle)", // RayQuery_CommittedInstanceContributionToHitGroupIndex 222 | "(res,props)", // AnnotateHandle 223 | "(bind,index,nonUniformIndex)", // CreateHandleFromBinding 224 | "(index,samplerHeap,nonUniformIndex)", // CreateHandleFromHeap 225 | "(unpackMode,pk)", // Unpack4x8 226 | "(packMode,x,y,z,w)", // Pack4x8 227 | "()", // IsHelperLane 228 | "(cond,op)", // QuadVote 229 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1)", // TextureGatherRaw 230 | "(srv,sampler,coord0,coord1,coord2,coord3,offset0,offset1,offset2,compareValue,lod)", // SampleCmpLevel 231 | "(srv,coord0,coord1,coord2,value0,value1,value2,value3,mask,sampleIdx)" // TextureStoreSample 232 | }; 233 | 234 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/DiagnosticCommonKinds.inc: -------------------------------------------------------------------------------- 1 | #ifdef COMMONSTART 2 | __COMMONSTART = DIAG_START_COMMON, 3 | #undef COMMONSTART 4 | #endif 5 | 6 | DIAG(err_arcmt_nsinvocation_ownership, CLASS_ERROR, (unsigned)diag::Severity::Error, "NSInvocation's %0 is not safe to be used with an object with ownership other than __unsafe_unretained", 0, SFINAE_SubstitutionFailure, false, true, 0) 7 | DIAG(err_attribute_not_type_attr, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 attribute cannot be applied to types", 0, SFINAE_SubstitutionFailure, false, true, 4) 8 | DIAG(err_cannot_open_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "cannot open file '%0': %1", 0, SFINAE_SubstitutionFailure, false, true, 0) 9 | DIAG(err_default_special_members, CLASS_ERROR, (unsigned)diag::Severity::Error, "only special member functions may be defaulted", 0, SFINAE_SubstitutionFailure, false, true, 4) 10 | DIAG(err_deleted_non_function, CLASS_ERROR, (unsigned)diag::Severity::Error, "only functions can have deleted definitions", 0, SFINAE_SubstitutionFailure, false, true, 4) 11 | DIAG(err_enum_template, CLASS_ERROR, (unsigned)diag::Severity::Error, "enumeration cannot be a template", 0, SFINAE_SubstitutionFailure, false, true, 4) 12 | DIAG(err_expected, CLASS_ERROR, (unsigned)diag::Severity::Error, "expected %0", 0, SFINAE_SubstitutionFailure, false, true, 4) 13 | DIAG(err_expected_after, CLASS_ERROR, (unsigned)diag::Severity::Error, "expected %1 after %0", 0, SFINAE_SubstitutionFailure, false, true, 4) 14 | DIAG(err_expected_colon_after_setter_name, CLASS_ERROR, (unsigned)diag::Severity::Error, "method name referenced in property setter attribute must end with ':'", 0, SFINAE_SubstitutionFailure, false, true, 1) 15 | DIAG(err_expected_either, CLASS_ERROR, (unsigned)diag::Severity::Error, "expected %0 or %1", 0, SFINAE_SubstitutionFailure, false, true, 4) 16 | DIAG(err_expected_namespace_name, CLASS_ERROR, (unsigned)diag::Severity::Error, "expected namespace name", 0, SFINAE_SubstitutionFailure, false, true, 4) 17 | DIAG(err_expected_string_literal, CLASS_ERROR, (unsigned)diag::Severity::Error, "expected string literal %select{in %1|for diagnostic message in static_assert|for optional message in 'availability' attribute}0", 0, SFINAE_SubstitutionFailure, false, true, 1) 18 | DIAG(err_file_modified, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "file '%0' modified since it was first processed", 0, SFINAE_SubstitutionFailure, false, true, 0) 19 | DIAG(err_hlsl_variadic_templates, CLASS_ERROR, (unsigned)diag::Severity::Error, "variadic templates are not supported in HLSL", 0, SFINAE_SubstitutionFailure, false, true, 4) 20 | DIAG(err_integer_literal_too_large, CLASS_ERROR, (unsigned)diag::Severity::Error, "integer literal is too large to be represented in any %select{signed |}0integer type", 0, SFINAE_SubstitutionFailure, false, true, 0) 21 | DIAG(err_invalid_character_udl, CLASS_ERROR, (unsigned)diag::Severity::Error, "character literal with user-defined suffix cannot be used here", 0, SFINAE_SubstitutionFailure, false, true, 1) 22 | DIAG(err_invalid_numeric_udl, CLASS_ERROR, (unsigned)diag::Severity::Error, "numeric literal with user-defined suffix cannot be used here", 0, SFINAE_SubstitutionFailure, false, true, 1) 23 | DIAG(err_invalid_storage_class_in_func_decl, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid storage class specifier in function declarator", 0, SFINAE_SubstitutionFailure, false, true, 4) 24 | DIAG(err_invalid_string_udl, CLASS_ERROR, (unsigned)diag::Severity::Error, "string literal with user-defined suffix cannot be used here", 0, SFINAE_SubstitutionFailure, false, true, 1) 25 | DIAG(err_module_build_disabled, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "module '%0' is needed but has not been provided, and implicit use of module files is disabled", 0, SFINAE_SubstitutionFailure, false, true, 4) 26 | DIAG(err_module_cycle, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "cyclic dependency in module '%0': %1", 0, SFINAE_SubstitutionFailure, false, true, 4) 27 | DIAG(err_module_file_conflict, CLASS_ERROR, (unsigned)diag::Severity::Error, "module '%0' found in both '%1' and '%2'", 0, SFINAE_SubstitutionFailure, false, true, 0) 28 | DIAG(err_module_format_unhandled, CLASS_ERROR, (unsigned)diag::Severity::Error, "no handler registered for module format '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 29 | DIAG(err_module_lock_failure, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "could not acquire lock file for module '%0'", 0, SFINAE_SubstitutionFailure, false, true, 4) 30 | DIAG(err_module_lock_timeout, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "timed out waiting to acquire lock file for module '%0'", 0, SFINAE_SubstitutionFailure, false, true, 4) 31 | DIAG(err_module_not_built, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "could not build module '%0'", 0, SFINAE_SubstitutionFailure, false, true, 4) 32 | DIAG(err_module_not_found, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "module '%0' not found", 0, SFINAE_SubstitutionFailure, false, true, 4) 33 | DIAG(err_mt_message, CLASS_ERROR, (unsigned)diag::Severity::Error, "[rewriter] %0", 0, SFINAE_SubstitutionFailure, false, false, 0) 34 | DIAG(err_nullability_conflicting, CLASS_ERROR, (unsigned)diag::Severity::Error, "nullability specifier %0 conflicts with existing specifier %1", 0, SFINAE_SubstitutionFailure, false, true, 16) 35 | DIAG(err_opt_not_valid_with_opt, CLASS_ERROR, (unsigned)diag::Severity::Error, "option '%0' cannot be specified with '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 36 | DIAG(err_param_redefinition, CLASS_ERROR, (unsigned)diag::Severity::Error, "redefinition of parameter %0", 0, SFINAE_SubstitutionFailure, false, true, 4) 37 | DIAG(err_seh___except_block, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 only allowed in __except block or filter expression", 0, SFINAE_SubstitutionFailure, false, true, 0) 38 | DIAG(err_seh___except_filter, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 only allowed in __except filter expression", 0, SFINAE_SubstitutionFailure, false, true, 0) 39 | DIAG(err_seh___finally_block, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 only allowed in __finally block", 0, SFINAE_SubstitutionFailure, false, true, 0) 40 | DIAG(err_seh_expected_handler, CLASS_ERROR, (unsigned)diag::Severity::Error, "expected '__except' or '__finally' block", 0, SFINAE_SubstitutionFailure, false, true, 0) 41 | DIAG(err_target_unknown_abi, CLASS_ERROR, (unsigned)diag::Severity::Error, "unknown target ABI '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 42 | DIAG(err_target_unknown_cpu, CLASS_ERROR, (unsigned)diag::Severity::Error, "unknown target CPU '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 43 | DIAG(err_target_unknown_fpmath, CLASS_ERROR, (unsigned)diag::Severity::Error, "unknown FP unit '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 44 | DIAG(err_target_unknown_triple, CLASS_ERROR, (unsigned)diag::Severity::Error, "unknown target triple '%0', please use -triple or -arch", 0, SFINAE_SubstitutionFailure, false, true, 0) 45 | DIAG(err_target_unsupported_fpmath, CLASS_ERROR, (unsigned)diag::Severity::Error, "the '%0' unit is not supported with this instruction set", 0, SFINAE_SubstitutionFailure, false, true, 0) 46 | DIAG(err_target_unsupported_unaligned, CLASS_ERROR, (unsigned)diag::Severity::Error, "the %0 sub-architecture does not support unaligned accesses", 0, SFINAE_SubstitutionFailure, false, true, 0) 47 | DIAG(err_unable_to_make_temp, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to make temporary file: %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 48 | DIAG(err_unable_to_rename_temp, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to rename temporary '%0' to output file '%1': '%2'", 0, SFINAE_SubstitutionFailure, false, true, 0) 49 | DIAG(err_unsupported_bom, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "%0 byte order mark detected in '%1', but encoding is not supported", 0, SFINAE_SubstitutionFailure, false, true, 0) 50 | DIAG(ext_c99_longlong, CLASS_EXTENSION, (unsigned)diag::Severity::Ignored, "'long long' is an extension when C99 mode is not enabled", 288, SFINAE_Suppress, false, false, 0) 51 | DIAG(ext_cxx11_longlong, CLASS_EXTENSION, (unsigned)diag::Severity::Ignored, "'long long' is a C++11 extension", 71, SFINAE_Suppress, false, false, 0) 52 | DIAG(ext_integer_literal_too_large_for_signed, CLASS_EXTENSION, (unsigned)diag::Severity::Warning, "integer literal is too large to be represented in a signed integer type, interpreting as unsigned", 241, SFINAE_Suppress, false, false, 0) 53 | DIAG(ext_old_implicitly_unsigned_long_cxx, CLASS_EXTENSION, (unsigned)diag::Severity::Warning, "integer literal is too large to be represented in type 'long' and is subject to undefined behavior under C++98, interpreting as 'unsigned long'; this literal will %select{have type 'long long'|be ill-formed}0 in C++11 onwards", 65, SFINAE_Suppress, false, false, 0) 54 | DIAG(ext_variadic_templates, CLASS_EXTENSION, (unsigned)diag::Severity::Warning, "variadic templates are a C++11 extension", 69, SFINAE_Suppress, false, false, 4) 55 | DIAG(fatal_too_many_errors, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "too many errors emitted, stopping now", 0, SFINAE_SubstitutionFailure, false, true, 0) 56 | DIAG(note_also_found, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "also found", 0, SFINAE_Suppress, false, false, 0) 57 | DIAG(note_decl_hiding_tag_type, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "%1 %0 is hidden by a non-type declaration of %0 here", 0, SFINAE_Suppress, false, false, 4) 58 | DIAG(note_declared_at, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "declared here", 0, SFINAE_Suppress, false, false, 0) 59 | DIAG(note_duplicate_case_prev, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous case defined here", 0, SFINAE_Suppress, false, false, 0) 60 | DIAG(note_forward_declaration, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "forward declaration of %0", 0, SFINAE_Suppress, false, false, 0) 61 | DIAG(note_invalid_subexpr_in_const_expr, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "subexpression not valid in a constant expression", 0, SFINAE_Suppress, false, false, 0) 62 | DIAG(note_matching, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "to match this %0", 0, SFINAE_Suppress, false, false, 0) 63 | DIAG(note_mt_message, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "[rewriter] %0", 0, SFINAE_Suppress, false, false, 0) 64 | DIAG(note_possibility, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "one possibility", 0, SFINAE_Suppress, false, false, 0) 65 | DIAG(note_pragma_entered_here, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "#pragma entered here", 0, SFINAE_Suppress, false, false, 4) 66 | DIAG(note_previous_declaration, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous declaration is here", 0, SFINAE_Suppress, false, false, 0) 67 | DIAG(note_previous_definition, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous definition is here", 0, SFINAE_Suppress, false, false, 0) 68 | DIAG(note_previous_implicit_declaration, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous implicit declaration is here", 0, SFINAE_Suppress, false, false, 0) 69 | DIAG(note_previous_use, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "previous use is here", 0, SFINAE_Suppress, false, false, 0) 70 | DIAG(note_type_being_defined, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "definition of %0 is not complete until the closing '}'", 0, SFINAE_Suppress, false, false, 0) 71 | DIAG(note_using, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "using", 0, SFINAE_Suppress, false, false, 0) 72 | DIAG(warn_arcmt_nsalloc_realloc, CLASS_WARNING, (unsigned)diag::Severity::Warning, "[rewriter] call returns pointer to GC managed memory; it will become unmanaged in ARC", 0, SFINAE_Suppress, false, false, 0) 73 | DIAG(warn_conflicting_nullability_attr_overriding_param_types, CLASS_WARNING, (unsigned)diag::Severity::Warning, "conflicting nullability specifier on parameter types, %0 conflicts with existing specifier %1", 340, SFINAE_Suppress, false, false, 16) 74 | DIAG(warn_conflicting_nullability_attr_overriding_ret_types, CLASS_WARNING, (unsigned)diag::Severity::Warning, "conflicting nullability specifier on return types, %0 conflicts with existing specifier %1", 340, SFINAE_Suppress, false, false, 16) 75 | DIAG(warn_cxx98_compat_longlong, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "'long long' is incompatible with C++98", 85, SFINAE_Suppress, false, false, 0) 76 | DIAG(warn_cxx98_compat_variadic_templates, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "variadic templates are incompatible with C++98", 82, SFINAE_Suppress, false, false, 4) 77 | DIAG(warn_method_param_declaration, CLASS_WARNING, (unsigned)diag::Severity::Ignored, "redeclaration of method parameter %0", 153, SFINAE_Suppress, false, false, 4) 78 | DIAG(warn_method_param_redefinition, CLASS_WARNING, (unsigned)diag::Severity::Warning, "redefinition of method parameter %0", 0, SFINAE_Suppress, false, false, 4) 79 | DIAG(warn_mt_message, CLASS_WARNING, (unsigned)diag::Severity::Warning, "[rewriter] %0", 0, SFINAE_Suppress, false, false, 0) 80 | DIAG(warn_nullability_duplicate, CLASS_WARNING, (unsigned)diag::Severity::Warning, "duplicate nullability specifier %0", 340, SFINAE_Suppress, false, false, 16) 81 | DIAG(warn_old_implicitly_unsigned_long, CLASS_WARNING, (unsigned)diag::Severity::Warning, "integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C89; this literal will %select{have type 'long long'|be ill-formed}0 in C99 onwards", 88, SFINAE_Suppress, false, false, 0) 82 | DIAG(warn_old_implicitly_unsigned_long_cxx, CLASS_WARNING, (unsigned)diag::Severity::Warning, "integer literal is too large to be represented in type 'long', interpreting as 'unsigned long' per C++98; this literal will %select{have type 'long long'|be ill-formed}0 in C++11 onwards", 65, SFINAE_Suppress, false, false, 0) 83 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/DiagnosticFrontendKinds.inc: -------------------------------------------------------------------------------- 1 | #ifdef FRONTENDSTART 2 | __FRONTENDSTART = DIAG_START_FRONTEND, 3 | #undef FRONTENDSTART 4 | #endif 5 | 6 | DIAG(err_conflicting_module_files, CLASS_ERROR, (unsigned)diag::Severity::Error, "module '%0' is defined in both '%1' and '%2'", 0, SFINAE_SubstitutionFailure, false, true, 0) 7 | DIAG(err_conflicting_module_names, CLASS_ERROR, (unsigned)diag::Severity::Error, "conflicting module names specified: '-fmodule-name=%0' and '-fmodule-implementation-of %1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 8 | DIAG(err_fe_action_not_available, CLASS_ERROR, (unsigned)diag::Severity::Error, "action %0 not compiled in", 0, SFINAE_SubstitutionFailure, false, true, 0) 9 | DIAG(err_fe_backend_frame_larger_than, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0", 0, SFINAE_SubstitutionFailure, false, true, 13) 10 | DIAG(err_fe_backend_plugin, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0", 0, SFINAE_SubstitutionFailure, false, true, 13) 11 | DIAG(err_fe_cannot_link_module, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "cannot link module '%0': %1", 0, SFINAE_SubstitutionFailure, false, true, 0) 12 | DIAG(err_fe_dependency_file_requires_MT, CLASS_ERROR, (unsigned)diag::Severity::Error, "-dependency-file requires at least one -MT or -MQ option", 0, SFINAE_SubstitutionFailure, false, true, 0) 13 | DIAG(err_fe_error_backend, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "error in backend: %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 14 | DIAG(err_fe_error_opening, CLASS_ERROR, (unsigned)diag::Severity::Error, "error opening '%0': %1", 0, SFINAE_SubstitutionFailure, false, true, 0) 15 | DIAG(err_fe_error_reading, CLASS_ERROR, (unsigned)diag::Severity::Error, "error reading '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 16 | DIAG(err_fe_error_reading_stdin, CLASS_ERROR, (unsigned)diag::Severity::Error, "error reading stdin: %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 17 | DIAG(err_fe_expected_clang_command, CLASS_ERROR, (unsigned)diag::Severity::Error, "expected a clang compiler command", 0, SFINAE_SubstitutionFailure, false, true, 0) 18 | DIAG(err_fe_expected_compiler_job, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to handle compilation, expected exactly one compiler job in '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 19 | DIAG(err_fe_inline_asm, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0", 0, SFINAE_SubstitutionFailure, false, true, 11) 20 | DIAG(err_fe_invalid_code_complete_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "cannot locate code-completion file %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 21 | DIAG(err_fe_invalid_plugin_name, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to find plugin '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 22 | DIAG(err_fe_no_pch_in_dir, CLASS_ERROR, (unsigned)diag::Severity::Error, "no suitable precompiled header file found in directory '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 23 | DIAG(err_fe_pth_file_has_no_source_header, CLASS_ERROR, (unsigned)diag::Severity::Error, "PTH file '%0' does not designate an original source header file for -include-pth", 0, SFINAE_SubstitutionFailure, false, true, 0) 24 | DIAG(err_fe_remap_missing_from_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "could not remap from missing file '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 25 | DIAG(err_fe_remap_missing_to_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "could not remap file '%0' to the contents of file '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 26 | DIAG(err_fe_stdout_binary, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "unable to change standard output to binary", 0, SFINAE_SubstitutionFailure, false, true, 0) 27 | DIAG(err_fe_unable_to_create_target, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to create target: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 28 | DIAG(err_fe_unable_to_interface_with_target, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to interface with target machine", 0, SFINAE_SubstitutionFailure, false, true, 0) 29 | DIAG(err_fe_unable_to_load_pch, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to load PCH file", 0, SFINAE_SubstitutionFailure, false, true, 0) 30 | DIAG(err_fe_unable_to_load_plugin, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to load plugin '%0': '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 31 | DIAG(err_fe_unable_to_open_output, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to open output file '%0': '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 32 | DIAG(err_invalid_vfs_overlay, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "invalid virtual filesystem overlay file '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 33 | DIAG(err_missing_module, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "no module named '%0' declared in module map file '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 34 | DIAG(err_missing_module_name, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "no module name provided; specify one with -fmodule-name=", 0, SFINAE_SubstitutionFailure, false, true, 0) 35 | DIAG(err_missing_vfs_overlay_file, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "virtual filesystem overlay file '%0' not found", 0, SFINAE_SubstitutionFailure, false, true, 0) 36 | DIAG(err_module_cannot_create_includes, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot create includes file for module %0: %1", 0, SFINAE_SubstitutionFailure, false, true, 0) 37 | DIAG(err_module_file_invalid, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "file '%0' is not a valid precompiled module file", 0, SFINAE_SubstitutionFailure, false, true, 0) 38 | DIAG(err_module_file_not_found, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "module file '%0' not found", 0, SFINAE_SubstitutionFailure, false, true, 0) 39 | DIAG(err_module_file_not_module, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "AST file '%0' was not built as a module", 0, SFINAE_SubstitutionFailure, false, true, 0) 40 | DIAG(err_module_header_missing, CLASS_ERROR, (unsigned)diag::Severity::Error, "%select{|umbrella }0header '%1' not found", 0, SFINAE_SubstitutionFailure, false, true, 0) 41 | DIAG(err_module_map_not_found, CLASS_ERROR, (unsigned)diag::Severity::Fatal, "module map file '%0' not found", 0, SFINAE_SubstitutionFailure, false, true, 0) 42 | DIAG(err_module_unavailable, CLASS_ERROR, (unsigned)diag::Severity::Error, "module '%0' %select{is incompatible with|requires}1 feature '%2'", 0, SFINAE_SubstitutionFailure, false, true, 0) 43 | DIAG(err_no_submodule, CLASS_ERROR, (unsigned)diag::Severity::Error, "no submodule named %0 in module '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 44 | DIAG(err_no_submodule_suggest, CLASS_ERROR, (unsigned)diag::Severity::Error, "no submodule named %0 in module '%1'; did you mean '%2'?", 0, SFINAE_SubstitutionFailure, false, true, 0) 45 | DIAG(err_relocatable_without_isysroot, CLASS_ERROR, (unsigned)diag::Severity::Error, "must specify system root with -isysroot when building a relocatable PCH file", 0, SFINAE_SubstitutionFailure, false, true, 0) 46 | DIAG(err_unknown_analyzer_checker, CLASS_ERROR, (unsigned)diag::Severity::Error, "no analyzer checkers are associated with '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 47 | DIAG(err_verify_inconsistent_diags, CLASS_ERROR, (unsigned)diag::Severity::Error, "'%0' diagnostics %select{expected|seen}1 but not %select{seen|expected}1: %2", 0, SFINAE_SubstitutionFailure, false, true, 0) 48 | DIAG(err_verify_invalid_content, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid expected %0: %1", 0, SFINAE_SubstitutionFailure, false, true, 0) 49 | DIAG(err_verify_invalid_no_diags, CLASS_ERROR, (unsigned)diag::Severity::Error, "%select{expected|'expected-no-diagnostics'}0 directive cannot follow %select{'expected-no-diagnostics' directive|other expected directives}0", 0, SFINAE_SubstitutionFailure, false, true, 0) 50 | DIAG(err_verify_invalid_range, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid range following '-' in expected %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 51 | DIAG(err_verify_missing_end, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot find end ('}}') of expected %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 52 | DIAG(err_verify_missing_file, CLASS_ERROR, (unsigned)diag::Severity::Error, "file '%0' could not be located in expected %1", 0, SFINAE_SubstitutionFailure, false, true, 0) 53 | DIAG(err_verify_missing_line, CLASS_ERROR, (unsigned)diag::Severity::Error, "missing or invalid line number following '@' in expected %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 54 | DIAG(err_verify_missing_regex, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot find start of regex ('{{') in %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 55 | DIAG(err_verify_missing_start, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot find start ('{{') of expected %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 56 | DIAG(err_verify_no_directives, CLASS_ERROR, (unsigned)diag::Severity::Error, "no expected directives found: consider use of 'expected-no-diagnostics'", 0, SFINAE_SubstitutionFailure, false, true, 0) 57 | DIAG(note_fe_backend_frame_larger_than, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "%0", 0, SFINAE_Suppress, false, true, 13) 58 | DIAG(note_fe_backend_optimization_remark_invalid_loc, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "could not determine the original source location for %0:%1:%2", 0, SFINAE_Suppress, false, false, 0) 59 | DIAG(note_fe_backend_plugin, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "%0", 0, SFINAE_Suppress, false, true, 13) 60 | DIAG(note_fe_inline_asm, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "%0", 0, SFINAE_Suppress, false, false, 11) 61 | DIAG(note_fe_inline_asm_here, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "instantiated into assembly here", 0, SFINAE_Suppress, false, false, 0) 62 | DIAG(note_fixit_applied, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "FIX-IT applied suggested code changes", 0, SFINAE_Suppress, false, false, 0) 63 | DIAG(note_fixit_failed, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "FIX-IT unable to apply suggested code changes", 0, SFINAE_Suppress, false, false, 0) 64 | DIAG(note_fixit_in_macro, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "FIX-IT unable to apply suggested code changes in a macro", 0, SFINAE_Suppress, false, false, 0) 65 | DIAG(note_fixit_unfixed_error, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "FIX-IT detected an error it cannot fix", 0, SFINAE_Suppress, false, false, 0) 66 | DIAG(note_incompatible_analyzer_plugin_api, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "current API version is '%0', but plugin was compiled with version '%1'", 0, SFINAE_Suppress, false, false, 0) 67 | DIAG(note_module_def_undef_here, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "macro was %select{defined|#undef'd}0 here", 0, SFINAE_Suppress, false, false, 0) 68 | DIAG(note_module_file_imported_by, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "imported by %select{|module '%2' in }1'%0'", 0, SFINAE_Suppress, false, false, 0) 69 | DIAG(note_suggest_disabling_all_checkers, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "use -analyzer-disable-all-checks to disable all static analyzer checkers", 0, SFINAE_Suppress, false, false, 0) 70 | DIAG(remark_fe_backend_optimization_remark, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "%0", 394, SFINAE_Suppress, false, true, 13) 71 | DIAG(remark_fe_backend_optimization_remark_analysis, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "%0", 395, SFINAE_Suppress, false, true, 13) 72 | DIAG(remark_fe_backend_optimization_remark_missed, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "%0", 397, SFINAE_Suppress, false, true, 13) 73 | DIAG(remark_fe_backend_plugin, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "%0", 431, SFINAE_Suppress, false, true, 13) 74 | DIAG(remark_module_build, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "building module '%0' as '%1'", 315, SFINAE_Suppress, false, false, 0) 75 | DIAG(remark_module_build_done, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "finished building module '%0'", 315, SFINAE_Suppress, false, false, 0) 76 | DIAG(remark_sanitize_address_insert_extra_padding_accepted, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "-fsanitize-address-field-padding applied to %0", 441, SFINAE_Suppress, false, true, 0) 77 | DIAG(remark_sanitize_address_insert_extra_padding_rejected, CLASS_REMARK, (unsigned)diag::Severity::Ignored, "-fsanitize-address-field-padding ignored for %0 because it %select{is not C++|is packed|is a union|is trivially copyable|has trivial destructor|is standard layout|is in a blacklisted file|is blacklisted}1", 441, SFINAE_Suppress, false, true, 0) 78 | DIAG(warn_fe_backend_frame_larger_than, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%0", 195, SFINAE_Suppress, false, true, 13) 79 | DIAG(warn_fe_backend_optimization_failure, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%0", 396, SFINAE_Suppress, false, true, 13) 80 | DIAG(warn_fe_backend_plugin, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%0", 47, SFINAE_Suppress, false, true, 13) 81 | DIAG(warn_fe_cc_log_diagnostics_failure, CLASS_WARNING, (unsigned)diag::Severity::Warning, "unable to open CC_LOG_DIAGNOSTICS file: %0 (using stderr)", 0, SFINAE_Suppress, false, false, 0) 82 | DIAG(warn_fe_cc_print_header_failure, CLASS_WARNING, (unsigned)diag::Severity::Warning, "unable to open CC_PRINT_HEADERS file: %0 (using stderr)", 0, SFINAE_Suppress, false, false, 0) 83 | DIAG(warn_fe_frame_larger_than, CLASS_WARNING, (unsigned)diag::Severity::Warning, "stack frame size of %0 bytes in %q1", 195, SFINAE_Suppress, false, true, 13) 84 | DIAG(warn_fe_inline_asm, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%0", 260, SFINAE_Suppress, false, false, 11) 85 | DIAG(warn_fe_macro_contains_embedded_newline, CLASS_WARNING, (unsigned)diag::Severity::Warning, "macro '%0' contains embedded newline; text after the newline is ignored", 0, SFINAE_Suppress, false, false, 0) 86 | DIAG(warn_fe_override_module, CLASS_WARNING, (unsigned)diag::Severity::Warning, "overriding the module target triple with %0", 384, SFINAE_Suppress, false, false, 0) 87 | DIAG(warn_fe_serialized_diag_failure, CLASS_WARNING, (unsigned)diag::Severity::Warning, "unable to open file %0 for serializing diagnostics (%1)", 452, SFINAE_Suppress, false, false, 0) 88 | DIAG(warn_fe_serialized_diag_merge_failure, CLASS_WARNING, (unsigned)diag::Severity::Warning, "unable to merge a subprocess's serialized diagnostics", 452, SFINAE_Suppress, false, false, 0) 89 | DIAG(warn_fixit_no_changes, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "FIX-IT detected errors it could not fix; no output will be generated", 0, SFINAE_Suppress, false, false, 0) 90 | DIAG(warn_incompatible_analyzer_plugin_api, CLASS_WARNING, (unsigned)diag::Severity::Warning, "checker plugin '%0' is not compatible with this version of the analyzer", 19, SFINAE_Suppress, false, false, 0) 91 | DIAG(warn_missing_submodule, CLASS_WARNING, (unsigned)diag::Severity::Warning, "missing submodule '%0'", 252, SFINAE_Suppress, false, false, 0) 92 | DIAG(warn_module_config_macro_undef, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%select{definition|#undef}0 of configuration macro '%1' has no effect on the import of '%2'; pass '%select{-D%1=...|-U%1}0' on the command line to configure the module", 103, SFINAE_Suppress, false, false, 0) 93 | DIAG(warn_unknown_diag_option, CLASS_WARNING, (unsigned)diag::Severity::Warning, "unknown %select{warning|remark}0 option '%1'%select{|; did you mean '%3'?}2", 538, SFINAE_Suppress, false, false, 0) 94 | DIAG(warn_unknown_warning_specifier, CLASS_WARNING, (unsigned)diag::Severity::Warning, "unknown %0 warning specifier: '%1'", 538, SFINAE_Suppress, false, false, 0) 95 | -------------------------------------------------------------------------------- /generated-include/clang/Basic/DiagnosticDriverKinds.inc: -------------------------------------------------------------------------------- 1 | #ifdef DRIVERSTART 2 | __DRIVERSTART = DIAG_START_DRIVER, 3 | #undef DRIVERSTART 4 | #endif 5 | 6 | DIAG(err_analyzer_config_multiple_values, CLASS_ERROR, (unsigned)diag::Severity::Error, "analyzer-config option '%0' should contain only one '='", 0, SFINAE_SubstitutionFailure, false, true, 0) 7 | DIAG(err_analyzer_config_no_value, CLASS_ERROR, (unsigned)diag::Severity::Error, "analyzer-config option '%0' has a key but no value", 0, SFINAE_SubstitutionFailure, false, true, 0) 8 | DIAG(err_arc_unsupported_on_runtime, CLASS_ERROR, (unsigned)diag::Severity::Error, "-fobjc-arc is not supported on platforms using the legacy runtime", 0, SFINAE_SubstitutionFailure, false, true, 0) 9 | DIAG(err_arc_unsupported_on_toolchain, CLASS_ERROR, (unsigned)diag::Severity::Error, "-fobjc-arc is not supported on versions of OS X prior to 10.6", 0, SFINAE_SubstitutionFailure, false, true, 0) 10 | DIAG(err_drv_I_dash_not_supported, CLASS_ERROR, (unsigned)diag::Severity::Error, "'%0' not supported, please use -iquote instead", 0, SFINAE_SubstitutionFailure, false, true, 0) 11 | DIAG(err_drv_argument_not_allowed_with, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid argument '%0' not allowed with '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 12 | DIAG(err_drv_argument_only_allowed_with, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid argument '%0' only allowed with '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 13 | DIAG(err_drv_cc_print_options_failure, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to open CC_PRINT_OPTIONS file: %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 14 | DIAG(err_drv_clang_unsupported, CLASS_ERROR, (unsigned)diag::Severity::Error, "the clang compiler does not support '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 15 | DIAG(err_drv_clang_unsupported_opt_cxx_darwin_i386, CLASS_ERROR, (unsigned)diag::Severity::Error, "the clang compiler does not support '%0' for C++ on Darwin/i386", 0, SFINAE_SubstitutionFailure, false, true, 0) 16 | DIAG(err_drv_command_failed, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 command failed with exit code %1 (use -v to see invocation)", 0, SFINAE_SubstitutionFailure, false, true, 0) 17 | DIAG(err_drv_command_failure, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to execute command: %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 18 | DIAG(err_drv_command_signalled, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 command failed due to signal (use -v to see invocation)", 0, SFINAE_SubstitutionFailure, false, true, 0) 19 | DIAG(err_drv_emit_llvm_link, CLASS_ERROR, (unsigned)diag::Severity::Error, "-emit-llvm cannot be used when linking", 0, SFINAE_SubstitutionFailure, false, true, 0) 20 | DIAG(err_drv_force_crash, CLASS_ERROR, (unsigned)diag::Severity::Error, "failing because environment variable '%0' is set", 0, SFINAE_SubstitutionFailure, false, true, 0) 21 | DIAG(err_drv_invalid_Xarch_argument_isdriver, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid Xarch argument: '%0', cannot change driver behavior inside Xarch argument", 0, SFINAE_SubstitutionFailure, false, true, 0) 22 | DIAG(err_drv_invalid_Xarch_argument_with_args, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid Xarch argument: '%0', options requiring arguments are unsupported", 0, SFINAE_SubstitutionFailure, false, true, 0) 23 | DIAG(err_drv_invalid_arch_name, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid arch name '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 24 | DIAG(err_drv_invalid_darwin_version, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid Darwin version number: %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 25 | DIAG(err_drv_invalid_gcc_output_type, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid output type '%0' for use with gcc tool", 0, SFINAE_SubstitutionFailure, false, true, 0) 26 | DIAG(err_drv_invalid_int_value, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid integral value '%1' in '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 27 | DIAG(err_drv_invalid_libcxx_deployment, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid deployment target for -stdlib=libc++ (requires %0 or later)", 0, SFINAE_SubstitutionFailure, false, true, 0) 28 | DIAG(err_drv_invalid_linker_name, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid linker name in argument '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 29 | DIAG(err_drv_invalid_mfloat_abi, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid float ABI '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 30 | DIAG(err_drv_invalid_output_with_multiple_archs, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot use '%0' output with multiple -arch options", 0, SFINAE_SubstitutionFailure, false, true, 0) 31 | DIAG(err_drv_invalid_remap_file, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid option '%0' not of the form ;", 0, SFINAE_SubstitutionFailure, false, true, 0) 32 | DIAG(err_drv_invalid_rtlib_name, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid runtime library name in argument '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 33 | DIAG(err_drv_invalid_stdlib_name, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid library name in argument '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 34 | DIAG(err_drv_invalid_thread_model_for_target, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid thread model '%0' in '%1' for this target", 0, SFINAE_SubstitutionFailure, false, true, 0) 35 | DIAG(err_drv_invalid_value, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid value '%1' in '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 36 | DIAG(err_drv_invalid_version_number, CLASS_ERROR, (unsigned)diag::Severity::Error, "invalid version number in '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 37 | DIAG(err_drv_malformed_sanitizer_blacklist, CLASS_ERROR, (unsigned)diag::Severity::Error, "malformed sanitizer blacklist: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 38 | DIAG(err_drv_mg_requires_m_or_mm, CLASS_ERROR, (unsigned)diag::Severity::Error, "option '-MG' requires '-M' or '-MM'", 0, SFINAE_SubstitutionFailure, false, true, 0) 39 | DIAG(err_drv_missing_argument, CLASS_ERROR, (unsigned)diag::Severity::Error, "argument to '%0' is missing (expected %1 value%s1)", 0, SFINAE_SubstitutionFailure, false, true, 0) 40 | DIAG(err_drv_modules_validate_once_requires_timestamp, CLASS_ERROR, (unsigned)diag::Severity::Error, "option '-fmodules-validate-once-per-build-session' requires '-fbuild-session-timestamp=' or '-fbuild-session-file='", 0, SFINAE_SubstitutionFailure, false, true, 0) 41 | DIAG(err_drv_no_ast_support, CLASS_ERROR, (unsigned)diag::Severity::Error, "'%0': unable to use AST files with this tool", 0, SFINAE_SubstitutionFailure, false, true, 0) 42 | DIAG(err_drv_no_input_files, CLASS_ERROR, (unsigned)diag::Severity::Error, "no input files", 0, SFINAE_SubstitutionFailure, false, true, 0) 43 | DIAG(err_drv_no_linker_llvm_support, CLASS_ERROR, (unsigned)diag::Severity::Error, "'%0': unable to pass LLVM bit-code files to linker", 0, SFINAE_SubstitutionFailure, false, true, 0) 44 | DIAG(err_drv_no_module_support, CLASS_ERROR, (unsigned)diag::Severity::Error, "'%0': unable to use module files with this tool", 0, SFINAE_SubstitutionFailure, false, true, 0) 45 | DIAG(err_drv_no_neon_modifier, CLASS_ERROR, (unsigned)diag::Severity::Error, "[no]neon is not accepted as modifier, please use [no]simd instead", 0, SFINAE_SubstitutionFailure, false, true, 0) 46 | DIAG(err_drv_no_such_file, CLASS_ERROR, (unsigned)diag::Severity::Error, "no such file or directory: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 47 | DIAG(err_drv_objc_gc_arr, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot specify both '-fobjc-arc' and '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 48 | DIAG(err_drv_optimization_remark_pattern, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 in '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 49 | DIAG(err_drv_out_file_argument_with_multiple_sources, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot specify '%0%1' when compiling multiple source files", 0, SFINAE_SubstitutionFailure, false, true, 0) 50 | DIAG(err_drv_output_argument_with_multiple_files, CLASS_ERROR, (unsigned)diag::Severity::Error, "cannot specify -o when generating multiple output files", 0, SFINAE_SubstitutionFailure, false, true, 0) 51 | DIAG(err_drv_preamble_format, CLASS_ERROR, (unsigned)diag::Severity::Error, "incorrect format for -preamble-bytes=N,END", 0, SFINAE_SubstitutionFailure, false, true, 0) 52 | DIAG(err_drv_unable_to_remove_file, CLASS_ERROR, (unsigned)diag::Severity::Error, "unable to remove file: %0", 0, SFINAE_SubstitutionFailure, false, true, 0) 53 | DIAG(err_drv_unknown_argument, CLASS_ERROR, (unsigned)diag::Severity::Error, "unknown argument: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 54 | DIAG(err_drv_unknown_language, CLASS_ERROR, (unsigned)diag::Severity::Error, "language not recognized: '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 55 | DIAG(err_drv_unknown_objc_runtime, CLASS_ERROR, (unsigned)diag::Severity::Error, "unknown or ill-formed Objective-C runtime '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 56 | DIAG(err_drv_unknown_stdin_type, CLASS_ERROR, (unsigned)diag::Severity::Error, "-E or -x required when input is from standard input", 0, SFINAE_SubstitutionFailure, false, true, 0) 57 | DIAG(err_drv_unknown_stdin_type_clang_cl, CLASS_ERROR, (unsigned)diag::Severity::Error, "use /Tc or /Tp to set input type for standard input", 0, SFINAE_SubstitutionFailure, false, true, 0) 58 | DIAG(err_drv_unsupported_opt, CLASS_ERROR, (unsigned)diag::Severity::Error, "unsupported option '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 59 | DIAG(err_drv_unsupported_opt_for_target, CLASS_ERROR, (unsigned)diag::Severity::Error, "unsupported option '%0' for target '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 60 | DIAG(err_drv_unsupported_option_argument, CLASS_ERROR, (unsigned)diag::Severity::Error, "unsupported argument '%1' to option '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 61 | DIAG(err_drv_unsupported_rtlib_for_platform, CLASS_ERROR, (unsigned)diag::Severity::Error, "unsupported runtime library '%0' for platform '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 62 | DIAG(err_drv_use_of_Z_option, CLASS_ERROR, (unsigned)diag::Severity::Error, "unsupported use of internal gcc -Z option '%0'", 0, SFINAE_SubstitutionFailure, false, true, 0) 63 | DIAG(err_hlsl_invalid_drv_for_feature, CLASS_ERROR, (unsigned)diag::Severity::Error, "%0 is not supported with HLSL Version '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 64 | DIAG(err_no_external_assembler, CLASS_ERROR, (unsigned)diag::Severity::Error, "there is no external assembler that can be used on this platform", 0, SFINAE_SubstitutionFailure, false, true, 0) 65 | DIAG(err_target_unsupported_arch, CLASS_ERROR, (unsigned)diag::Severity::Error, "the target architecture '%0' is not supported by the target '%1'", 0, SFINAE_SubstitutionFailure, false, true, 0) 66 | DIAG(note_drv_address_sanitizer_debug_runtime, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "AddressSanitizer doesn't support linking with debug runtime libraries yet", 0, SFINAE_Suppress, false, false, 0) 67 | DIAG(note_drv_command_failed_diag_msg, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "diagnostic msg: %0", 0, SFINAE_Suppress, false, false, 0) 68 | DIAG(note_drv_t_option_is_global, CLASS_NOTE, (unsigned)diag::Severity::Fatal, "The last /TC or /TP option takes precedence over earlier instances", 0, SFINAE_Suppress, false, false, 0) 69 | DIAG(warn_O4_is_O3, CLASS_WARNING, (unsigned)diag::Severity::Warning, "-O4 is equivalent to -O3", 126, SFINAE_Suppress, false, false, 25) 70 | DIAG(warn_c_kext, CLASS_WARNING, (unsigned)diag::Severity::Warning, "ignoring -fapple-kext which is valid for C++ and Objective-C++ only", 0, SFINAE_Suppress, false, false, 0) 71 | DIAG(warn_debug_compression_unavailable, CLASS_WARNING, (unsigned)diag::Severity::Warning, "cannot compress debug sections (zlib not installed)", 121, SFINAE_Suppress, false, false, 0) 72 | DIAG(warn_drv_assuming_mfloat_abi_is, CLASS_WARNING, (unsigned)diag::Severity::Warning, "unknown platform, assuming -mfloat-abi=%0", 0, SFINAE_Suppress, false, false, 0) 73 | DIAG(warn_drv_clang_unsupported, CLASS_WARNING, (unsigned)diag::Severity::Warning, "the clang compiler does not support '%0'", 0, SFINAE_Suppress, false, false, 0) 74 | DIAG(warn_drv_deprecated_arg, CLASS_WARNING, (unsigned)diag::Severity::Warning, "argument '%0' is deprecated, use '%1' instead", 126, SFINAE_Suppress, false, false, 25) 75 | DIAG(warn_drv_disabling_vptr_no_rtti_default, CLASS_WARNING, (unsigned)diag::Severity::Warning, "implicitly disabling vptr sanitizer because rtti wasn't enabled", 42, SFINAE_Suppress, false, false, 0) 76 | DIAG(warn_drv_empty_joined_argument, CLASS_WARNING, (unsigned)diag::Severity::Warning, "joined argument expects additional value: '%0'", 554, SFINAE_Suppress, false, false, 0) 77 | DIAG(warn_drv_enabling_rtti_with_exceptions, CLASS_WARNING, (unsigned)diag::Severity::Warning, "implicitly enabling rtti for exception handling", 440, SFINAE_Suppress, false, false, 0) 78 | DIAG(warn_drv_input_file_unused, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%0: '%1' input unused%select{ when '%3' is present|}2", 554, SFINAE_Suppress, false, false, 0) 79 | DIAG(warn_drv_input_file_unused_by_cpp, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%0: '%1' input unused in cpp mode", 554, SFINAE_Suppress, false, false, 0) 80 | DIAG(warn_drv_invoking_fallback, CLASS_WARNING, (unsigned)diag::Severity::Warning, "falling back to %0", 177, SFINAE_Suppress, false, false, 0) 81 | DIAG(warn_drv_objc_gc_unsupported, CLASS_WARNING, (unsigned)diag::Severity::Warning, "Objective-C garbage collection is not supported on this platform, ignoring '%0'", 0, SFINAE_Suppress, false, false, 0) 82 | DIAG(warn_drv_optimization_value, CLASS_WARNING, (unsigned)diag::Severity::Warning, "optimization level '%0' is not supported; using '%1%2' instead", 267, SFINAE_Suppress, false, false, 0) 83 | DIAG(warn_drv_overriding_flag_option, CLASS_WARNING, (unsigned)diag::Severity::Warning, "overriding '%0' option with '%1'", 386, SFINAE_Suppress, false, false, 0) 84 | DIAG(warn_drv_pch_not_first_include, CLASS_WARNING, (unsigned)diag::Severity::Warning, "precompiled header '%0' was ignored because '%1' is not first '-include'", 0, SFINAE_Suppress, false, false, 0) 85 | DIAG(warn_drv_preprocessed_input_file_unused, CLASS_WARNING, (unsigned)diag::Severity::Warning, "%0: previously preprocessed input%select{ unused when '%2' is present|}1", 554, SFINAE_Suppress, false, false, 0) 86 | DIAG(warn_drv_treating_input_as_cxx, CLASS_WARNING, (unsigned)diag::Severity::Warning, "treating '%0' input as '%1' when in C++ mode, this behavior is deprecated", 126, SFINAE_Suppress, false, false, 25) 87 | DIAG(warn_drv_unused_argument, CLASS_WARNING, (unsigned)diag::Severity::Warning, "argument unused during compilation: '%0'", 554, SFINAE_Suppress, false, false, 0) 88 | DIAG(warn_ignored_gcc_optimization, CLASS_WARNING, (unsigned)diag::Severity::Warning, "optimization flag '%0' is not supported", 229, SFINAE_Suppress, false, false, 0) 89 | DIAG(warn_ignoring_ftabstop_value, CLASS_WARNING, (unsigned)diag::Severity::Warning, "ignoring invalid -ftabstop value '%0', using default value %1", 0, SFINAE_Suppress, false, false, 0) 90 | DIAG(warn_missing_sysroot, CLASS_WARNING, (unsigned)diag::Severity::Warning, "no such sysroot directory: '%0'", 313, SFINAE_Suppress, false, false, 0) 91 | DIAG(warn_target_unsupported_nan2008, CLASS_WARNING, (unsigned)diag::Severity::Warning, "ignoring '-mnan=2008' option because the '%0' architecture does not support it", 550, SFINAE_Suppress, false, false, 0) 92 | DIAG(warn_target_unsupported_nanlegacy, CLASS_WARNING, (unsigned)diag::Severity::Warning, "ignoring '-mnan=legacy' option because the '%0' architecture does not support it", 550, SFINAE_Suppress, false, false, 0) 93 | -------------------------------------------------------------------------------- /generated-include/clang/AST/DeclNodes.inc: -------------------------------------------------------------------------------- 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 2 | |* *| 3 | |* List of AST nodes of a particular kind *| 4 | |* *| 5 | |* Automatically generated file, do not edit! *| 6 | |* *| 7 | \*===----------------------------------------------------------------------===*/ 8 | 9 | #ifndef ABSTRACT_DECL 10 | # define ABSTRACT_DECL(Type) Type 11 | #endif 12 | #ifndef DECL_RANGE 13 | # define DECL_RANGE(Base, First, Last) 14 | #endif 15 | 16 | #ifndef LAST_DECL_RANGE 17 | # define LAST_DECL_RANGE(Base, First, Last) DECL_RANGE(Base, First, Last) 18 | #endif 19 | 20 | #ifndef ACCESSSPEC 21 | # define ACCESSSPEC(Type, Base) DECL(Type, Base) 22 | #endif 23 | ACCESSSPEC(AccessSpec, Decl) 24 | #undef ACCESSSPEC 25 | 26 | #ifndef BLOCK 27 | # define BLOCK(Type, Base) DECL(Type, Base) 28 | #endif 29 | BLOCK(Block, Decl) 30 | #undef BLOCK 31 | 32 | #ifndef CAPTURED 33 | # define CAPTURED(Type, Base) DECL(Type, Base) 34 | #endif 35 | CAPTURED(Captured, Decl) 36 | #undef CAPTURED 37 | 38 | #ifndef CLASSSCOPEFUNCTIONSPECIALIZATION 39 | # define CLASSSCOPEFUNCTIONSPECIALIZATION(Type, Base) DECL(Type, Base) 40 | #endif 41 | CLASSSCOPEFUNCTIONSPECIALIZATION(ClassScopeFunctionSpecialization, Decl) 42 | #undef CLASSSCOPEFUNCTIONSPECIALIZATION 43 | 44 | #ifndef EMPTY 45 | # define EMPTY(Type, Base) DECL(Type, Base) 46 | #endif 47 | EMPTY(Empty, Decl) 48 | #undef EMPTY 49 | 50 | #ifndef EXTERNCCONTEXT 51 | # define EXTERNCCONTEXT(Type, Base) DECL(Type, Base) 52 | #endif 53 | EXTERNCCONTEXT(ExternCContext, Decl) 54 | #undef EXTERNCCONTEXT 55 | 56 | #ifndef FILESCOPEASM 57 | # define FILESCOPEASM(Type, Base) DECL(Type, Base) 58 | #endif 59 | FILESCOPEASM(FileScopeAsm, Decl) 60 | #undef FILESCOPEASM 61 | 62 | #ifndef FRIEND 63 | # define FRIEND(Type, Base) DECL(Type, Base) 64 | #endif 65 | FRIEND(Friend, Decl) 66 | #undef FRIEND 67 | 68 | #ifndef FRIENDTEMPLATE 69 | # define FRIENDTEMPLATE(Type, Base) DECL(Type, Base) 70 | #endif 71 | FRIENDTEMPLATE(FriendTemplate, Decl) 72 | #undef FRIENDTEMPLATE 73 | 74 | #ifndef IMPORT 75 | # define IMPORT(Type, Base) DECL(Type, Base) 76 | #endif 77 | IMPORT(Import, Decl) 78 | #undef IMPORT 79 | 80 | #ifndef LINKAGESPEC 81 | # define LINKAGESPEC(Type, Base) DECL(Type, Base) 82 | #endif 83 | LINKAGESPEC(LinkageSpec, Decl) 84 | #undef LINKAGESPEC 85 | 86 | #ifndef NAMED 87 | # define NAMED(Type, Base) DECL(Type, Base) 88 | #endif 89 | ABSTRACT_DECL(NAMED(Named, Decl)) 90 | #ifndef HLSLBUFFER 91 | # define HLSLBUFFER(Type, Base) NAMED(Type, Base) 92 | #endif 93 | HLSLBUFFER(HLSLBuffer, NamedDecl) 94 | #undef HLSLBUFFER 95 | 96 | #ifndef LABEL 97 | # define LABEL(Type, Base) NAMED(Type, Base) 98 | #endif 99 | LABEL(Label, NamedDecl) 100 | #undef LABEL 101 | 102 | #ifndef NAMESPACE 103 | # define NAMESPACE(Type, Base) NAMED(Type, Base) 104 | #endif 105 | NAMESPACE(Namespace, NamedDecl) 106 | #undef NAMESPACE 107 | 108 | #ifndef NAMESPACEALIAS 109 | # define NAMESPACEALIAS(Type, Base) NAMED(Type, Base) 110 | #endif 111 | NAMESPACEALIAS(NamespaceAlias, NamedDecl) 112 | #undef NAMESPACEALIAS 113 | 114 | #ifndef OBJCCOMPATIBLEALIAS 115 | # define OBJCCOMPATIBLEALIAS(Type, Base) NAMED(Type, Base) 116 | #endif 117 | OBJCCOMPATIBLEALIAS(ObjCCompatibleAlias, NamedDecl) 118 | #undef OBJCCOMPATIBLEALIAS 119 | 120 | #ifndef OBJCCONTAINER 121 | # define OBJCCONTAINER(Type, Base) NAMED(Type, Base) 122 | #endif 123 | ABSTRACT_DECL(OBJCCONTAINER(ObjCContainer, NamedDecl)) 124 | #ifndef OBJCCATEGORY 125 | # define OBJCCATEGORY(Type, Base) OBJCCONTAINER(Type, Base) 126 | #endif 127 | OBJCCATEGORY(ObjCCategory, ObjCContainerDecl) 128 | #undef OBJCCATEGORY 129 | 130 | #ifndef OBJCIMPL 131 | # define OBJCIMPL(Type, Base) OBJCCONTAINER(Type, Base) 132 | #endif 133 | ABSTRACT_DECL(OBJCIMPL(ObjCImpl, ObjCContainerDecl)) 134 | #ifndef OBJCCATEGORYIMPL 135 | # define OBJCCATEGORYIMPL(Type, Base) OBJCIMPL(Type, Base) 136 | #endif 137 | OBJCCATEGORYIMPL(ObjCCategoryImpl, ObjCImplDecl) 138 | #undef OBJCCATEGORYIMPL 139 | 140 | #ifndef OBJCIMPLEMENTATION 141 | # define OBJCIMPLEMENTATION(Type, Base) OBJCIMPL(Type, Base) 142 | #endif 143 | OBJCIMPLEMENTATION(ObjCImplementation, ObjCImplDecl) 144 | #undef OBJCIMPLEMENTATION 145 | 146 | DECL_RANGE(ObjCImpl, ObjCCategoryImpl, ObjCImplementation) 147 | 148 | #undef OBJCIMPL 149 | 150 | #ifndef OBJCINTERFACE 151 | # define OBJCINTERFACE(Type, Base) OBJCCONTAINER(Type, Base) 152 | #endif 153 | OBJCINTERFACE(ObjCInterface, ObjCContainerDecl) 154 | #undef OBJCINTERFACE 155 | 156 | #ifndef OBJCPROTOCOL 157 | # define OBJCPROTOCOL(Type, Base) OBJCCONTAINER(Type, Base) 158 | #endif 159 | OBJCPROTOCOL(ObjCProtocol, ObjCContainerDecl) 160 | #undef OBJCPROTOCOL 161 | 162 | DECL_RANGE(ObjCContainer, ObjCCategory, ObjCProtocol) 163 | 164 | #undef OBJCCONTAINER 165 | 166 | #ifndef OBJCMETHOD 167 | # define OBJCMETHOD(Type, Base) NAMED(Type, Base) 168 | #endif 169 | OBJCMETHOD(ObjCMethod, NamedDecl) 170 | #undef OBJCMETHOD 171 | 172 | #ifndef OBJCPROPERTY 173 | # define OBJCPROPERTY(Type, Base) NAMED(Type, Base) 174 | #endif 175 | OBJCPROPERTY(ObjCProperty, NamedDecl) 176 | #undef OBJCPROPERTY 177 | 178 | #ifndef TEMPLATE 179 | # define TEMPLATE(Type, Base) NAMED(Type, Base) 180 | #endif 181 | ABSTRACT_DECL(TEMPLATE(Template, NamedDecl)) 182 | #ifndef REDECLARABLETEMPLATE 183 | # define REDECLARABLETEMPLATE(Type, Base) TEMPLATE(Type, Base) 184 | #endif 185 | ABSTRACT_DECL(REDECLARABLETEMPLATE(RedeclarableTemplate, TemplateDecl)) 186 | #ifndef CLASSTEMPLATE 187 | # define CLASSTEMPLATE(Type, Base) REDECLARABLETEMPLATE(Type, Base) 188 | #endif 189 | CLASSTEMPLATE(ClassTemplate, RedeclarableTemplateDecl) 190 | #undef CLASSTEMPLATE 191 | 192 | #ifndef FUNCTIONTEMPLATE 193 | # define FUNCTIONTEMPLATE(Type, Base) REDECLARABLETEMPLATE(Type, Base) 194 | #endif 195 | FUNCTIONTEMPLATE(FunctionTemplate, RedeclarableTemplateDecl) 196 | #undef FUNCTIONTEMPLATE 197 | 198 | #ifndef TYPEALIASTEMPLATE 199 | # define TYPEALIASTEMPLATE(Type, Base) REDECLARABLETEMPLATE(Type, Base) 200 | #endif 201 | TYPEALIASTEMPLATE(TypeAliasTemplate, RedeclarableTemplateDecl) 202 | #undef TYPEALIASTEMPLATE 203 | 204 | #ifndef VARTEMPLATE 205 | # define VARTEMPLATE(Type, Base) REDECLARABLETEMPLATE(Type, Base) 206 | #endif 207 | VARTEMPLATE(VarTemplate, RedeclarableTemplateDecl) 208 | #undef VARTEMPLATE 209 | 210 | DECL_RANGE(RedeclarableTemplate, ClassTemplate, VarTemplate) 211 | 212 | #undef REDECLARABLETEMPLATE 213 | 214 | #ifndef TEMPLATETEMPLATEPARM 215 | # define TEMPLATETEMPLATEPARM(Type, Base) TEMPLATE(Type, Base) 216 | #endif 217 | TEMPLATETEMPLATEPARM(TemplateTemplateParm, TemplateDecl) 218 | #undef TEMPLATETEMPLATEPARM 219 | 220 | DECL_RANGE(Template, ClassTemplate, TemplateTemplateParm) 221 | 222 | #undef TEMPLATE 223 | 224 | #ifndef TYPE 225 | # define TYPE(Type, Base) NAMED(Type, Base) 226 | #endif 227 | ABSTRACT_DECL(TYPE(Type, NamedDecl)) 228 | #ifndef TAG 229 | # define TAG(Type, Base) TYPE(Type, Base) 230 | #endif 231 | ABSTRACT_DECL(TAG(Tag, TypeDecl)) 232 | #ifndef ENUM 233 | # define ENUM(Type, Base) TAG(Type, Base) 234 | #endif 235 | ENUM(Enum, TagDecl) 236 | #undef ENUM 237 | 238 | #ifndef RECORD 239 | # define RECORD(Type, Base) TAG(Type, Base) 240 | #endif 241 | RECORD(Record, TagDecl) 242 | #ifndef CXXRECORD 243 | # define CXXRECORD(Type, Base) RECORD(Type, Base) 244 | #endif 245 | CXXRECORD(CXXRecord, RecordDecl) 246 | #ifndef CLASSTEMPLATESPECIALIZATION 247 | # define CLASSTEMPLATESPECIALIZATION(Type, Base) CXXRECORD(Type, Base) 248 | #endif 249 | CLASSTEMPLATESPECIALIZATION(ClassTemplateSpecialization, CXXRecordDecl) 250 | #ifndef CLASSTEMPLATEPARTIALSPECIALIZATION 251 | # define CLASSTEMPLATEPARTIALSPECIALIZATION(Type, Base) CLASSTEMPLATESPECIALIZATION(Type, Base) 252 | #endif 253 | CLASSTEMPLATEPARTIALSPECIALIZATION(ClassTemplatePartialSpecialization, ClassTemplateSpecializationDecl) 254 | #undef CLASSTEMPLATEPARTIALSPECIALIZATION 255 | 256 | DECL_RANGE(ClassTemplateSpecialization, ClassTemplateSpecialization, ClassTemplatePartialSpecialization) 257 | 258 | #undef CLASSTEMPLATESPECIALIZATION 259 | 260 | DECL_RANGE(CXXRecord, CXXRecord, ClassTemplatePartialSpecialization) 261 | 262 | #undef CXXRECORD 263 | 264 | DECL_RANGE(Record, Record, ClassTemplatePartialSpecialization) 265 | 266 | #undef RECORD 267 | 268 | DECL_RANGE(Tag, Enum, ClassTemplatePartialSpecialization) 269 | 270 | #undef TAG 271 | 272 | #ifndef TEMPLATETYPEPARM 273 | # define TEMPLATETYPEPARM(Type, Base) TYPE(Type, Base) 274 | #endif 275 | TEMPLATETYPEPARM(TemplateTypeParm, TypeDecl) 276 | #undef TEMPLATETYPEPARM 277 | 278 | #ifndef TYPEDEFNAME 279 | # define TYPEDEFNAME(Type, Base) TYPE(Type, Base) 280 | #endif 281 | ABSTRACT_DECL(TYPEDEFNAME(TypedefName, TypeDecl)) 282 | #ifndef OBJCTYPEPARAM 283 | # define OBJCTYPEPARAM(Type, Base) TYPEDEFNAME(Type, Base) 284 | #endif 285 | OBJCTYPEPARAM(ObjCTypeParam, TypedefNameDecl) 286 | #undef OBJCTYPEPARAM 287 | 288 | #ifndef TYPEALIAS 289 | # define TYPEALIAS(Type, Base) TYPEDEFNAME(Type, Base) 290 | #endif 291 | TYPEALIAS(TypeAlias, TypedefNameDecl) 292 | #undef TYPEALIAS 293 | 294 | #ifndef TYPEDEF 295 | # define TYPEDEF(Type, Base) TYPEDEFNAME(Type, Base) 296 | #endif 297 | TYPEDEF(Typedef, TypedefNameDecl) 298 | #undef TYPEDEF 299 | 300 | DECL_RANGE(TypedefName, ObjCTypeParam, Typedef) 301 | 302 | #undef TYPEDEFNAME 303 | 304 | #ifndef UNRESOLVEDUSINGTYPENAME 305 | # define UNRESOLVEDUSINGTYPENAME(Type, Base) TYPE(Type, Base) 306 | #endif 307 | UNRESOLVEDUSINGTYPENAME(UnresolvedUsingTypename, TypeDecl) 308 | #undef UNRESOLVEDUSINGTYPENAME 309 | 310 | DECL_RANGE(Type, Enum, UnresolvedUsingTypename) 311 | 312 | #undef TYPE 313 | 314 | #ifndef USING 315 | # define USING(Type, Base) NAMED(Type, Base) 316 | #endif 317 | USING(Using, NamedDecl) 318 | #undef USING 319 | 320 | #ifndef USINGDIRECTIVE 321 | # define USINGDIRECTIVE(Type, Base) NAMED(Type, Base) 322 | #endif 323 | USINGDIRECTIVE(UsingDirective, NamedDecl) 324 | #undef USINGDIRECTIVE 325 | 326 | #ifndef USINGSHADOW 327 | # define USINGSHADOW(Type, Base) NAMED(Type, Base) 328 | #endif 329 | USINGSHADOW(UsingShadow, NamedDecl) 330 | #undef USINGSHADOW 331 | 332 | #ifndef VALUE 333 | # define VALUE(Type, Base) NAMED(Type, Base) 334 | #endif 335 | ABSTRACT_DECL(VALUE(Value, NamedDecl)) 336 | #ifndef DECLARATOR 337 | # define DECLARATOR(Type, Base) VALUE(Type, Base) 338 | #endif 339 | ABSTRACT_DECL(DECLARATOR(Declarator, ValueDecl)) 340 | #ifndef FIELD 341 | # define FIELD(Type, Base) DECLARATOR(Type, Base) 342 | #endif 343 | FIELD(Field, DeclaratorDecl) 344 | #ifndef OBJCATDEFSFIELD 345 | # define OBJCATDEFSFIELD(Type, Base) FIELD(Type, Base) 346 | #endif 347 | OBJCATDEFSFIELD(ObjCAtDefsField, FieldDecl) 348 | #undef OBJCATDEFSFIELD 349 | 350 | #ifndef OBJCIVAR 351 | # define OBJCIVAR(Type, Base) FIELD(Type, Base) 352 | #endif 353 | OBJCIVAR(ObjCIvar, FieldDecl) 354 | #undef OBJCIVAR 355 | 356 | DECL_RANGE(Field, Field, ObjCIvar) 357 | 358 | #undef FIELD 359 | 360 | #ifndef FUNCTION 361 | # define FUNCTION(Type, Base) DECLARATOR(Type, Base) 362 | #endif 363 | FUNCTION(Function, DeclaratorDecl) 364 | #ifndef CXXMETHOD 365 | # define CXXMETHOD(Type, Base) FUNCTION(Type, Base) 366 | #endif 367 | CXXMETHOD(CXXMethod, FunctionDecl) 368 | #ifndef CXXCONSTRUCTOR 369 | # define CXXCONSTRUCTOR(Type, Base) CXXMETHOD(Type, Base) 370 | #endif 371 | CXXCONSTRUCTOR(CXXConstructor, CXXMethodDecl) 372 | #undef CXXCONSTRUCTOR 373 | 374 | #ifndef CXXCONVERSION 375 | # define CXXCONVERSION(Type, Base) CXXMETHOD(Type, Base) 376 | #endif 377 | CXXCONVERSION(CXXConversion, CXXMethodDecl) 378 | #undef CXXCONVERSION 379 | 380 | #ifndef CXXDESTRUCTOR 381 | # define CXXDESTRUCTOR(Type, Base) CXXMETHOD(Type, Base) 382 | #endif 383 | CXXDESTRUCTOR(CXXDestructor, CXXMethodDecl) 384 | #undef CXXDESTRUCTOR 385 | 386 | DECL_RANGE(CXXMethod, CXXMethod, CXXDestructor) 387 | 388 | #undef CXXMETHOD 389 | 390 | DECL_RANGE(Function, Function, CXXDestructor) 391 | 392 | #undef FUNCTION 393 | 394 | #ifndef MSPROPERTY 395 | # define MSPROPERTY(Type, Base) DECLARATOR(Type, Base) 396 | #endif 397 | MSPROPERTY(MSProperty, DeclaratorDecl) 398 | #undef MSPROPERTY 399 | 400 | #ifndef NONTYPETEMPLATEPARM 401 | # define NONTYPETEMPLATEPARM(Type, Base) DECLARATOR(Type, Base) 402 | #endif 403 | NONTYPETEMPLATEPARM(NonTypeTemplateParm, DeclaratorDecl) 404 | #undef NONTYPETEMPLATEPARM 405 | 406 | #ifndef VAR 407 | # define VAR(Type, Base) DECLARATOR(Type, Base) 408 | #endif 409 | VAR(Var, DeclaratorDecl) 410 | #ifndef IMPLICITPARAM 411 | # define IMPLICITPARAM(Type, Base) VAR(Type, Base) 412 | #endif 413 | IMPLICITPARAM(ImplicitParam, VarDecl) 414 | #undef IMPLICITPARAM 415 | 416 | #ifndef PARMVAR 417 | # define PARMVAR(Type, Base) VAR(Type, Base) 418 | #endif 419 | PARMVAR(ParmVar, VarDecl) 420 | #undef PARMVAR 421 | 422 | #ifndef VARTEMPLATESPECIALIZATION 423 | # define VARTEMPLATESPECIALIZATION(Type, Base) VAR(Type, Base) 424 | #endif 425 | VARTEMPLATESPECIALIZATION(VarTemplateSpecialization, VarDecl) 426 | #ifndef VARTEMPLATEPARTIALSPECIALIZATION 427 | # define VARTEMPLATEPARTIALSPECIALIZATION(Type, Base) VARTEMPLATESPECIALIZATION(Type, Base) 428 | #endif 429 | VARTEMPLATEPARTIALSPECIALIZATION(VarTemplatePartialSpecialization, VarTemplateSpecializationDecl) 430 | #undef VARTEMPLATEPARTIALSPECIALIZATION 431 | 432 | DECL_RANGE(VarTemplateSpecialization, VarTemplateSpecialization, VarTemplatePartialSpecialization) 433 | 434 | #undef VARTEMPLATESPECIALIZATION 435 | 436 | DECL_RANGE(Var, Var, VarTemplatePartialSpecialization) 437 | 438 | #undef VAR 439 | 440 | DECL_RANGE(Declarator, Field, VarTemplatePartialSpecialization) 441 | 442 | #undef DECLARATOR 443 | 444 | #ifndef ENUMCONSTANT 445 | # define ENUMCONSTANT(Type, Base) VALUE(Type, Base) 446 | #endif 447 | ENUMCONSTANT(EnumConstant, ValueDecl) 448 | #undef ENUMCONSTANT 449 | 450 | #ifndef INDIRECTFIELD 451 | # define INDIRECTFIELD(Type, Base) VALUE(Type, Base) 452 | #endif 453 | INDIRECTFIELD(IndirectField, ValueDecl) 454 | #undef INDIRECTFIELD 455 | 456 | #ifndef UNRESOLVEDUSINGVALUE 457 | # define UNRESOLVEDUSINGVALUE(Type, Base) VALUE(Type, Base) 458 | #endif 459 | UNRESOLVEDUSINGVALUE(UnresolvedUsingValue, ValueDecl) 460 | #undef UNRESOLVEDUSINGVALUE 461 | 462 | DECL_RANGE(Value, Field, UnresolvedUsingValue) 463 | 464 | #undef VALUE 465 | 466 | DECL_RANGE(Named, HLSLBuffer, UnresolvedUsingValue) 467 | 468 | #undef NAMED 469 | 470 | #ifndef OMPTHREADPRIVATE 471 | # define OMPTHREADPRIVATE(Type, Base) DECL(Type, Base) 472 | #endif 473 | OMPTHREADPRIVATE(OMPThreadPrivate, Decl) 474 | #undef OMPTHREADPRIVATE 475 | 476 | #ifndef OBJCPROPERTYIMPL 477 | # define OBJCPROPERTYIMPL(Type, Base) DECL(Type, Base) 478 | #endif 479 | OBJCPROPERTYIMPL(ObjCPropertyImpl, Decl) 480 | #undef OBJCPROPERTYIMPL 481 | 482 | #ifndef STATICASSERT 483 | # define STATICASSERT(Type, Base) DECL(Type, Base) 484 | #endif 485 | STATICASSERT(StaticAssert, Decl) 486 | #undef STATICASSERT 487 | 488 | #ifndef TRANSLATIONUNIT 489 | # define TRANSLATIONUNIT(Type, Base) DECL(Type, Base) 490 | #endif 491 | TRANSLATIONUNIT(TranslationUnit, Decl) 492 | #undef TRANSLATIONUNIT 493 | 494 | LAST_DECL_RANGE(Decl, AccessSpec, TranslationUnit) 495 | 496 | #undef DECL 497 | #undef DECL_RANGE 498 | #undef LAST_DECL_RANGE 499 | #undef ABSTRACT_DECL 500 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ 501 | |* *| 502 | |* List of AST Decl nodes *| 503 | |* *| 504 | |* Automatically generated file, do not edit! *| 505 | |* *| 506 | \*===----------------------------------------------------------------------===*/ 507 | 508 | #ifndef DECL_CONTEXT 509 | # define DECL_CONTEXT(DECL) 510 | #endif 511 | #ifndef DECL_CONTEXT_BASE 512 | # define DECL_CONTEXT_BASE(DECL) DECL_CONTEXT(DECL) 513 | #endif 514 | DECL_CONTEXT_BASE(Function) 515 | DECL_CONTEXT_BASE(Tag) 516 | DECL_CONTEXT_BASE(ObjCContainer) 517 | DECL_CONTEXT(Block) 518 | DECL_CONTEXT(Captured) 519 | DECL_CONTEXT(ExternCContext) 520 | DECL_CONTEXT(HLSLBuffer) 521 | DECL_CONTEXT(LinkageSpec) 522 | DECL_CONTEXT(Namespace) 523 | DECL_CONTEXT(ObjCMethod) 524 | DECL_CONTEXT(TranslationUnit) 525 | #undef DECL_CONTEXT 526 | #undef DECL_CONTEXT_BASE 527 | --------------------------------------------------------------------------------