Skip to content

Commit 8e73d21

Browse files
committed
[NFC] Add Incremental Info Bits to ModuleFileSharedCore
1 parent f1f5961 commit 8e73d21

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

lib/Serialization/ModuleFile.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,9 @@ class ModuleFile
465465
return Core->Bits.IsImplicitDynamicEnabled;
466466
}
467467

468+
/// \c true if this module has incremental dependency information.
469+
bool hasIncrementalInfo() const { return Core->hasIncrementalInfo(); }
470+
468471
/// Associates this module file with the AST node representing it.
469472
///
470473
/// Checks that the file is compatible with the AST module it's being loaded

lib/Serialization/ModuleFileSharedCore.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ class ModuleFileSharedCore {
6969
/// The data blob containing all of the module's identifiers.
7070
StringRef IdentifierData;
7171

72-
// Full blob from the misc. version field of the metadata block. This should
73-
// include the version string of the compiler that built the module.
72+
/// Full blob from the misc. version field of the metadata block. This should
73+
/// include the version string of the compiler that built the module.
7474
StringRef MiscVersion;
7575

76+
/// \c true if this module has incremental dependency information.
77+
bool HasIncrementalInfo = false;
78+
7679
public:
7780
/// Represents another module that has been imported as a dependency.
7881
class Dependency {
@@ -490,6 +493,10 @@ class ModuleFileSharedCore {
490493
ArrayRef<Dependency> getDependencies() const {
491494
return Dependencies;
492495
}
496+
497+
/// Returns \c true if this module file contains a section with incremental
498+
/// information.
499+
bool hasIncrementalInfo() const { return HasIncrementalInfo; }
493500
};
494501

495502
template <typename T, typename RawData>

lib/Serialization/SerializedModuleLoader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ LoadedFile *SerializedModuleLoaderBase::loadAST(
714714
M.setPrivateImportsEnabled();
715715
if (loadedModuleFile->isImplicitDynamicEnabled())
716716
M.setImplicitDynamicEnabled();
717+
if (loadedModuleFile->hasIncrementalInfo())
718+
M.setHasIncrementalInfo();
717719

718720
auto diagLocOrInvalid = diagLoc.getValueOr(SourceLoc());
719721
loadInfo.status =

0 commit comments

Comments
 (0)