aboutsummaryrefslogtreecommitdiff
path: root/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-15 04:54:21 +0000
committerChris Lattner <sabre@nondot.org>2005-03-15 04:54:21 +0000
commite4d5c441e04bdc00ccf1804744af670655123b07 (patch)
treebe1bff1314e39651d7120d2d887b79b10dc2f24d /lib/Linker/LinkModules.cpp
parent89cc2656ba070434dceeabe95cba0a95b988325b (diff)
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
Diffstat (limited to 'lib/Linker/LinkModules.cpp')
-rw-r--r--lib/Linker/LinkModules.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index 0d65ddd1dd..627a38cd0f 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -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())