Hrm, another minor cleanup, which I missed before
authorChris Lattner <sabre@nondot.org>
Sat, 10 Jan 2004 21:42:24 +0000 (21:42 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 10 Jan 2004 21:42:24 +0000 (21:42 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10753 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/Function.cpp

index 4714d3b2584564b3a50c80c2b4bd62fd99827934..f98a7c71656bab9a624014c853bff50cca1247af 100644 (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) {