mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +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:
@@ -425,7 +425,7 @@ static bool LinkGlobals(Module *Dest, Module *Src,
|
||||
SymbolTable *ST = (SymbolTable*)&Dest->getSymbolTable();
|
||||
|
||||
// Loop over all of the globals in the src module, mapping them over as we go
|
||||
for (Module::giterator I = Src->gbegin(), E = Src->gend(); I != E; ++I) {
|
||||
for (Module::global_iterator I = Src->global_begin(), E = Src->global_end(); I != E; ++I) {
|
||||
GlobalVariable *SGV = I;
|
||||
GlobalVariable *DGV = 0;
|
||||
// Check to see if may have to link the global.
|
||||
@@ -533,7 +533,7 @@ static bool LinkGlobalInits(Module *Dest, const Module *Src,
|
||||
std::string *Err) {
|
||||
|
||||
// Loop over all of the globals in the src module, mapping them over as we go
|
||||
for (Module::const_giterator I = Src->gbegin(), E = Src->gend(); I != E; ++I){
|
||||
for (Module::const_global_iterator I = Src->global_begin(), E = Src->global_end(); I != E; ++I){
|
||||
const GlobalVariable *SGV = I;
|
||||
|
||||
if (SGV->hasInitializer()) { // Only process initialized GV's
|
||||
@@ -656,8 +656,8 @@ static bool LinkFunctionBody(Function *Dest, Function *Src,
|
||||
assert(Src && Dest && Dest->isExternal() && !Src->isExternal());
|
||||
|
||||
// Go through and convert function arguments over, remembering the mapping.
|
||||
Function::aiterator DI = Dest->abegin();
|
||||
for (Function::aiterator I = Src->abegin(), E = Src->aend();
|
||||
Function::arg_iterator DI = Dest->arg_begin();
|
||||
for (Function::arg_iterator I = Src->arg_begin(), E = Src->arg_end();
|
||||
I != E; ++I, ++DI) {
|
||||
DI->setName(I->getName()); // Copy the name information over...
|
||||
|
||||
@@ -681,7 +681,7 @@ static bool LinkFunctionBody(Function *Dest, Function *Src,
|
||||
*OI = RemapOperand(*OI, GlobalMap);
|
||||
|
||||
// There is no need to map the arguments anymore.
|
||||
for (Function::aiterator I = Src->abegin(), E = Src->aend(); I != E; ++I)
|
||||
for (Function::arg_iterator I = Src->arg_begin(), E = Src->arg_end(); I != E; ++I)
|
||||
GlobalMap.erase(I);
|
||||
|
||||
return false;
|
||||
@@ -854,7 +854,7 @@ Linker::LinkModules(Module *Dest, Module *Src, std::string *ErrorMsg) {
|
||||
// it's functionality here.
|
||||
std::map<std::string, GlobalValue*> GlobalsByName;
|
||||
|
||||
for (Module::giterator I = Dest->gbegin(), E = Dest->gend(); I != E; ++I) {
|
||||
for (Module::global_iterator I = Dest->global_begin(), E = Dest->global_end(); I != E; ++I) {
|
||||
// Add all of the appending globals already in the Dest module to
|
||||
// AppendingVars.
|
||||
if (I->hasAppendingLinkage())
|
||||
|
Reference in New Issue
Block a user