[llvm] r185861 - Revert r185852.
Manman Ren
mren at apple.com
Mon Jul 8 13:27:35 PDT 2013
Author: mren
Date: Mon Jul 8 15:27:34 2013
New Revision: 185861
URL: http://llvm.org/viewvc/llvm-project?rev=185861&view=rev
Log:
Revert r185852.
Modified:
llvm/trunk/include/llvm/ADT/StringRef.h
llvm/trunk/include/llvm/DebugInfo.h
llvm/trunk/include/llvm/Support/YAMLTraits.h
llvm/trunk/lib/Support/StringRef.cpp
Modified: llvm/trunk/include/llvm/ADT/StringRef.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringRef.h?rev=185861&r1=185860&r2=185861&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringRef.h (original)
+++ llvm/trunk/include/llvm/ADT/StringRef.h Mon Jul 8 15:27:34 2013
@@ -548,14 +548,6 @@ namespace llvm {
template <typename T> struct isPodLike;
template <> struct isPodLike<StringRef> { static const bool value = true; };
- template <typename T> struct DenseMapInfo;
- template<> struct DenseMapInfo<StringRef> {
- static StringRef getEmptyKey() { return StringRef(); }
- static StringRef getTombstoneKey() { return StringRef(" ", 0); }
- static unsigned getHashValue(StringRef const val);
- static bool isEqual(StringRef const lhs,
- StringRef const rhs) { return lhs.equals(rhs); }
- };
}
#endif
Modified: llvm/trunk/include/llvm/DebugInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/DebugInfo.h?rev=185861&r1=185860&r2=185861&view=diff
==============================================================================
--- llvm/trunk/include/llvm/DebugInfo.h (original)
+++ llvm/trunk/include/llvm/DebugInfo.h Mon Jul 8 15:27:34 2013
@@ -17,7 +17,6 @@
#ifndef LLVM_DEBUGINFO_H
#define LLVM_DEBUGINFO_H
-#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
@@ -46,9 +45,6 @@ namespace llvm {
class DIType;
class DIObjCProperty;
- /// Map from a pair <unique type name, an unsigned flag> to MDNode.
- typedef DenseMap<std::pair<StringRef, unsigned>, MDNode*> DITypeHashMap;
-
/// DIDescriptor - A thin wraper around MDNode to access encoded debug info.
/// This should not be stored in a container, because the underlying MDNode
/// may change in certain situations.
Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=185861&r1=185860&r2=185861&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLTraits.h Mon Jul 8 15:27:34 2013
@@ -760,7 +760,15 @@ private:
}
static inline bool classof(const MapHNode *) { return true; }
- typedef llvm::DenseMap<StringRef, HNode*> NameToNode;
+ struct StrMappingInfo {
+ static StringRef getEmptyKey() { return StringRef(); }
+ static StringRef getTombstoneKey() { return StringRef(" ", 0); }
+ static unsigned getHashValue(StringRef const val) {
+ return llvm::HashString(val); }
+ static bool isEqual(StringRef const lhs,
+ StringRef const rhs) { return lhs.equals(rhs); }
+ };
+ typedef llvm::DenseMap<StringRef, HNode*, StrMappingInfo> NameToNode;
bool isValidKey(StringRef key);
Modified: llvm/trunk/lib/Support/StringRef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/StringRef.cpp?rev=185861&r1=185860&r2=185861&view=diff
==============================================================================
--- llvm/trunk/lib/Support/StringRef.cpp (original)
+++ llvm/trunk/lib/Support/StringRef.cpp Mon Jul 8 15:27:34 2013
@@ -11,7 +11,6 @@
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/OwningPtr.h"
-#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/edit_distance.h"
#include <bitset>
@@ -466,7 +465,3 @@ bool StringRef::getAsInteger(unsigned Ra
hash_code llvm::hash_value(StringRef S) {
return hash_combine_range(S.begin(), S.end());
}
-
-unsigned DenseMapInfo<StringRef>::getHashValue(StringRef const val) {
- return llvm::HashString(val);
-}
More information about the llvm-commits
mailing list