Remove another memory leak from ABCD by using Edges by value instead of
[oota-llvm.git] / lib / VMCore / Constants.cpp
index 10f88794f5a2a6125ae2b508fed6bdefd1452b63..c9c98577eb640950609a1cd373b3bd28b4d99378 100644 (file)
@@ -160,7 +160,7 @@ bool Constant::canTrap() const {
 /// isConstantUsed - Return true if the constant has users other than constant
 /// exprs and other dangling things.
 bool Constant::isConstantUsed() const {
-  for (use_const_iterator UI = use_begin(), E = use_end(); UI != E; ++UI) {
+  for (const_use_iterator UI = use_begin(), E = use_end(); UI != E; ++UI) {
     const Constant *UC = dyn_cast<Constant>(*UI);
     if (UC == 0 || isa<GlobalValue>(UC))
       return true;