aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-05 19:01:49 +0000
committerChris Lattner <sabre@nondot.org>2005-03-05 19:01:49 +0000
commit18221ed50707342bc4c655b33a3d3dc652463811 (patch)
treee68a76be38b7555ba679ac59b3220e4d080d5cf6 /lib/VMCore/Function.cpp
parentd0478744b3b5232694d0f887b3210078de5266c4 (diff)
Remove the 2nd argument to Value::setName
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index ae4a549509..7cced301e6 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -64,10 +64,8 @@ Argument::Argument(const Type *Ty, const std::string &Name, Function *Par)
// Specialize setName to take care of symbol table majik
-void Argument::setName(const std::string &name, SymbolTable *ST) {
+void Argument::setName(const std::string &name) {
Function *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);
@@ -121,10 +119,8 @@ Function::~Function() {
}
// Specialize setName to take care of symbol table majik
-void Function::setName(const std::string &name, SymbolTable *ST) {
+void Function::setName(const std::string &name) {
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 && hasName()) P->getSymbolTable().insert(this);
@@ -170,7 +166,7 @@ void Function::renameLocalSymbols() {
for (SymbolTable::plane_iterator LPI = LST.plane_begin(), E = LST.plane_end();
LPI != E; ++LPI)
// All global symbols are of pointer type, ignore any non-pointer planes.
- if (isa<PointerType>(LPI->first)) {
+ if (const PointerType *CurTy = dyn_cast<PointerType>(LPI->first)) {
// Only check if the global plane has any symbols of this type.
SymbolTable::plane_iterator GPI = GST.find(LPI->first);
if (GPI != GST.plane_end()) {