blob: 98cb9b389b29003236a978a43fe63337737a89a0 [file] [log] [blame]
//===--- Types.def - Driver Type info ---------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// 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, SUFFIX, FLAGS)
// The first value is the type name as a string; this should be something which
// could be displayed to the user, or something which the user could provide.
// The second value is the type id, which will result in a
// swift::driver::types::TY_XX enum constant.
// The third value is the suffix to use when creating temporary files
// of this type. It is also used when inferring a type from an extension.
// If multiple types specify the same extension, the first one is chosen when
// performing type inference.
// The fifth value is a string containing option flags. For now, this is unused,
// and should always be the empty string.
// Input types
TYPE("swift", Swift, "swift", "")
TYPE("sil", SIL, "sil", "")
TYPE("sib", SIB, "sib", "")
// Output types
TYPE("image", Image, "out", "")
TYPE("object", Object, "o", "")
TYPE("dSYM", dSYM, "dSYM", "")
TYPE("dependencies", Dependencies, "d", "")
TYPE("autolink", AutolinkFile, "autolink", "")
TYPE("swiftmodule", SwiftModuleFile, "swiftmodule", "")
TYPE("swiftdoc", SwiftModuleDocFile, "swiftdoc", "")
TYPE("assembly", Assembly, "s", "")
TYPE("raw-sil", RawSIL, "sil", "")
TYPE("raw-sib", RawSIB, "sib", "")
TYPE("llvm-ir", LLVM_IR, "ir", "")
TYPE("llvm-bc", LLVM_BC, "bc", "")
TYPE("diagnostics", SerializedDiagnostics, "dia", "")
TYPE("objc-header", ObjCHeader, "h", "")
TYPE("swift-dependencies", SwiftDeps, "swiftdeps", "")
TYPE("remap", Remapping, "remap", "")
TYPE("imported-modules", ImportedModules, "importedmodules", "")
TYPE("tbd", TBD, "tbd", "")
TYPE("module-trace", ModuleTrace, "trace.json", "")
// BEGIN APPLE-ONLY OUTPUT TYPES
TYPE("index-data", IndexData, "", "")
// END APPLE-ONLY OUTPUT TYPES
// Misc types
TYPE("pcm", ClangModuleFile, "pcm", "")
TYPE("pch", PCH, "pch", "")
TYPE("none", Nothing, "", "")
#undef TYPE