[cfe-commits] r164382 - /cfe/trunk/include/clang/AST/CXXInheritance.h

Rafael Espindola rafael.espindola at gmail.com
Fri Sep 21 10:15:24 PDT 2012


Author: rafael
Date: Fri Sep 21 12:15:24 2012
New Revision: 164382

URL: http://llvm.org/viewvc/llvm-project?rev=164382&view=rev
Log:
Use MapVectors to make the order we mark virtual functions used by a vtable
deterministic. Fixes pr13868.

Modified:
    cfe/trunk/include/clang/AST/CXXInheritance.h

Modified: cfe/trunk/include/clang/AST/CXXInheritance.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/CXXInheritance.h?rev=164382&r1=164381&r2=164382&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/CXXInheritance.h (original)
+++ cfe/trunk/include/clang/AST/CXXInheritance.h Fri Sep 21 12:15:24 2012
@@ -19,7 +19,7 @@
 #include "clang/AST/DeclCXX.h"
 #include "clang/AST/Type.h"
 #include "clang/AST/TypeOrdering.h"
-#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/MapVector.h"
 #include "llvm/ADT/SmallSet.h"
 #include "llvm/ADT/SmallVector.h"
 #include <list>
@@ -272,7 +272,7 @@
 /// subobject in which that virtual function occurs).
 class OverridingMethods {
   typedef SmallVector<UniqueVirtualMethod, 4> ValuesT;
-  typedef llvm::DenseMap<unsigned, ValuesT> MapType;
+  typedef llvm::MapVector<unsigned, ValuesT> MapType;
   MapType Overrides;
 
 public:
@@ -356,8 +356,8 @@
 /// 0 represents the virtua base class subobject of that type, while
 /// subobject numbers greater than 0 refer to non-virtual base class
 /// subobjects of that type.
-class CXXFinalOverriderMap 
-  : public llvm::DenseMap<const CXXMethodDecl *, OverridingMethods> { };
+class CXXFinalOverriderMap
+  : public llvm::MapVector<const CXXMethodDecl *, OverridingMethods> { };
 
 /// \brief A set of all the primary bases for a class.
 class CXXIndirectPrimaryBaseSet





More information about the cfe-commits mailing list