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:
parent
0e510b8267
commit
aeaeab832b
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user