//===--- Types.def - Driver Type info ---------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines the driver type information. Users of this file
// must define the TYPE macro to make use of this information.
//
//===----------------------------------------------------------------------===//

#ifndef TYPE
#error "Define TYPE prior to including this file!"
#endif

// TYPE(NAME, ID, PP_TYPE, TEMP_SUFFIX, FLAGS)

// The first value is the type name as a string; for types which can
// be user specified this should be the equivalent -x option.

// The second value is the type id, which will result in a
// clang::driver::types::TY_XX enum constant.

// The third value is that id of the type for preprocessed inputs of
// this type, or INVALID if this type is not preprocessed.

// The fourth value is the suffix to use when creating temporary files
// of this type, or null if unspecified.

// The fifth value is a string containt option flags. Valid values:
//  a - The type should only be assembled.
//  p - The type should only be precompiled.
//  u - The type can be user specified (with -x).
//  A - The type's temporary suffix should be appended when generating
//      outputs of this type.


// C family source language (with and without preprocessing).
TYPE("cpp-output",               PP_C,         INVALID,         "i",     "u")
TYPE("c",                        C,            PP_C,            0,       "u")
TYPE("objective-c-cpp-output",   PP_ObjC,      INVALID,         "mi",    "u")
TYPE("objective-c",              ObjC,         PP_ObjC,         0,       "u")
TYPE("c++-cpp-output",           PP_CXX,       INVALID,         "ii",    "u")
TYPE("c++",                      CXX,          PP_CXX,          0,       "u")
TYPE("objective-c++-cpp-output", PP_ObjCXX,    INVALID,         "mii",   "u")
TYPE("objective-c++",            ObjCXX,       PP_ObjCXX,       0,       "u")

// C family input files to precompile.
TYPE("c-header-cpp-output",      PP_CHeader,   INVALID,         "i",     "p")
TYPE("c-header",                 CHeader,      PP_CHeader,      0,       "pu")
TYPE("objective-c-header-cpp-output", PP_ObjCHeader, INVALID,   "mi",    "p")
TYPE("objective-c-header",       ObjCHeader,   PP_ObjCHeader,   0,       "pu")
TYPE("c++-header-cpp-output",    PP_CXXHeader, INVALID,         "ii",    "p")
TYPE("c++-header",               CXXHeader,    PP_CXXHeader,    0,       "pu")
TYPE("objective-c++-header-cpp-output", PP_ObjCXXHeader, INVALID, "mii", "p")
TYPE("objective-c++-header",     ObjCXXHeader, PP_ObjCXXHeader, 0,       "pu")

// Other languages.
TYPE("ada",                      Ada,          INVALID,         0,       "u")
TYPE("assembler",                PP_Asm,       INVALID,         "s",     "au")
TYPE("assembler-with-cpp",       Asm,          PP_Asm,          0,       "au")
TYPE("f95",                      PP_Fortran,   INVALID,         0,       "u")
TYPE("f95-cpp-input",            Fortran,      PP_Fortran,      0,       "u")
TYPE("java",                     Java,         INVALID,         0,       "u")

// Misc.
TYPE("llvm-asm",                 LLVMAsm,      INVALID,         "s",    "")
TYPE("llvm-bc",                  LLVMBC,       INVALID,         "o",    "")
TYPE("plist",                    Plist,        INVALID,         "plist", "")
TYPE("precompiled-header",       PCH,          INVALID,         "gch",   "A")
TYPE("object",                   Object,       INVALID,         "o",     "")
TYPE("treelang",                 Treelang,     INVALID,         0,       "u")
TYPE("image",                    Image,        INVALID,         "out",   "")
TYPE("dependencies",             Dependencies, INVALID,         "d",     "")
TYPE("none",                     Nothing,      INVALID,         0,       "u")
