|
@@ -11,6 +11,7 @@
|
|
|
|
|
|
#include "clang/Basic/LLVM.h"
|
|
#include "clang/Basic/LLVM.h"
|
|
#include "llvm/ADT/CachedHashString.h"
|
|
#include "llvm/ADT/CachedHashString.h"
|
|
|
|
+#include "llvm/ADT/Hashing.h"
|
|
#include "llvm/ADT/SetVector.h"
|
|
#include "llvm/ADT/SetVector.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include <cstdint>
|
|
#include <cstdint>
|
|
@@ -206,6 +207,13 @@ public:
|
|
|
|
|
|
unsigned ModulesHashContent : 1;
|
|
unsigned ModulesHashContent : 1;
|
|
|
|
|
|
|
|
+ /// Whether we should include all things that could impact the module in the
|
|
|
|
+ /// hash.
|
|
|
|
+ ///
|
|
|
|
+ /// This includes things like the full header search path, and enabled
|
|
|
|
+ /// diagnostics.
|
|
|
|
+ unsigned ModulesStrictContextHash : 1;
|
|
|
|
+
|
|
HeaderSearchOptions(StringRef _Sysroot = "/")
|
|
HeaderSearchOptions(StringRef _Sysroot = "/")
|
|
: Sysroot(_Sysroot), ModuleFormat("raw"), DisableModuleHash(false),
|
|
: Sysroot(_Sysroot), ModuleFormat("raw"), DisableModuleHash(false),
|
|
ImplicitModuleMaps(false), ModuleMapFileHomeIsCwd(false),
|
|
ImplicitModuleMaps(false), ModuleMapFileHomeIsCwd(false),
|
|
@@ -214,7 +222,8 @@ public:
|
|
ModulesValidateOncePerBuildSession(false),
|
|
ModulesValidateOncePerBuildSession(false),
|
|
ModulesValidateSystemHeaders(false),
|
|
ModulesValidateSystemHeaders(false),
|
|
ValidateASTInputFilesContent(false), UseDebugInfo(false),
|
|
ValidateASTInputFilesContent(false), UseDebugInfo(false),
|
|
- ModulesValidateDiagnosticOptions(true), ModulesHashContent(false) {}
|
|
|
|
|
|
+ ModulesValidateDiagnosticOptions(true), ModulesHashContent(false),
|
|
|
|
+ ModulesStrictContextHash(false) {}
|
|
|
|
|
|
/// AddPath - Add the \p Path path to the specified \p Group list.
|
|
/// AddPath - Add the \p Path path to the specified \p Group list.
|
|
void AddPath(StringRef Path, frontend::IncludeDirGroup Group,
|
|
void AddPath(StringRef Path, frontend::IncludeDirGroup Group,
|
|
@@ -238,6 +247,15 @@ public:
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+inline llvm::hash_code hash_value(const HeaderSearchOptions::Entry &E) {
|
|
|
|
+ return llvm::hash_combine(E.Path, E.Group, E.IsFramework, E.IgnoreSysRoot);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+inline llvm::hash_code
|
|
|
|
+hash_value(const HeaderSearchOptions::SystemHeaderPrefix &SHP) {
|
|
|
|
+ return llvm::hash_combine(SHP.Prefix, SHP.IsSystemHeader);
|
|
|
|
+}
|
|
|
|
+
|
|
} // namespace clang
|
|
} // namespace clang
|
|
|
|
|
|
#endif // LLVM_CLANG_LEX_HEADERSEARCHOPTIONS_H
|
|
#endif // LLVM_CLANG_LEX_HEADERSEARCHOPTIONS_H
|