[llvm] r230205 - [llvm-pdbdump] Fix builders again.

Zachary Turner zturner at google.com
Sun Feb 22 22:13:27 PST 2015


Author: zturner
Date: Mon Feb 23 00:13:27 2015
New Revision: 230205

URL: http://llvm.org/viewvc/llvm-project?rev=230205&view=rev
Log:
[llvm-pdbdump] Fix builders again.

Modified:
    llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.cpp
    llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.h

Modified: llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.cpp?rev=230205&r1=230204&r2=230205&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.cpp (original)
+++ llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.cpp Mon Feb 23 00:13:27 2015
@@ -44,10 +44,11 @@ void ClassDefinitionDumper::start(const
   // NOTE: Access level of nested types is not recorded in the PDB, so we have
   // a special case for them.
   SymbolGroupByAccess Groups;
-  Groups.insert(std::make_pair((PDB_MemberAccess)0, SymbolGroup()));
-  Groups.insert(std::make_pair(PDB_MemberAccess::Private, SymbolGroup()));
-  Groups.insert(std::make_pair(PDB_MemberAccess::Protected, SymbolGroup()));
-  Groups.insert(std::make_pair(PDB_MemberAccess::Public, SymbolGroup()));
+  Groups.insert(std::make_pair(0, SymbolGroup()));
+  Groups.insert(std::make_pair((int)PDB_MemberAccess::Private, SymbolGroup()));
+  Groups.insert(
+      std::make_pair((int)PDB_MemberAccess::Protected, SymbolGroup()));
+  Groups.insert(std::make_pair((int)PDB_MemberAccess::Public, SymbolGroup()));
 
   while (auto Child = Children->getNext()) {
     PDB_MemberAccess Access = Child->getRawSymbol().getAccess();
@@ -55,7 +56,7 @@ void ClassDefinitionDumper::start(const
       continue;
 
     SymbolGroup *InsertGroup = nullptr;
-    auto &AccessGroup = Groups.find(Access)->second;
+    auto &AccessGroup = Groups.find((int)Access)->second;
 
     if (auto Func = dyn_cast<PDBSymbolFunc>(Child.get())) {
       if (Func->isCompilerGenerated())
@@ -73,14 +74,14 @@ void ClassDefinitionDumper::start(const
   }
 
   int Count = 0;
-  Count += dumpAccessGroup((PDB_MemberAccess)0, Groups[(PDB_MemberAccess)0], OS,
-                           Indent);
+  Count += dumpAccessGroup((PDB_MemberAccess)0, Groups[0], OS, Indent);
   Count += dumpAccessGroup(PDB_MemberAccess::Public,
-                           Groups[PDB_MemberAccess::Public], OS, Indent);
-  Count += dumpAccessGroup(PDB_MemberAccess::Protected,
-                           Groups[PDB_MemberAccess::Protected], OS, Indent);
+                           Groups[(int)PDB_MemberAccess::Public], OS, Indent);
+  Count +=
+      dumpAccessGroup(PDB_MemberAccess::Protected,
+                      Groups[(int)PDB_MemberAccess::Protected], OS, Indent);
   Count += dumpAccessGroup(PDB_MemberAccess::Private,
-                           Groups[PDB_MemberAccess::Private], OS, Indent);
+                           Groups[(int)PDB_MemberAccess::Private], OS, Indent);
 
   if (Count > 0)
     OS << newline(Indent);

Modified: llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.h?rev=230205&r1=230204&r2=230205&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.h (original)
+++ llvm/trunk/tools/llvm-pdbdump/ClassDefinitionDumper.h Mon Feb 23 00:13:27 2015
@@ -54,7 +54,7 @@ private:
     SymbolGroup(const SymbolGroup &other) = delete;
     SymbolGroup &operator=(const SymbolGroup &other) = delete;
   };
-  typedef std::unordered_map<PDB_MemberAccess, SymbolGroup> SymbolGroupByAccess;
+  typedef std::unordered_map<int, SymbolGroup> SymbolGroupByAccess;
 
   int dumpAccessGroup(PDB_MemberAccess Access, const SymbolGroup &Group,
                       raw_ostream &OS, int Indent);





More information about the llvm-commits mailing list