aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Value.cpp')
-rw-r--r--lib/VMCore/Value.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VMCore/Value.cpp b/lib/VMCore/Value.cpp
index 0218e5798f..f84671d475 100644
--- a/lib/VMCore/Value.cpp
+++ b/lib/VMCore/Value.cpp
@@ -120,7 +120,9 @@ void Value::setName(const std::string &name) {
Name = name;
else if (hasName()) {
if (!name.empty()) { // Replacing name.
- ST->rename(this, name);
+ ST->remove(this);
+ Name = name;
+ ST->insert(this);
} else { // Transitioning from hasName -> noname.
ST->remove(this);
Name.clear();