1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Add a new method, allow symtab to poke name.

llvm-svn: 20468
This commit is contained in:
Chris Lattner 2005-03-06 02:10:40 +00:00
parent db51926d4a
commit 60929fdff1
2 changed files with 10 additions and 0 deletions

View File

@ -217,6 +217,14 @@ public:
return this->removeEntry(pmap.find(It->second->getType()), It);
}
/// changeName - Given a value with a non-empty name, remove its existing
/// entry from the symbol table and insert a new one for Name. This is
/// equivalent to doing "remove(V), V->Name = Name, insert(V)", but is faster,
/// and will not temporarily remove the symbol table plane if V is the last
/// value in the symtab with that name (which could invalidate iterators to
/// that plane).
void changeName(Value *V, const std::string &Name);
/// This method will strip the symbol table of its names leaving
/// the type and values.
/// @brief Strip the symbol table.

View File

@ -50,6 +50,8 @@ protected:
private:
PATypeHolder Ty;
Use *UseList;
friend class SymbolTable; // Allow SymbolTable to directly poke Name.
std::string Name;
void operator=(const Value &); // Do not implement