mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
Use StringMap for greater justice!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53202 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0fe9c6e7ba
commit
667a68b96a
@ -37,6 +37,7 @@
|
|||||||
#include "llvm/ADT/DenseMap.h"
|
#include "llvm/ADT/DenseMap.h"
|
||||||
#include "llvm/ADT/UniqueVector.h"
|
#include "llvm/ADT/UniqueVector.h"
|
||||||
#include "llvm/ADT/SmallPtrSet.h"
|
#include "llvm/ADT/SmallPtrSet.h"
|
||||||
|
#include "llvm/ADT/StringMap.h"
|
||||||
#include "llvm/GlobalValue.h"
|
#include "llvm/GlobalValue.h"
|
||||||
#include "llvm/Pass.h"
|
#include "llvm/Pass.h"
|
||||||
|
|
||||||
@ -777,7 +778,7 @@ class DISerializer {
|
|||||||
DenseMap<DebugInfoDesc *, GlobalVariable *> DescGlobals;
|
DenseMap<DebugInfoDesc *, GlobalVariable *> DescGlobals;
|
||||||
|
|
||||||
// Previously defined strings.
|
// Previously defined strings.
|
||||||
DenseMap<const char *, Constant*> StringCache;
|
StringMap<Constant*> StringCache;
|
||||||
public:
|
public:
|
||||||
DISerializer()
|
DISerializer()
|
||||||
: M(NULL), StrPtrTy(NULL), EmptyStructPtrTy(NULL), TagTypes(),
|
: M(NULL), StrPtrTy(NULL), EmptyStructPtrTy(NULL), TagTypes(),
|
||||||
|
@ -1321,7 +1321,7 @@ const StructType *DISerializer::getTagType(DebugInfoDesc *DD) {
|
|||||||
///
|
///
|
||||||
Constant *DISerializer::getString(const std::string &String) {
|
Constant *DISerializer::getString(const std::string &String) {
|
||||||
// Check string cache for previous edition.
|
// Check string cache for previous edition.
|
||||||
Constant *&Slot = StringCache[String.c_str()];
|
Constant *&Slot = StringCache[String];
|
||||||
|
|
||||||
// Return Constant if previously defined.
|
// Return Constant if previously defined.
|
||||||
if (Slot) return Slot;
|
if (Slot) return Slot;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user