[ModuleInterface] Add new TextualInterfaceOption flag, move TextualInterfaceGeneration.{h,cpp}

This commit is contained in:
Graydon Hoare
2018-09-24 14:51:59 -07:00
parent 5aae7741ea
commit 196fbbfc46
7 changed files with 10 additions and 6 deletions

View File

@@ -10,8 +10,8 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#ifndef SWIFT_FRONTENDTOOL_PARSEABLEINTERFACEGENERATION_H #ifndef SWIFT_FRONTEND_PARSEABLEINTERFACEGENERATION_H
#define SWIFT_FRONTENDTOOL_PARSEABLEINTERFACEGENERATION_H #define SWIFT_FRONTEND_PARSEABLEINTERFACEGENERATION_H
#include "swift/Basic/LLVM.h" #include "swift/Basic/LLVM.h"

View File

@@ -35,6 +35,7 @@ namespace options {
ModuleWrapOption = (1 << 10), ModuleWrapOption = (1 << 10),
SwiftFormatOption = (1 << 11), SwiftFormatOption = (1 << 11),
ArgumentIsPath = (1 << 12), ArgumentIsPath = (1 << 12),
TextualInterfaceOption = (1 << 13),
}; };
enum ID { enum ID {

View File

@@ -47,6 +47,10 @@ def DoesNotAffectIncrementalBuild : OptionFlag;
// current working directory. // current working directory.
def ArgumentIsPath : OptionFlag; def ArgumentIsPath : OptionFlag;
// The option should be written into a .swiftinterface textual interface file,
// and read/parsed from there when reconstituting a .swiftmodule from it.
def TextualInterfaceOption : OptionFlag;
///////// /////////
// Options // Options

View File

@@ -7,6 +7,7 @@ add_swift_library(swiftFrontend STATIC
Frontend.cpp Frontend.cpp
FrontendInputsAndOutputs.cpp FrontendInputsAndOutputs.cpp
FrontendOptions.cpp FrontendOptions.cpp
ParseableInterfaceGeneration.cpp
PrintingDiagnosticConsumer.cpp PrintingDiagnosticConsumer.cpp
SerializedDiagnosticConsumer.cpp SerializedDiagnosticConsumer.cpp
DEPENDS DEPENDS

View File

@@ -10,12 +10,11 @@
// //
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
#include "ParseableInterfaceGeneration.h"
#include "swift/AST/ASTContext.h" #include "swift/AST/ASTContext.h"
#include "swift/AST/Decl.h" #include "swift/AST/Decl.h"
#include "swift/AST/DiagnosticsFrontend.h" #include "swift/AST/DiagnosticsFrontend.h"
#include "swift/AST/Module.h" #include "swift/AST/Module.h"
#include "swift/Frontend/ParseableInterfaceGeneration.h"
#include "clang/Basic/Module.h" #include "clang/Basic/Module.h"
using namespace swift; using namespace swift;

View File

@@ -3,7 +3,6 @@ add_swift_library(swiftFrontendTool STATIC
ImportedModules.cpp ImportedModules.cpp
ReferenceDependencies.cpp ReferenceDependencies.cpp
TBD.cpp TBD.cpp
ParseableInterfaceGeneration.cpp
DEPENDS DEPENDS
swift-syntax-generated-headers SwiftOptions swift-syntax-generated-headers SwiftOptions
LINK_LIBRARIES LINK_LIBRARIES

View File

@@ -24,7 +24,6 @@
#include "ImportedModules.h" #include "ImportedModules.h"
#include "ReferenceDependencies.h" #include "ReferenceDependencies.h"
#include "TBD.h" #include "TBD.h"
#include "ParseableInterfaceGeneration.h"
#include "swift/Subsystems.h" #include "swift/Subsystems.h"
#include "swift/AST/ASTScope.h" #include "swift/AST/ASTScope.h"
@@ -50,6 +49,7 @@
#include "swift/Frontend/Frontend.h" #include "swift/Frontend/Frontend.h"
#include "swift/Frontend/PrintingDiagnosticConsumer.h" #include "swift/Frontend/PrintingDiagnosticConsumer.h"
#include "swift/Frontend/SerializedDiagnosticConsumer.h" #include "swift/Frontend/SerializedDiagnosticConsumer.h"
#include "swift/Frontend/ParseableInterfaceGeneration.h"
#include "swift/Immediate/Immediate.h" #include "swift/Immediate/Immediate.h"
#include "swift/Index/IndexRecord.h" #include "swift/Index/IndexRecord.h"
#include "swift/Option/Options.h" #include "swift/Option/Options.h"