mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +00:00
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -35,12 +35,12 @@ class MDSymbolTable;
|
||||
|
||||
class ValueEnumerator {
|
||||
public:
|
||||
typedef std::vector<const Type*> TypeList;
|
||||
typedef std::vector<Type*> TypeList;
|
||||
|
||||
// For each value, we remember its Value* and occurrence frequency.
|
||||
typedef std::vector<std::pair<const Value*, unsigned> > ValueList;
|
||||
private:
|
||||
typedef DenseMap<const Type*, unsigned> TypeMapType;
|
||||
typedef DenseMap<Type*, unsigned> TypeMapType;
|
||||
TypeMapType TypeMap;
|
||||
TypeList Types;
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
|
||||
unsigned getValueID(const Value *V) const;
|
||||
|
||||
unsigned getTypeID(const Type *T) const {
|
||||
unsigned getTypeID(Type *T) const {
|
||||
TypeMapType::const_iterator I = TypeMap.find(T);
|
||||
assert(I != TypeMap.end() && "Type not in ValueEnumerator!");
|
||||
return I->second-1;
|
||||
@@ -140,7 +140,7 @@ private:
|
||||
void EnumerateFunctionLocalMetadata(const MDNode *N);
|
||||
void EnumerateNamedMDNode(const NamedMDNode *NMD);
|
||||
void EnumerateValue(const Value *V);
|
||||
void EnumerateType(const Type *T);
|
||||
void EnumerateType(Type *T);
|
||||
void EnumerateOperandType(const Value *V);
|
||||
void EnumerateAttributes(const AttrListPtr &PAL);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user