mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
...but don't hook it up to anything yet. This is the very very start of the module stability / textual interfaces feature described at https://forums.swift.org/t/plan-for-module-stability/14551/ For now I've just made it a frontend option (not a driver option), which is good enough for testing.
83 lines
3.1 KiB
C++
83 lines
3.1 KiB
C++
//===--- SupplementaryOutputPaths.h ----------------------------*- C++ -*-===*//
|
|
//
|
|
// This source file is part of the Swift.org open source project
|
|
//
|
|
// Copyright (c) 2014 - 2018 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_FRONTEND_SUPPLEMENTARYOUTPUTPATHS_H
|
|
#define SWIFT_FRONTEND_SUPPLEMENTARYOUTPUTPATHS_H
|
|
|
|
#include "swift/Basic/LLVM.h"
|
|
#include "llvm/ADT/Optional.h"
|
|
|
|
#include <string>
|
|
|
|
namespace swift {
|
|
struct SupplementaryOutputPaths {
|
|
/// The path to which we should emit an Objective-C header for the module.
|
|
/// Currently only makes sense when the compiler has whole module knowledge.
|
|
/// The modes for which it makes sense incuide both WMO and the "merge
|
|
/// modules" job that happens after the normal compilation jobs. That's where
|
|
/// the header is emitted in single-file mode, since it needs whole-module
|
|
/// information.
|
|
|
|
std::string ObjCHeaderOutputPath;
|
|
|
|
/// The path to which we should emit a serialized module.
|
|
/// It is valid whenever there are any inputs.
|
|
std::string ModuleOutputPath;
|
|
|
|
/// The path to which we should emit a module documentation file.
|
|
/// It is valid whenever there are any inputs.
|
|
std::string ModuleDocOutputPath;
|
|
|
|
/// The path to which we should output a Make-style dependencies file.
|
|
/// It is valid whenever there are any inputs.
|
|
std::string DependenciesFilePath;
|
|
|
|
/// The path to which we should output a Swift reference dependencies file.
|
|
/// It is valid whenever there are any inputs.
|
|
std::string ReferenceDependenciesFilePath;
|
|
|
|
/// Path to a file which should contain serialized diagnostics for this
|
|
/// frontend invocation.
|
|
std::string SerializedDiagnosticsPath;
|
|
|
|
/// The path to which we should output fix-its as source edits.
|
|
std::string FixItsOutputPath;
|
|
|
|
/// The path to which we should output a loaded module trace file.
|
|
/// It is currently only used with WMO, but could be generalized.
|
|
std::string LoadedModuleTracePath;
|
|
|
|
/// The path to which we should output a TBD file.
|
|
/// It is currently only used with WMO, but could be generalized.
|
|
std::string TBDPath;
|
|
|
|
/// The path to which we should emit a textual module interface, which can be
|
|
/// used by a client source file to import this module.
|
|
///
|
|
/// Currently only makes sense when the compiler has whole-module knowledge.
|
|
std::string ModuleInterfaceOutputPath;
|
|
|
|
SupplementaryOutputPaths() = default;
|
|
SupplementaryOutputPaths(const SupplementaryOutputPaths &) = default;
|
|
|
|
bool empty() const {
|
|
return ObjCHeaderOutputPath.empty() && ModuleOutputPath.empty() &&
|
|
ModuleDocOutputPath.empty() && DependenciesFilePath.empty() &&
|
|
ReferenceDependenciesFilePath.empty() &&
|
|
SerializedDiagnosticsPath.empty() && LoadedModuleTracePath.empty() &&
|
|
TBDPath.empty() && ModuleInterfaceOutputPath.empty();
|
|
}
|
|
};
|
|
} // namespace swift
|
|
|
|
#endif /* SWIFT_FRONTEND_SUPPLEMENTARYOUTPUTPATHS_H */
|