Change a C-style cast to const_cast, to avoid a -Wcast-qual warning.
authorDan Gohman <gohman@apple.com>
Thu, 21 Feb 2008 17:33:24 +0000 (17:33 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 21 Feb 2008 17:33:24 +0000 (17:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47437 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/IPA/Andersens.cpp

index 399ce1f45dfc878b4167108855b5dfae0fb4acd8..22f151b0953f8c4ea66c53bea4ebeb80af58d0fd 100644 (file)
@@ -678,7 +678,7 @@ void Andersens::getMustAliases(Value *P, std::vector<Value*> &RetVals) {
 /// return true.
 ///
 bool Andersens::pointsToConstantMemory(const Value *P) {
-  Node *N = &GraphNodes[FindNode(getNode((Value*)P))];
+  Node *N = &GraphNodes[FindNode(getNode(const_cast<Value*>(P)))];
   unsigned i;
 
   for (SparseBitVector<>::iterator bi = N->PointsTo->begin();