mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Titled as "// swift-module-flags-ignorable:", this new field contains new frontend arguments that can be safely ignored by the older version of the compiler. For compilers that don't know the field at all, all arguments in it are ignored. rdar://78233352
63 lines
1.8 KiB
C++
63 lines
1.8 KiB
C++
//===--- Options.h - Option info & table ------------------------*- 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef SWIFT_OPTION_OPTIONS_H
|
|
#define SWIFT_OPTION_OPTIONS_H
|
|
|
|
#include <memory>
|
|
|
|
namespace llvm {
|
|
namespace opt {
|
|
class OptTable;
|
|
}
|
|
}
|
|
|
|
namespace swift {
|
|
namespace options {
|
|
/// Flags specifically for Swift driver options. Must not overlap with
|
|
/// llvm::opt::DriverFlag.
|
|
enum SwiftFlags {
|
|
FrontendOption = (1 << 4),
|
|
NoDriverOption = (1 << 5),
|
|
NoInteractiveOption = (1 << 6),
|
|
NoBatchOption = (1 << 7),
|
|
DoesNotAffectIncrementalBuild = (1 << 8),
|
|
AutolinkExtractOption = (1 << 9),
|
|
ModuleWrapOption = (1 << 10),
|
|
SwiftIndentOption = (1 << 11),
|
|
ArgumentIsPath = (1 << 12),
|
|
ModuleInterfaceOption = (1 << 13),
|
|
SupplementaryOutput = (1 << 14),
|
|
SwiftAPIExtractOption = (1 << 15),
|
|
SwiftSymbolGraphExtractOption = (1 << 16),
|
|
SwiftAPIDigesterOption = (1 << 17),
|
|
NewDriverOnlyOption = (1 << 18),
|
|
ModuleInterfaceOptionIgnorable = (1 << 19),
|
|
};
|
|
|
|
enum ID {
|
|
OPT_INVALID = 0, // This is not an option ID.
|
|
#define OPTION(PREFIX, NAME, ID, KIND, GROUP, ALIAS, ALIASARGS, FLAGS, PARAM, \
|
|
HELPTEXT, METAVAR, VALUES) \
|
|
OPT_##ID,
|
|
#include "swift/Option/Options.inc"
|
|
LastOption
|
|
#undef OPTION
|
|
};
|
|
} //end namespace options
|
|
|
|
std::unique_ptr<llvm::opt::OptTable> createSwiftOptTable();
|
|
|
|
} // end namespace swift
|
|
|
|
#endif
|