Use StringMap for greater justice!

llvm-svn: 53202
This commit is contained in:
Bill Wendling 2008-07-07 20:59:31 +00:00
parent 9169763955
commit 1214860a78
2 changed files with 3 additions and 2 deletions

View File

@ -37,6 +37,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/UniqueVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/GlobalValue.h"
#include "llvm/Pass.h"
@ -777,7 +778,7 @@ class DISerializer {
DenseMap<DebugInfoDesc *, GlobalVariable *> DescGlobals;
// Previously defined strings.
DenseMap<const char *, Constant*> StringCache;
StringMap<Constant*> StringCache;
public:
DISerializer()
: M(NULL), StrPtrTy(NULL), EmptyStructPtrTy(NULL), TagTypes(),

View File

@ -1321,7 +1321,7 @@ const StructType *DISerializer::getTagType(DebugInfoDesc *DD) {
///
Constant *DISerializer::getString(const std::string &String) {
// Check string cache for previous edition.
Constant *&Slot = StringCache[String.c_str()];
Constant *&Slot = StringCache[String];
// Return Constant if previously defined.
if (Slot) return Slot;