-// getUniqueName - Given a base name, return a string that is either equal to
-// it (or derived from it) that does not already occur in the symbol table for
-// the specified type.
-//
-std::string ValueSymbolTable::getUniqueName(const std::string &BaseName) const {
- std::string TryName = BaseName;
-
- // See if the name exists
- while (vmap.find(&TryName[0], &TryName[TryName.size()]) != vmap.end())
- // Loop until we find a free name in the symbol table.
- TryName = BaseName + utostr(++LastUnique);
- return TryName;
-}
-
-
-// lookup a value - Returns null on failure...
-//
-Value *ValueSymbolTable::lookup(const std::string &Name) const {
- const_iterator VI = vmap.find(&Name[0], &Name[Name.size()]);
- if (VI != vmap.end()) // We found the symbol
- return VI->getValue();
- return 0;
-}
-