Hrm, another minor cleanup, which I missed before

llvm-svn: 10753
This commit is contained in:
Chris Lattner 2004-01-10 21:42:24 +00:00
parent 03c71fa8c5
commit 570c69ce01
1 changed files with 1 additions and 1 deletions

View File

@ -128,7 +128,7 @@ void Function::setName(const std::string &name, SymbolTable *ST) {
"Invalid symtab argument!");
if ((P = getParent()) && hasName()) P->getSymbolTable().remove(this);
Value::setName(name);
if (P && getName() != "") P->getSymbolTable().insert(this);
if (P && hasName()) P->getSymbolTable().insert(this);
}
void Function::setParent(Module *parent) {