1 //===--- Types.def - Driver Type info ---------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines the driver type information. Users of this file
11 // must define the TYPE macro to make use of this information.
13 //===----------------------------------------------------------------------===//
16 #error "Define TYPE prior to including this file!"
19 // TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS)
21 // The first value is the type name as a string; for types which can
22 // be user specified this should be the equivalent -x option.
24 // The second value is the type id, which will result in a
25 // clang::driver::types::TY_XX enum constant.
27 // The third value is that id of the type for preprocessed inputs of
28 // this type, or INVALID if this type is not preprocessed.
30 // The fourth value is the suffix to use when creating temporary files
31 // of this type, or null if unspecified.
33 // The fifth value is a string containing option flags. Valid values:
34 // a - The type should only be assembled.
35 // p - The type should only be precompiled.
36 // u - The type can be user specified (with -x).
37 // m - Precompiling this type produces a module file.
38 // A - The type's temporary suffix should be appended when generating
39 // outputs of this type.
42 // C family source language (with and without preprocessing).
43 TYPE("cpp-output", PP_C, INVALID, "i", "u")
44 TYPE("c", C, PP_C, "c", "u")
45 TYPE("cl", CL, PP_C, "cl", "u")
46 TYPE("cuda-cpp-output", PP_CUDA, INVALID, "cui", "u")
47 TYPE("cuda", CUDA, PP_CUDA, "cu", "u")
48 TYPE("cuda", CUDA_DEVICE, PP_CUDA, "cu", "")
49 TYPE("objective-c-cpp-output", PP_ObjC, INVALID, "mi", "u")
50 TYPE("objc-cpp-output", PP_ObjC_Alias, INVALID, "mi", "u")
51 TYPE("objective-c", ObjC, PP_ObjC, "m", "u")
52 TYPE("c++-cpp-output", PP_CXX, INVALID, "ii", "u")
53 TYPE("c++", CXX, PP_CXX, "cpp", "u")
54 TYPE("objective-c++-cpp-output", PP_ObjCXX, INVALID, "mii", "u")
55 TYPE("objc++-cpp-output", PP_ObjCXX_Alias, INVALID, "mii", "u")
56 TYPE("objective-c++", ObjCXX, PP_ObjCXX, "mm", "u")
57 TYPE("renderscript", RenderScript, PP_C, "rs", "u")
59 // C family input files to precompile.
60 TYPE("c-header-cpp-output", PP_CHeader, INVALID, "i", "p")
61 TYPE("c-header", CHeader, PP_CHeader, "h", "pu")
62 TYPE("cl-header", CLHeader, PP_CHeader, "h", "pu")
63 TYPE("objective-c-header-cpp-output", PP_ObjCHeader, INVALID, "mi", "p")
64 TYPE("objective-c-header", ObjCHeader, PP_ObjCHeader, "h", "pu")
65 TYPE("c++-header-cpp-output", PP_CXXHeader, INVALID, "ii", "p")
66 TYPE("c++-header", CXXHeader, PP_CXXHeader, "hh", "pu")
67 TYPE("objective-c++-header-cpp-output", PP_ObjCXXHeader, INVALID, "mii", "p")
68 TYPE("objective-c++-header", ObjCXXHeader, PP_ObjCXXHeader, "h", "pu")
69 TYPE("c++-module", CXXModule, PP_CXXModule, "cppm", "mu")
70 TYPE("c++-module-cpp-output", PP_CXXModule, INVALID, "iim", "m")
73 TYPE("ada", Ada, INVALID, nullptr, "u")
74 TYPE("assembler", PP_Asm, INVALID, "s", "au")
75 TYPE("assembler-with-cpp", Asm, PP_Asm, "S", "au")
76 TYPE("f95", PP_Fortran, INVALID, nullptr, "u")
77 TYPE("f95-cpp-input", Fortran, PP_Fortran, nullptr, "u")
78 TYPE("java", Java, INVALID, nullptr, "u")
80 // LLVM IR/LTO types. We define separate types for IR and LTO because LTO
81 // outputs should use the standard suffixes.
82 TYPE("ir", LLVM_IR, INVALID, "ll", "u")
83 TYPE("ir", LLVM_BC, INVALID, "bc", "u")
84 TYPE("lto-ir", LTO_IR, INVALID, "s", "")
85 TYPE("lto-bc", LTO_BC, INVALID, "o", "")
88 TYPE("ast", AST, INVALID, "ast", "u")
89 TYPE("pcm", ModuleFile, INVALID, "pcm", "u")
90 TYPE("plist", Plist, INVALID, "plist", "")
91 TYPE("rewritten-objc", RewrittenObjC,INVALID, "cpp", "")
92 TYPE("rewritten-legacy-objc", RewrittenLegacyObjC,INVALID, "cpp", "")
93 TYPE("remap", Remap, INVALID, "remap", "")
94 TYPE("precompiled-header", PCH, INVALID, "gch", "A")
95 TYPE("object", Object, INVALID, "o", "")
96 TYPE("treelang", Treelang, INVALID, nullptr, "u")
97 TYPE("image", Image, INVALID, "out", "")
98 TYPE("dSYM", dSYM, INVALID, "dSYM", "A")
99 TYPE("dependencies", Dependencies, INVALID, "d", "")
100 TYPE("cuda-fatbin", CUDA_FATBIN, INVALID, "fatbin","A")
101 TYPE("none", Nothing, INVALID, nullptr, "u")