mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 08:46:37 +00:00
Make the lookup method const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b0fa659981
commit
69284b03d1
@ -42,7 +42,7 @@ public:
|
|||||||
~SymbolTable();
|
~SymbolTable();
|
||||||
|
|
||||||
// lookup - Returns null on failure...
|
// lookup - Returns null on failure...
|
||||||
Value *lookup(const Type *Ty, const std::string &name);
|
Value *lookup(const Type *Ty, const std::string &name) const;
|
||||||
|
|
||||||
// insert - Add named definition to the symbol table...
|
// insert - Add named definition to the symbol table...
|
||||||
inline void insert(Value *N) {
|
inline void insert(Value *N) {
|
||||||
|
@ -72,10 +72,10 @@ std::string SymbolTable::getUniqueName(const Type *Ty,
|
|||||||
|
|
||||||
|
|
||||||
// lookup - Returns null on failure...
|
// lookup - Returns null on failure...
|
||||||
Value *SymbolTable::lookup(const Type *Ty, const std::string &Name) {
|
Value *SymbolTable::lookup(const Type *Ty, const std::string &Name) const {
|
||||||
iterator I = find(Ty);
|
const_iterator I = find(Ty);
|
||||||
if (I != end()) { // We have symbols in that plane...
|
if (I != end()) { // We have symbols in that plane...
|
||||||
type_iterator J = I->second.find(Name);
|
type_const_iterator J = I->second.find(Name);
|
||||||
if (J != I->second.end()) // and the name is in our hash table...
|
if (J != I->second.end()) // and the name is in our hash table...
|
||||||
return J->second;
|
return J->second;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user