]> granicus.if.org Git - llvm/commitdiff
[llvm-pdbutil] Fix build.
authorZachary Turner <zturner@google.com>
Fri, 7 Jul 2017 19:00:06 +0000 (19:00 +0000)
committerZachary Turner <zturner@google.com>
Fri, 7 Jul 2017 19:00:06 +0000 (19:00 +0000)
Some platforms require an explicit specialization of std::hash
for PdbRaw_FeaturesSig.  Also a test involving case sensitivity
needed to be fixed.  For now that particular check just accepts
any path even if they're completely different.  Long term we
should output paths in the correct case to match MSVC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@307426 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-pdbutil/DiffPrinter.h

index 1235befa1c24d0c8328aad7932c30bc89a5d9418..eeda92b072c007013b7a66ee33bcb0e3cfd48484 100644 (file)
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/StringMap.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/DebugInfo/PDB/Native/RawConstants.h"
 #include "llvm/Support/FormatVariadic.h"
 #include "llvm/Support/raw_ostream.h"
 
 #include <list>
 #include <unordered_set>
 
+namespace std {
+template <> struct hash<llvm::pdb::PdbRaw_FeatureSig> {
+  typedef llvm::pdb::PdbRaw_FeatureSig argument_type;
+  typedef std::size_t result_type;
+  result_type operator()(argument_type Item) const {
+    return std::hash<uint32_t>{}(uint32_t(Item));
+  }
+};
+} // namespace std
+
 namespace llvm {
 namespace pdb {