aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 4714d3b258..f98a7c7165 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -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) {