This mega patch converts us from using Function::a{iterator|begin|end} to

using Function::arg_{iterator|begin|end}.  Likewise Module::g* -> Module::global_*.

This patch is contributed by Gabor Greif, thanks!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2005-03-15 04:54:21 +00:00
parent 89cc2656ba
commit e4d5c441e0
65 changed files with 185 additions and 185 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ bool GlobalDCE::runOnModule(Module &M) {
GlobalIsNeeded(I);
}
for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I) {
for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I) {
Changed |= RemoveUnusedGlobalValue(*I);
// Externally visible & appending globals are needed, if they have an
// initializer.
@@ -76,7 +76,7 @@ bool GlobalDCE::runOnModule(Module &M) {
// The first pass is to drop initializers of global variables which are dead.
std::vector<GlobalVariable*> DeadGlobalVars; // Keep track of dead globals
for (Module::giterator I = M.gbegin(), E = M.gend(); I != E; ++I)
for (Module::global_iterator I = M.global_begin(), E = M.global_end(); I != E; ++I)
if (!AliveGlobals.count(I)) {
DeadGlobalVars.push_back(I); // Keep track of dead globals
I->setInitializer(0);