[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Wed Aug 4 01:03:10 PDT 2004



Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.98 -> 1.99
---
Log message:

Stop using getValues().


---
Diffs of the changes:  (+6 -6)

Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.98 llvm/lib/VMCore/Constants.cpp:1.99
--- llvm/lib/VMCore/Constants.cpp:1.98	Tue Aug  3 23:48:01 2004
+++ llvm/lib/VMCore/Constants.cpp	Wed Aug  4 03:02:59 2004
@@ -439,9 +439,9 @@
   assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!");
 
   std::vector<Constant*> Values;
-  Values.reserve(getValues().size());  // Build replacement array...
-  for (unsigned i = 0, e = getValues().size(); i != e; ++i) {
-    Constant *Val = cast<Constant>(getValues()[i]);
+  Values.reserve(getNumOperands());  // Build replacement array...
+  for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
+    Constant *Val = getOperand(i);
     if (Val == From) Val = cast<Constant>(To);
     Values.push_back(Val);
   }
@@ -464,9 +464,9 @@
   assert(isa<Constant>(To) && "Cannot make Constant refer to non-constant!");
 
   std::vector<Constant*> Values;
-  Values.reserve(getValues().size());
-  for (unsigned i = 0, e = getValues().size(); i != e; ++i) {
-    Constant *Val = cast<Constant>(getValues()[i]);
+  Values.reserve(getNumOperands());  // Build replacement array...
+  for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
+    Constant *Val = getOperand(i);
     if (Val == From) Val = cast<Constant>(To);
     Values.push_back(Val);
   }






More information about the llvm-commits mailing list