1193326Sed//===--- Types.def - Driver Type info ---------------------------*- C++ -*-===//
2193326Sed//
3193326Sed//                     The LLVM Compiler Infrastructure
4193326Sed//
5193326Sed// This file is distributed under the University of Illinois Open Source
6193326Sed// License. See LICENSE.TXT for details.
7193326Sed//
8193326Sed//===----------------------------------------------------------------------===//
9193326Sed//
10193326Sed// This file defines the driver type information. Users of this file
11193326Sed// must define the TYPE macro to make use of this information.
12193326Sed//
13193326Sed//===----------------------------------------------------------------------===//
14193326Sed
15193326Sed#ifndef TYPE
16193326Sed#error "Define TYPE prior to including this file!"
17193326Sed#endif
18193326Sed
19193326Sed// TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS)
20193326Sed
21193326Sed// The first value is the type name as a string; for types which can
22193326Sed// be user specified this should be the equivalent -x option.
23193326Sed
24193326Sed// The second value is the type id, which will result in a
25193326Sed// clang::driver::types::TY_XX enum constant.
26193326Sed
27193326Sed// The third value is that id of the type for preprocessed inputs of
28193326Sed// this type, or INVALID if this type is not preprocessed.
29193326Sed
30193326Sed// The fourth value is the suffix to use when creating temporary files
31193326Sed// of this type, or null if unspecified.
32193326Sed
33252723Sdim// The fifth value is a string containing option flags. Valid values:
34193326Sed//  a - The type should only be assembled.
35193326Sed//  p - The type should only be precompiled.
36193326Sed//  u - The type can be user specified (with -x).
37193326Sed//  A - The type's temporary suffix should be appended when generating
38193326Sed//      outputs of this type.
39193326Sed
40193326Sed
41193326Sed// C family source language (with and without preprocessing).
42193326SedTYPE("cpp-output",               PP_C,         INVALID,         "i",     "u")
43245431SdimTYPE("c",                        C,            PP_C,            "c",     "u")
44245431SdimTYPE("cl",                       CL,           PP_C,            "cl",    "u")
45245431SdimTYPE("cuda",                     CUDA,         PP_CXX,          "cpp",   "u")
46193326SedTYPE("objective-c-cpp-output",   PP_ObjC,      INVALID,         "mi",    "u")
47226890SdimTYPE("objc-cpp-output",          PP_ObjC_Alias, INVALID,        "mi",    "u")
48245431SdimTYPE("objective-c",              ObjC,         PP_ObjC,         "m",     "u")
49193326SedTYPE("c++-cpp-output",           PP_CXX,       INVALID,         "ii",    "u")
50245431SdimTYPE("c++",                      CXX,          PP_CXX,          "cpp",   "u")
51193326SedTYPE("objective-c++-cpp-output", PP_ObjCXX,    INVALID,         "mii",   "u")
52226890SdimTYPE("objc++-cpp-output",        PP_ObjCXX_Alias, INVALID,      "mii",   "u")
53245431SdimTYPE("objective-c++",            ObjCXX,       PP_ObjCXX,       "mm",    "u")
54193326Sed
55193326Sed// C family input files to precompile.
56193326SedTYPE("c-header-cpp-output",      PP_CHeader,   INVALID,         "i",     "p")
57193326SedTYPE("c-header",                 CHeader,      PP_CHeader,      0,       "pu")
58226890SdimTYPE("cl-header",                CLHeader,     PP_CHeader,      0,       "pu")
59193326SedTYPE("objective-c-header-cpp-output", PP_ObjCHeader, INVALID,   "mi",    "p")
60193326SedTYPE("objective-c-header",       ObjCHeader,   PP_ObjCHeader,   0,       "pu")
61193326SedTYPE("c++-header-cpp-output",    PP_CXXHeader, INVALID,         "ii",    "p")
62193326SedTYPE("c++-header",               CXXHeader,    PP_CXXHeader,    0,       "pu")
63193326SedTYPE("objective-c++-header-cpp-output", PP_ObjCXXHeader, INVALID, "mii", "p")
64193326SedTYPE("objective-c++-header",     ObjCXXHeader, PP_ObjCXXHeader, 0,       "pu")
65193326Sed
66193326Sed// Other languages.
67193326SedTYPE("ada",                      Ada,          INVALID,         0,       "u")
68193326SedTYPE("assembler",                PP_Asm,       INVALID,         "s",     "au")
69263509SdimTYPE("assembler-with-cpp",       Asm,          PP_Asm,          "S",     "au")
70193326SedTYPE("f95",                      PP_Fortran,   INVALID,         0,       "u")
71193326SedTYPE("f95-cpp-input",            Fortran,      PP_Fortran,      0,       "u")
72193326SedTYPE("java",                     Java,         INVALID,         0,       "u")
73193326Sed
74210299Sed// LLVM IR/LTO types. We define separate types for IR and LTO because LTO
75210299Sed// outputs should use the standard suffixes.
76210299SedTYPE("ir",                       LLVM_IR,      INVALID,         "ll",    "u")
77210299SedTYPE("ir",                       LLVM_BC,      INVALID,         "bc",    "u")
78210299SedTYPE("lto-ir",                   LTO_IR,       INVALID,         "s",     "")
79210299SedTYPE("lto-bc",                   LTO_BC,       INVALID,         "o",     "")
80210299Sed
81193326Sed// Misc.
82198092SrdivackyTYPE("ast",                      AST,          INVALID,         "ast",   "u")
83252723SdimTYPE("pcm",                      ModuleFile,   INVALID,         "pcm",   "u")
84193326SedTYPE("plist",                    Plist,        INVALID,         "plist", "")
85203955SrdivackyTYPE("rewritten-objc",           RewrittenObjC,INVALID,         "cpp",   "")
86235633SdimTYPE("rewritten-legacy-objc",    RewrittenLegacyObjC,INVALID,   "cpp",   "")
87235633SdimTYPE("remap",                    Remap,        INVALID,         "remap", "")
88193326SedTYPE("precompiled-header",       PCH,          INVALID,         "gch",   "A")
89193326SedTYPE("object",                   Object,       INVALID,         "o",     "")
90193326SedTYPE("treelang",                 Treelang,     INVALID,         0,       "u")
91193326SedTYPE("image",                    Image,        INVALID,         "out",   "")
92210299SedTYPE("dSYM",                     dSYM,         INVALID,         "dSYM",  "A")
93193326SedTYPE("dependencies",             Dependencies, INVALID,         "d",     "")
94193326SedTYPE("none",                     Nothing,      INVALID,         0,       "u")
95