diff options
Diffstat (limited to 'include/clang/Basic/Module.h')
-rw-r--r-- | include/clang/Basic/Module.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/clang/Basic/Module.h b/include/clang/Basic/Module.h index 31c5c7ec9ca8..8fcb0e8b056a 100644 --- a/include/clang/Basic/Module.h +++ b/include/clang/Basic/Module.h @@ -42,7 +42,17 @@ class IdentifierInfo; /// \brief Describes the name of a module. typedef SmallVector<std::pair<std::string, SourceLocation>, 2> ModuleId; - + +/// The signature of a module, which is a hash of the AST content. +struct ASTFileSignature : std::array<uint32_t, 5> { + ASTFileSignature(std::array<uint32_t, 5> S = {{0}}) + : std::array<uint32_t, 5>(std::move(S)) {} + + explicit operator bool() const { + return *this != std::array<uint32_t, 5>({{0}}); + } +}; + /// \brief Describes a module or submodule. class Module { public: @@ -65,7 +75,7 @@ public: llvm::PointerUnion<const DirectoryEntry *, const FileEntry *> Umbrella; /// \brief The module signature. - uint64_t Signature; + ASTFileSignature Signature; /// \brief The name of the umbrella entry, as written in the module map. std::string UmbrellaAsWritten; |