mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user