blob: 395e63173ac83b55058863aee80129b0b386fc19 [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::file_types::TY_XX enum constant.
// The third value is the extension 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 fourth 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("ast-dump", ASTDump, "ast", "")
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("swiftinterface", SwiftModuleInterfaceFile, "swiftinterface", "")
TYPE("private-swiftinterface", PrivateSwiftModuleInterfaceFile, "private.swiftinterface", "")
TYPE("swiftmodulesummary", SwiftModuleSummaryFile, "swiftmodulesummary", "")
TYPE("swiftsourceinfo", SwiftSourceInfoFile, "swiftsourceinfo", "")
TYPE("assembly", Assembly, "s", "")
TYPE("raw-sil", RawSIL, "sil", "")
TYPE("raw-sib", RawSIB, "sib", "")
TYPE("llvm-ir", LLVM_IR, "ll", "")
TYPE("llvm-bc", LLVM_BC, "bc", "")
TYPE("diagnostics", SerializedDiagnostics, "dia", "")
TYPE("objc-header", ObjCHeader, "h", "")
TYPE("swift-dependencies", SwiftDeps, "swiftdeps", "")
TYPE("external-swift-dependencies", ExternalSwiftDeps, "swiftdeps.external", "")
TYPE("swift-ranges", SwiftRanges, "swiftranges", "")
TYPE("compiled-source", CompiledSource, "compiledsource", "")
TYPE("remap", Remapping, "remap", "")
TYPE("imported-modules", ImportedModules, "importedmodules", "")
TYPE("tbd", TBD, "tbd", "")
// Module traces are used by Apple's internal build infrastructure. Apple
// engineers can see more details on the "Swift module traces" page in the
// Swift section of the internal wiki.
TYPE("module-trace", ModuleTrace, "trace.json", "")
// Complete dependency information for the given Swift files as JSON.
TYPE("json-dependencies", JSONDependencies, "dependencies.json", "")
// Complete feature information for the given Swift compiler.
TYPE("json-features", JSONFeatures, "features.json", "")
TYPE("index-data", IndexData, "", "")
TYPE("yaml-opt-record", YAMLOptRecord, "opt.yaml", "")
TYPE("bitstream-opt-record",BitstreamOptRecord, "opt.bitstream", "")
// Overlay files declare wrapper modules, called "separately-imported overlays",
// that should be automatically imported when a particular module is imported.
// Cross-import directories conditionalize overlay files so they only take
// effect when certain other modules are also loaded.
TYPE("swiftcrossimport", SwiftCrossImportDir, "swiftcrossimport","")
TYPE("swiftoverlay", SwiftOverlayFile, "swiftoverlay", "")
// Misc types
TYPE("pcm", ClangModuleFile, "pcm", "")
TYPE("pch", PCH, "pch", "")
TYPE("none", Nothing, "", "")
#undef TYPE