Hrm, another minor cleanup, which I missed before

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10753 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-01-10 21:42:24 +00:00
parent 9a0817971a
commit 91d7efbf4b

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) {