aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-07 16:47:18 +0000
committerChris Lattner <sabre@nondot.org>2001-09-07 16:47:18 +0000
commit7c43a0ace7af881e86625705542ee2cf640d5c7b (patch)
tree9f5a900c29f29d826fd9182f691856fb29516770 /lib
parente05bf2f49caa7682c8c4ce39e03e6c596fc63bcc (diff)
downloadexternal_llvm-7c43a0ace7af881e86625705542ee2cf640d5c7b.zip
external_llvm-7c43a0ace7af881e86625705542ee2cf640d5c7b.tar.gz
external_llvm-7c43a0ace7af881e86625705542ee2cf640d5c7b.tar.bz2
Support new setName interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Function.cpp4
-rw-r--r--lib/VMCore/InstrTypes.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 3d4a354..bd342a2 100644
--- a/lib/VMCore/Function.cpp
+++ b/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/lib/VMCore/InstrTypes.cpp b/lib/VMCore/InstrTypes.cpp
index d0c4100..dbace17 100644
--- a/lib/VMCore/InstrTypes.cpp
+++ b/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);