diff options
author | Manman Ren <mren@apple.com> | 2013-07-08 20:27:34 +0000 |
---|---|---|
committer | Manman Ren <mren@apple.com> | 2013-07-08 20:27:34 +0000 |
commit | 9c5e998043f2f36a7a71e1333de7832cff6ff71a (patch) | |
tree | 40a22ae91013c4a59e9b6b535a9b089a4a13cf4e /llvm | |
parent | fe56cc67c5e57521272ecef3beb360eed81ae402 (diff) | |
download | bcm5719-llvm-9c5e998043f2f36a7a71e1333de7832cff6ff71a.tar.gz bcm5719-llvm-9c5e998043f2f36a7a71e1333de7832cff6ff71a.zip |
Revert r185852.
llvm-svn: 185861
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/ADT/StringRef.h | 8 | ||||
-rw-r--r-- | llvm/include/llvm/DebugInfo.h | 4 | ||||
-rw-r--r-- | llvm/include/llvm/Support/YAMLTraits.h | 10 | ||||
-rw-r--r-- | llvm/lib/Support/StringRef.cpp | 5 |
4 files changed, 9 insertions, 18 deletions
diff --git a/llvm/include/llvm/ADT/StringRef.h b/llvm/include/llvm/ADT/StringRef.h index c5f2632f4be..d013d056232 100644 --- a/llvm/include/llvm/ADT/StringRef.h +++ b/llvm/include/llvm/ADT/StringRef.h @@ -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 diff --git a/llvm/include/llvm/DebugInfo.h b/llvm/include/llvm/DebugInfo.h index c33a21d729f..372d367b707 100644 --- a/llvm/include/llvm/DebugInfo.h +++ b/llvm/include/llvm/DebugInfo.h @@ -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. diff --git a/llvm/include/llvm/Support/YAMLTraits.h b/llvm/include/llvm/Support/YAMLTraits.h index 14cbfc23738..801868ff1f1 100644 --- a/llvm/include/llvm/Support/YAMLTraits.h +++ b/llvm/include/llvm/Support/YAMLTraits.h @@ -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); diff --git a/llvm/lib/Support/StringRef.cpp b/llvm/lib/Support/StringRef.cpp index c0f366cb3e5..d7a0bfa4100 100644 --- a/llvm/lib/Support/StringRef.cpp +++ b/llvm/lib/Support/StringRef.cpp @@ -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 Radix, APInt &Result) const { 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); -} |