aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/Globals.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VMCore/Globals.cpp b/lib/VMCore/Globals.cpp
index ea87701011..2369d1c8ea 100644
--- a/lib/VMCore/Globals.cpp
+++ b/lib/VMCore/Globals.cpp
@@ -120,7 +120,7 @@ void GlobalVariable::replaceUsesOfWithOnConstant(Value *From, Value *To,
"Attempt to replace GVar initializer with non-constant");
// Okay, preconditions out of the way, replace the constant initializer.
- this->setOperand(0,To);
+ this->setOperand(0, cast<Constant>(To));
}
// vim: sw=2 ai