diff options
author | Chris Lattner <sabre@nondot.org> | 2002-06-25 16:13:24 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-06-25 16:13:24 +0000 |
commit | 7e70829632f82de15db187845666aaca6e04b792 (patch) | |
tree | 48dd2d804e7ebec9a3cbd8bf229cb2a2aa20dce5 /lib/Bytecode | |
parent | 0b12b5f50ec77a8bd01b92d287c52d748619bb4b (diff) | |
download | llvm-7e70829632f82de15db187845666aaca6e04b792.tar.gz llvm-7e70829632f82de15db187845666aaca6e04b792.tar.bz2 llvm-7e70829632f82de15db187845666aaca6e04b792.tar.xz |
MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r-- | lib/Bytecode/Writer/SlotCalculator.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/Bytecode/Writer/SlotCalculator.cpp b/lib/Bytecode/Writer/SlotCalculator.cpp index 6dad92609a..6b83a116e5 100644 --- a/lib/Bytecode/Writer/SlotCalculator.cpp +++ b/lib/Bytecode/Writer/SlotCalculator.cpp @@ -11,15 +11,11 @@ #include "llvm/SlotCalculator.h" #include "llvm/Analysis/ConstantsScanner.h" -#include "llvm/Function.h" -#include "llvm/GlobalVariable.h" #include "llvm/Module.h" -#include "llvm/BasicBlock.h" #include "llvm/iOther.h" #include "llvm/Constant.h" #include "llvm/DerivedTypes.h" #include "llvm/SymbolTable.h" -#include "llvm/Argument.h" #include "Support/DepthFirstIterator.h" #include "Support/STLExtras.h" #include <algorithm> @@ -75,20 +71,22 @@ void SlotCalculator::processModule() { // for (Module::const_giterator I = TheModule->gbegin(), E = TheModule->gend(); I != E; ++I) { - if ((*I)->hasInitializer()) - insertValue((*I)->getInitializer()); + if (I->hasInitializer()) + insertValue(I->getInitializer()); } // Add all of the global variables to the value table... // - for_each(TheModule->gbegin(), TheModule->gend(), - bind_obj(this, &SlotCalculator::insertValue)); + for(Module::const_giterator I = TheModule->gbegin(), E = TheModule->gend(); + I != E; ++I) + insertValue(I); // Scavenge the types out of the functions, then add the functions themselves // to the value table... // - for_each(TheModule->begin(), TheModule->end(), // Insert functions... - bind_obj(this, &SlotCalculator::insertValue)); + for(Module::const_iterator I = TheModule->begin(), E = TheModule->end(); + I != E; ++I) + insertValue(I); // Insert constants that are named at module level into the slot pool so that // the module symbol table can refer to them... @@ -132,8 +130,8 @@ void SlotCalculator::incorporateFunction(const Function *M) { SC_DEBUG("Inserting function arguments\n"); // Iterate over function arguments, adding them to the value table... - for_each(M->getArgumentList().begin(), M->getArgumentList().end(), - bind_obj(this, &SlotCalculator::insertValue)); + for(Function::const_aiterator I = M->abegin(), E = M->aend(); I != E; ++I) + insertValue(I); // Iterate over all of the instructions in the function, looking for constant // values that are referenced. Add these to the value pools before any @@ -166,8 +164,10 @@ void SlotCalculator::incorporateFunction(const Function *M) { SC_DEBUG("Inserting Labels:\n"); // Iterate over basic blocks, adding them to the value table... - for_each(M->begin(), M->end(), - bind_obj(this, &SlotCalculator::insertValue)); + for (Function::const_iterator I = M->begin(), E = M->end(); I != E; ++I) + insertValue(I); + /* for_each(M->begin(), M->end(), + bind_obj(this, &SlotCalculator::insertValue));*/ SC_DEBUG("Inserting Instructions:\n"); |