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

Support new setName interface

llvm-svn: 462
This commit is contained in:
Chris Lattner 2001-09-07 16:47:18 +00:00
parent 0e510b8267
commit aeaeab832b
2 changed files with 6 additions and 2 deletions

View File

@ -39,8 +39,10 @@ Method::~Method() {
} }
// Specialize setName to take care of symbol table majik // Specialize setName to take care of symbol table majik
void Method::setName(const string &name) { void Method::setName(const string &name, SymbolTable *ST) {
Module *P; Module *P;
assert((ST == 0 || (!getParent() || ST == getParent()->getSymbolTable())) &&
"Invalid symtab argument!");
if ((P = getParent()) && hasName()) P->getSymbolTable()->remove(this); if ((P = getParent()) && hasName()) P->getSymbolTable()->remove(this);
Value::setName(name); Value::setName(name);
if (P && getName() != "") P->getSymbolTableSure()->insert(this); if (P && getName() != "") P->getSymbolTableSure()->insert(this);

View File

@ -25,8 +25,10 @@ TerminatorInst::TerminatorInst(unsigned iType)
//===----------------------------------------------------------------------===// //===----------------------------------------------------------------------===//
// Specialize setName to take care of symbol table majik // Specialize setName to take care of symbol table majik
void MethodArgument::setName(const string &name) { void MethodArgument::setName(const string &name, SymbolTable *ST) {
Method *P; Method *P;
assert((ST == 0 || (!getParent() || ST == getParent()->getSymbolTable())) &&
"Invalid symtab argument!");
if ((P = getParent()) && hasName()) P->getSymbolTable()->remove(this); if ((P = getParent()) && hasName()) P->getSymbolTable()->remove(this);
Value::setName(name); Value::setName(name);
if (P && hasName()) P->getSymbolTable()->insert(this); if (P && hasName()) P->getSymbolTable()->insert(this);