aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
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/VMCore/Function.cpp
parente05bf2f49caa7682c8c4ce39e03e6c596fc63bcc (diff)
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/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 3d4a3547b0..bd342a2473 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);