#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"
DenseMap<DebugInfoDesc *, GlobalVariable *> DescGlobals;
// Previously defined strings.
- DenseMap<const char *, Constant*> StringCache;
+ StringMap<Constant*> StringCache;
public:
DISerializer()
: M(NULL), StrPtrTy(NULL), EmptyStructPtrTy(NULL), TagTypes(),
///
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;