[llvm] r307426 - [llvm-pdbutil] Fix build.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 12:00:06 PDT 2017


Author: zturner
Date: Fri Jul  7 12:00:06 2017
New Revision: 307426

URL: http://llvm.org/viewvc/llvm-project?rev=307426&view=rev
Log:
[llvm-pdbutil] Fix build.

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.

Modified:
    llvm/trunk/tools/llvm-pdbutil/DiffPrinter.h

Modified: llvm/trunk/tools/llvm-pdbutil/DiffPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbutil/DiffPrinter.h?rev=307426&r1=307425&r2=307426&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbutil/DiffPrinter.h (original)
+++ llvm/trunk/tools/llvm-pdbutil/DiffPrinter.h Fri Jul  7 12:00:06 2017
@@ -13,12 +13,23 @@
 #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 {
 




More information about the llvm-commits mailing list