rename variables and functions to match renamed DAG nodes. Bonus feature:
[oota-llvm.git] / lib / VMCore / Module.cpp
index a935bf64b0e46071fb3a9593e36b9aed8c85d6b1..a554d8e092444e043bc802eebd9fa305c9743037 100644 (file)
@@ -1,10 +1,10 @@
 //===-- Module.cpp - Implement the Module class ---------------------------===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the Module class for the VMCore library.
@@ -28,7 +28,7 @@ using namespace llvm;
 // Methods to implement the globals and functions lists.
 //
 
-Function *ilist_traits<Function>::createSentinal() {
+Function *ilist_traits<Function>::createSentinel() {
   FunctionType *FTy =
     FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false);
   Function *Ret = new Function(FTy, GlobalValue::ExternalLinkage);
@@ -36,7 +36,7 @@ Function *ilist_traits<Function>::createSentinal() {
   LeakDetector::removeGarbageObject(Ret);
   return Ret;
 }
-GlobalVariable *ilist_traits<GlobalVariable>::createSentinal() {
+GlobalVariable *ilist_traits<GlobalVariable>::createSentinel() {
   GlobalVariable *Ret = new GlobalVariable(Type::IntTy, false,
                                            GlobalValue::ExternalLinkage);
   // This should not be garbage monitored.
@@ -174,7 +174,7 @@ Function *Module::getMainFunction() {
     if (Function *F = getFunction("main", FunctionType::get(Type::IntTy,
                                                             Params, false)))
       return F;
-    
+
     // void main(int argc, char **argv)...
     if (Function *F = getFunction("main", FunctionType::get(Type::VoidTy,
                                                             Params, false)))
@@ -212,7 +212,7 @@ Function *Module::getNamedFunction(const std::string &Name) {
 /// have the top-level PointerType, which represents the address of the
 /// global.
 ///
-GlobalVariable *Module::getGlobalVariable(const std::string &Name, 
+GlobalVariable *Module::getGlobalVariable(const std::string &Name,
                                           const Type *Ty) {
   if (Value *V = getSymbolTable().lookup(PointerType::get(Ty), Name)) {
     GlobalVariable *Result = cast<GlobalVariable>(V);
@@ -237,7 +237,7 @@ bool Module::addTypeName(const std::string &Name, const Type *Ty) {
   SymbolTable &ST = getSymbolTable();
 
   if (ST.lookupType(Name)) return true;  // Already in symtab...
-  
+
   // Not in symbol table?  Set the name with the Symtab as an argument so the
   // type knows what to update...
   ST.insert(Name, Ty);
@@ -286,7 +286,7 @@ void Module::dropAllReferences() {
   for(Module::iterator I = begin(), E = end(); I != E; ++I)
     I->dropAllReferences();
 
-  for(Module::giterator I = gbegin(), E = gend(); I != E; ++I)
+  for(Module::global_iterator I = global_begin(), E = global_end(); I != E; ++I)
     I->dropAllReferences();
 }