diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:47:18 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:47:18 +0000 |
| commit | 5c764a5a9bf6bb29d3a4f3bf2da9f84e89560d01 (patch) | |
| tree | a12bad01b56b7b7f4c950673e035678b29a35937 /llvm/lib | |
| parent | e8dd6ad040946f01b0bf78f876472a373578e0d7 (diff) | |
| download | bcm5719-llvm-5c764a5a9bf6bb29d3a4f3bf2da9f84e89560d01.tar.gz bcm5719-llvm-5c764a5a9bf6bb29d3a4f3bf2da9f84e89560d01.zip | |
Support new setName interface
llvm-svn: 462
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/VMCore/Function.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/VMCore/InstrTypes.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index 3d4a3547b0d..bd342a2473c 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -39,8 +39,10 @@ Method::~Method() { } // 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; + assert((ST == 0 || (!getParent() || ST == getParent()->getSymbolTable())) && + "Invalid symtab argument!"); if ((P = getParent()) && hasName()) P->getSymbolTable()->remove(this); Value::setName(name); if (P && getName() != "") P->getSymbolTableSure()->insert(this); diff --git a/llvm/lib/VMCore/InstrTypes.cpp b/llvm/lib/VMCore/InstrTypes.cpp index d0c410051a5..dbace177a98 100644 --- a/llvm/lib/VMCore/InstrTypes.cpp +++ b/llvm/lib/VMCore/InstrTypes.cpp @@ -25,8 +25,10 @@ TerminatorInst::TerminatorInst(unsigned iType) //===----------------------------------------------------------------------===// // 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; + assert((ST == 0 || (!getParent() || ST == getParent()->getSymbolTable())) && + "Invalid symtab argument!"); if ((P = getParent()) && hasName()) P->getSymbolTable()->remove(this); Value::setName(name); if (P && hasName()) P->getSymbolTable()->insert(this); |

