mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[NFC] Add Incremental Info Bits to ModuleDecl
This commit is contained in:
@@ -578,7 +578,7 @@ protected:
|
|||||||
HasAnyUnavailableValues : 1
|
HasAnyUnavailableValues : 1
|
||||||
);
|
);
|
||||||
|
|
||||||
SWIFT_INLINE_BITFIELD(ModuleDecl, TypeDecl, 1+1+1+1+1+1+1+1+1,
|
SWIFT_INLINE_BITFIELD(ModuleDecl, TypeDecl, 1+1+1+1+1+1+1+1+1+1,
|
||||||
/// If the module was or is being compiled with `-enable-testing`.
|
/// If the module was or is being compiled with `-enable-testing`.
|
||||||
TestingEnabled : 1,
|
TestingEnabled : 1,
|
||||||
|
|
||||||
@@ -607,7 +607,10 @@ protected:
|
|||||||
IsNonSwiftModule : 1,
|
IsNonSwiftModule : 1,
|
||||||
|
|
||||||
/// Whether this module is the main module.
|
/// Whether this module is the main module.
|
||||||
IsMainModule : 1
|
IsMainModule : 1,
|
||||||
|
|
||||||
|
/// Whether this module has incremental dependency information available.
|
||||||
|
HasIncrementalInfo : 1
|
||||||
);
|
);
|
||||||
|
|
||||||
SWIFT_INLINE_BITFIELD(PrecedenceGroupDecl, Decl, 1+2,
|
SWIFT_INLINE_BITFIELD(PrecedenceGroupDecl, Decl, 1+2,
|
||||||
|
|||||||
@@ -517,6 +517,12 @@ public:
|
|||||||
Bits.ModuleDecl.RawResilienceStrategy = unsigned(strategy);
|
Bits.ModuleDecl.RawResilienceStrategy = unsigned(strategy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if this module was or is being compiled for testing.
|
||||||
|
bool hasIncrementalInfo() const { return Bits.ModuleDecl.HasIncrementalInfo; }
|
||||||
|
void setHasIncrementalInfo(bool enabled = true) {
|
||||||
|
Bits.ModuleDecl.HasIncrementalInfo = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
/// \returns true if this module is a system module; note that the StdLib is
|
/// \returns true if this module is a system module; note that the StdLib is
|
||||||
/// considered a system module.
|
/// considered a system module.
|
||||||
bool isSystemModule() const {
|
bool isSystemModule() const {
|
||||||
|
|||||||
@@ -484,6 +484,7 @@ ModuleDecl::ModuleDecl(Identifier name, ASTContext &ctx,
|
|||||||
Bits.ModuleDecl.IsSystemModule = 0;
|
Bits.ModuleDecl.IsSystemModule = 0;
|
||||||
Bits.ModuleDecl.IsNonSwiftModule = 0;
|
Bits.ModuleDecl.IsNonSwiftModule = 0;
|
||||||
Bits.ModuleDecl.IsMainModule = 0;
|
Bits.ModuleDecl.IsMainModule = 0;
|
||||||
|
Bits.ModuleDecl.HasIncrementalInfo = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayRef<ImplicitImport> ModuleDecl::getImplicitImports() const {
|
ArrayRef<ImplicitImport> ModuleDecl::getImplicitImports() const {
|
||||||
|
|||||||
Reference in New Issue
Block a user