[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp Constants.cpp Dominators.cpp Function.cpp Module.cpp ModuleProvider.cpp Pass.cpp SlotCalculator.cpp SymbolTable.cpp Value.cpp Verifier.cpp iMemory.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Nov 21 14:24:01 PST 2003


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.112 -> 1.113
Constants.cpp updated: 1.63 -> 1.64
Dominators.cpp updated: 1.51 -> 1.52
Function.cpp updated: 1.56 -> 1.57
Module.cpp updated: 1.44 -> 1.45
ModuleProvider.cpp updated: 1.7 -> 1.8
Pass.cpp updated: 1.53 -> 1.54
SlotCalculator.cpp updated: 1.38 -> 1.39
SymbolTable.cpp updated: 1.40 -> 1.41
Value.cpp updated: 1.40 -> 1.41
Verifier.cpp updated: 1.71 -> 1.72
iMemory.cpp updated: 1.33 -> 1.34

---
Log message:

Finegrainify namespacification


---
Diffs of the changes:  (+150 -166)

Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.112 llvm/lib/VMCore/AsmWriter.cpp:1.113
--- llvm/lib/VMCore/AsmWriter.cpp:1.112	Wed Nov 19 18:09:43 2003
+++ llvm/lib/VMCore/AsmWriter.cpp	Fri Nov 21 14:23:48 2003
@@ -32,8 +32,7 @@
 #include "Support/StringExtras.h"
 #include "Support/STLExtras.h"
 #include <algorithm>
-
-namespace llvm {
+using namespace llvm;
 
 static RegisterPass<PrintModulePass>
 X("printm", "Print module to stderr",PassInfo::Analysis|PassInfo::Optimization);
@@ -233,8 +232,8 @@
 // type, iff there is an entry in the modules symbol table for the specified
 // type or one of it's component types.  This is slower than a simple x << Type;
 //
-std::ostream &WriteTypeSymbolic(std::ostream &Out, const Type *Ty,
-                                const Module *M) {
+std::ostream &llvm::WriteTypeSymbolic(std::ostream &Out, const Type *Ty,
+                                      const Module *M) {
   Out << " "; 
 
   // If they want us to print out a type, attempt to make it symbolic if there
@@ -447,7 +446,8 @@
 // ostream.  This can be useful when you just want to print int %reg126, not the
 // whole instruction that generated it.
 //
-std::ostream &WriteAsOperand(std::ostream &Out, const Value *V, bool PrintType, 
+std::ostream &llvm::WriteAsOperand(std::ostream &Out, const Value *V,
+                                   bool PrintType, 
                              bool PrintName, const Module *Context) {
   std::map<const Type *, std::string> TypeNames;
   if (Context == 0) Context = getModuleFromVal(V);
@@ -465,7 +465,7 @@
   return Out;
 }
 
-
+namespace llvm {
 
 class AssemblyWriter {
   std::ostream &Out;
@@ -520,7 +520,7 @@
   // which slot it occupies.
   void printInfoComment(const Value &V);
 };
-
+}  // end of anonymous namespace
 
 // printTypeAtLeastOneLevel - Print out one level of the possibly complex type
 // without considering any symbolic types that we may have equal to it.
@@ -1063,5 +1063,3 @@
   }
   return *this;
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.63 llvm/lib/VMCore/Constants.cpp:1.64
--- llvm/lib/VMCore/Constants.cpp:1.63	Mon Nov 17 13:47:21 2003
+++ llvm/lib/VMCore/Constants.cpp	Fri Nov 21 14:23:48 2003
@@ -19,8 +19,7 @@
 #include "llvm/Module.h"
 #include "Support/StringExtras.h"
 #include <algorithm>
-
-namespace llvm {
+using namespace llvm;
 
 ConstantBool *ConstantBool::True  = new ConstantBool(true);
 ConstantBool *ConstantBool::False = new ConstantBool(false);
@@ -540,20 +539,22 @@
 // something strange that needs to be done to interface to the ctor for the
 // constant.
 //
-template<class ConstantClass, class TypeClass, class ValType>
-struct ConstantCreator {
-  static ConstantClass *create(const TypeClass *Ty, const ValType &V) {
-    return new ConstantClass(Ty, V);
-  }
-};
-
-template<class ConstantClass, class TypeClass>
-struct ConvertConstantType {
-  static void convert(ConstantClass *OldC, const TypeClass *NewTy) {
-    assert(0 && "This type cannot be converted!\n");
-    abort();
-  }
-};
+namespace llvm {
+  template<class ConstantClass, class TypeClass, class ValType>
+  struct ConstantCreator {
+    static ConstantClass *create(const TypeClass *Ty, const ValType &V) {
+      return new ConstantClass(Ty, V);
+    }
+  };
+  
+  template<class ConstantClass, class TypeClass>
+  struct ConvertConstantType {
+    static void convert(ConstantClass *OldC, const TypeClass *NewTy) {
+      assert(0 && "This type cannot be converted!\n");
+      abort();
+    }
+  };
+}
 
 namespace {
   template<class ValType, class TypeClass, class ConstantClass>
@@ -712,21 +713,21 @@
 
 //---- ConstantArray::get() implementation...
 //
-
-template<>
-struct ConvertConstantType<ConstantArray, ArrayType> {
-  static void convert(ConstantArray *OldC, const ArrayType *NewTy) {
-    // Make everyone now use a constant of the new type...
-    std::vector<Constant*> C;
-    for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i)
-      C.push_back(cast<Constant>(OldC->getOperand(i)));
-    Constant *New = ConstantArray::get(NewTy, C);
-    assert(New != OldC && "Didn't replace constant??");
-    OldC->uncheckedReplaceAllUsesWith(New);
-    OldC->destroyConstant();    // This constant is now dead, destroy it.
-  }
-};
-
+namespace llvm {
+  template<>
+  struct ConvertConstantType<ConstantArray, ArrayType> {
+    static void convert(ConstantArray *OldC, const ArrayType *NewTy) {
+      // Make everyone now use a constant of the new type...
+      std::vector<Constant*> C;
+      for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i)
+        C.push_back(cast<Constant>(OldC->getOperand(i)));
+      Constant *New = ConstantArray::get(NewTy, C);
+      assert(New != OldC && "Didn't replace constant??");
+      OldC->uncheckedReplaceAllUsesWith(New);
+      OldC->destroyConstant();    // This constant is now dead, destroy it.
+    }
+  };
+}
 
 static ValueMap<std::vector<Constant*>, ArrayType,
                 ConstantArray> ArrayConstants;
@@ -778,20 +779,22 @@
 //---- ConstantStruct::get() implementation...
 //
 
-template<>
-struct ConvertConstantType<ConstantStruct, StructType> {
-  static void convert(ConstantStruct *OldC, const StructType *NewTy) {
-    // Make everyone now use a constant of the new type...
-    std::vector<Constant*> C;
-    for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i)
-      C.push_back(cast<Constant>(OldC->getOperand(i)));
-    Constant *New = ConstantStruct::get(NewTy, C);
-    assert(New != OldC && "Didn't replace constant??");
-
-    OldC->uncheckedReplaceAllUsesWith(New);
-    OldC->destroyConstant();    // This constant is now dead, destroy it.
-  }
-};
+namespace llvm {
+  template<>
+  struct ConvertConstantType<ConstantStruct, StructType> {
+    static void convert(ConstantStruct *OldC, const StructType *NewTy) {
+      // Make everyone now use a constant of the new type...
+      std::vector<Constant*> C;
+      for (unsigned i = 0, e = OldC->getNumOperands(); i != e; ++i)
+        C.push_back(cast<Constant>(OldC->getOperand(i)));
+      Constant *New = ConstantStruct::get(NewTy, C);
+      assert(New != OldC && "Didn't replace constant??");
+      
+      OldC->uncheckedReplaceAllUsesWith(New);
+      OldC->destroyConstant();    // This constant is now dead, destroy it.
+    }
+  };
+}
 
 static ValueMap<std::vector<Constant*>, StructType, 
                 ConstantStruct> StructConstants;
@@ -811,24 +814,26 @@
 //---- ConstantPointerNull::get() implementation...
 //
 
-// ConstantPointerNull does not take extra "value" argument...
-template<class ValType>
-struct ConstantCreator<ConstantPointerNull, PointerType, ValType> {
-  static ConstantPointerNull *create(const PointerType *Ty, const ValType &V){
-    return new ConstantPointerNull(Ty);
-  }
-};
+namespace llvm {
+  // ConstantPointerNull does not take extra "value" argument...
+  template<class ValType>
+  struct ConstantCreator<ConstantPointerNull, PointerType, ValType> {
+    static ConstantPointerNull *create(const PointerType *Ty, const ValType &V){
+      return new ConstantPointerNull(Ty);
+    }
+  };
 
-template<>
-struct ConvertConstantType<ConstantPointerNull, PointerType> {
-  static void convert(ConstantPointerNull *OldC, const PointerType *NewTy) {
-    // Make everyone now use a constant of the new type...
-    Constant *New = ConstantPointerNull::get(NewTy);
-    assert(New != OldC && "Didn't replace constant??");
-    OldC->uncheckedReplaceAllUsesWith(New);
-    OldC->destroyConstant();     // This constant is now dead, destroy it.
-  }
-};
+  template<>
+  struct ConvertConstantType<ConstantPointerNull, PointerType> {
+    static void convert(ConstantPointerNull *OldC, const PointerType *NewTy) {
+      // Make everyone now use a constant of the new type...
+      Constant *New = ConstantPointerNull::get(NewTy);
+      assert(New != OldC && "Didn't replace constant??");
+      OldC->uncheckedReplaceAllUsesWith(New);
+      OldC->destroyConstant();     // This constant is now dead, destroy it.
+    }
+  };
+}
 
 static ValueMap<char, PointerType, ConstantPointerNull> NullPtrConstants;
 
@@ -865,56 +870,58 @@
 //
 typedef std::pair<unsigned, std::vector<Constant*> > ExprMapKeyType;
 
-template<>
-struct ConstantCreator<ConstantExpr, Type, ExprMapKeyType> {
-  static ConstantExpr *create(const Type *Ty, const ExprMapKeyType &V) {
-    if (V.first == Instruction::Cast)
-      return new ConstantExpr(Instruction::Cast, V.second[0], Ty);
-    if ((V.first >= Instruction::BinaryOpsBegin &&
-         V.first < Instruction::BinaryOpsEnd) ||
-        V.first == Instruction::Shl || V.first == Instruction::Shr)
-      return new ConstantExpr(V.first, V.second[0], V.second[1]);
-    
-    assert(V.first == Instruction::GetElementPtr && "Invalid ConstantExpr!");
-    
-    std::vector<Constant*> IdxList(V.second.begin()+1, V.second.end());
-    return new ConstantExpr(V.second[0], IdxList, Ty);
-  }
-};
+namespace llvm {
+  template<>
+  struct ConstantCreator<ConstantExpr, Type, ExprMapKeyType> {
+    static ConstantExpr *create(const Type *Ty, const ExprMapKeyType &V) {
+      if (V.first == Instruction::Cast)
+        return new ConstantExpr(Instruction::Cast, V.second[0], Ty);
+      if ((V.first >= Instruction::BinaryOpsBegin &&
+           V.first < Instruction::BinaryOpsEnd) ||
+          V.first == Instruction::Shl || V.first == Instruction::Shr)
+        return new ConstantExpr(V.first, V.second[0], V.second[1]);
+      
+      assert(V.first == Instruction::GetElementPtr && "Invalid ConstantExpr!");
+      
+      std::vector<Constant*> IdxList(V.second.begin()+1, V.second.end());
+      return new ConstantExpr(V.second[0], IdxList, Ty);
+    }
+  };
 
-template<>
-struct ConvertConstantType<ConstantExpr, Type> {
-  static void convert(ConstantExpr *OldC, const Type *NewTy) {
-    Constant *New;
-    switch (OldC->getOpcode()) {
-    case Instruction::Cast:
-      New = ConstantExpr::getCast(OldC->getOperand(0), NewTy);
-      break;
-    case Instruction::Shl:
-    case Instruction::Shr:
-      New = ConstantExpr::getShiftTy(NewTy, OldC->getOpcode(),
+  template<>
+  struct ConvertConstantType<ConstantExpr, Type> {
+    static void convert(ConstantExpr *OldC, const Type *NewTy) {
+      Constant *New;
+      switch (OldC->getOpcode()) {
+      case Instruction::Cast:
+        New = ConstantExpr::getCast(OldC->getOperand(0), NewTy);
+        break;
+      case Instruction::Shl:
+      case Instruction::Shr:
+        New = ConstantExpr::getShiftTy(NewTy, OldC->getOpcode(),
                                      OldC->getOperand(0), OldC->getOperand(1));
-      break;
-    default:
-      assert(OldC->getOpcode() >= Instruction::BinaryOpsBegin &&
-             OldC->getOpcode() < Instruction::BinaryOpsEnd);
-      New = ConstantExpr::getTy(NewTy, OldC->getOpcode(), OldC->getOperand(0),
-                                OldC->getOperand(1));
-      break;
-    case Instruction::GetElementPtr:
-      // Make everyone now use a constant of the new type... 
-      std::vector<Constant*> C;
-      for (unsigned i = 1, e = OldC->getNumOperands(); i != e; ++i)
-        C.push_back(cast<Constant>(OldC->getOperand(i)));
-      New = ConstantExpr::getGetElementPtrTy(NewTy, OldC->getOperand(0), C);
-      break;
+        break;
+      default:
+        assert(OldC->getOpcode() >= Instruction::BinaryOpsBegin &&
+               OldC->getOpcode() < Instruction::BinaryOpsEnd);
+        New = ConstantExpr::getTy(NewTy, OldC->getOpcode(), OldC->getOperand(0),
+                                  OldC->getOperand(1));
+        break;
+      case Instruction::GetElementPtr:
+        // Make everyone now use a constant of the new type... 
+        std::vector<Constant*> C;
+        for (unsigned i = 1, e = OldC->getNumOperands(); i != e; ++i)
+          C.push_back(cast<Constant>(OldC->getOperand(i)));
+        New = ConstantExpr::getGetElementPtrTy(NewTy, OldC->getOperand(0), C);
+        break;
+      }
+      
+      assert(New != OldC && "Didn't replace constant??");
+      OldC->uncheckedReplaceAllUsesWith(New);
+      OldC->destroyConstant();    // This constant is now dead, destroy it.
     }
-
-    assert(New != OldC && "Didn't replace constant??");
-    OldC->uncheckedReplaceAllUsesWith(New);
-    OldC->destroyConstant();    // This constant is now dead, destroy it.
-  }
-};
+  };
+} // end namespace llvm
 
 
 static ValueMap<ExprMapKeyType, Type, ConstantExpr> ExprConstants;
@@ -1039,4 +1046,3 @@
   }
 }
 
-} // End llvm namespace


Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.51 llvm/lib/VMCore/Dominators.cpp:1.52
--- llvm/lib/VMCore/Dominators.cpp:1.51	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/Dominators.cpp	Fri Nov 21 14:23:48 2003
@@ -19,8 +19,7 @@
 #include "llvm/Assembly/Writer.h"
 #include "Support/DepthFirstIterator.h"
 #include "Support/SetOperations.h"
-
-namespace llvm {
+using namespace llvm;
 
 //===----------------------------------------------------------------------===//
 //  DominatorSet Implementation
@@ -120,7 +119,7 @@
   for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I) Doms[I];
 }
 
-
+namespace llvm {
 static std::ostream &operator<<(std::ostream &o,
                                 const std::set<BasicBlock*> &BBs) {
   for (std::set<BasicBlock*>::const_iterator I = BBs.begin(), E = BBs.end();
@@ -131,6 +130,7 @@
       o << " <<exit node>>";
   return o;
 }
+}
 
 void DominatorSetBase::print(std::ostream &o) const {
   for (const_iterator I = begin(), E = end(); I != E; ++I) {
@@ -361,4 +361,3 @@
   }
 }
 
-} // End llvm namespace


Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.56 llvm/lib/VMCore/Function.cpp:1.57
--- llvm/lib/VMCore/Function.cpp:1.56	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/Function.cpp	Fri Nov 21 14:23:48 2003
@@ -18,8 +18,7 @@
 #include "llvm/Intrinsics.h"
 #include "Support/LeakDetector.h"
 #include "SymbolTableListTraitsImpl.h"
-
-namespace llvm {
+using namespace llvm;
 
 BasicBlock *ilist_traits<BasicBlock>::createNode() {
   BasicBlock *Ret = new BasicBlock();
@@ -259,5 +258,3 @@
   Value::setName(name);
   if (P && getName() != "") P->getSymbolTable().insert(this);
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/Module.cpp
diff -u llvm/lib/VMCore/Module.cpp:1.44 llvm/lib/VMCore/Module.cpp:1.45
--- llvm/lib/VMCore/Module.cpp:1.44	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/Module.cpp	Fri Nov 21 14:23:48 2003
@@ -21,8 +21,7 @@
 #include <algorithm>
 #include <cstdarg>
 #include <map>
-
-namespace llvm {
+using namespace llvm;
 
 Function *ilist_traits<Function>::createNode() {
   FunctionType *FTy =
@@ -55,11 +54,13 @@
 // Define the GlobalValueRefMap as a struct that wraps a map so that we don't
 // have Module.h depend on <map>
 //
-struct GlobalValueRefMap {
-  typedef std::map<GlobalValue*, ConstantPointerRef*> MapTy;
-  typedef MapTy::iterator iterator;
-  std::map<GlobalValue*, ConstantPointerRef*> Map;
-};
+namespace llvm {
+  struct GlobalValueRefMap {
+    typedef std::map<GlobalValue*, ConstantPointerRef*> MapTy;
+    typedef MapTy::iterator iterator;
+    std::map<GlobalValue*, ConstantPointerRef*> Map;
+  };
+}
 
 
 Module::Module(const std::string &MID)
@@ -310,4 +311,3 @@
   }
 }
 
-} // End llvm namespace


Index: llvm/lib/VMCore/ModuleProvider.cpp
diff -u llvm/lib/VMCore/ModuleProvider.cpp:1.7 llvm/lib/VMCore/ModuleProvider.cpp:1.8
--- llvm/lib/VMCore/ModuleProvider.cpp:1.7	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/ModuleProvider.cpp	Fri Nov 21 14:23:48 2003
@@ -13,8 +13,7 @@
 
 #include "llvm/ModuleProvider.h"
 #include "llvm/Module.h"
-
-namespace llvm {
+using namespace llvm;
 
 /// ctor - always have a valid Module
 ///
@@ -37,5 +36,3 @@
 
   return TheModule;
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/Pass.cpp
diff -u llvm/lib/VMCore/Pass.cpp:1.53 llvm/lib/VMCore/Pass.cpp:1.54
--- llvm/lib/VMCore/Pass.cpp:1.53	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/Pass.cpp	Fri Nov 21 14:23:48 2003
@@ -20,8 +20,7 @@
 #include "Support/STLExtras.h"
 #include "Support/TypeInfo.h"
 #include <set>
-
-namespace llvm {
+using namespace llvm;
 
 // IncludeFile - Stub function used to help linking out.
 IncludeFile::IncludeFile(void*) {}
@@ -469,5 +468,3 @@
            E = PassInfoMap->end(); I != E; ++I)
       passEnumerate(I->second);
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/SlotCalculator.cpp
diff -u llvm/lib/VMCore/SlotCalculator.cpp:1.38 llvm/lib/VMCore/SlotCalculator.cpp:1.39
--- llvm/lib/VMCore/SlotCalculator.cpp:1.38	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/SlotCalculator.cpp	Fri Nov 21 14:23:48 2003
@@ -26,8 +26,7 @@
 #include "Support/PostOrderIterator.h"
 #include "Support/STLExtras.h"
 #include <algorithm>
-
-namespace llvm {
+using namespace llvm;
 
 #if 0
 #define SC_DEBUG(X) std::cerr << X
@@ -363,5 +362,3 @@
   SC_DEBUG("]\n");
   return (int)DestSlot;
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/SymbolTable.cpp
diff -u llvm/lib/VMCore/SymbolTable.cpp:1.40 llvm/lib/VMCore/SymbolTable.cpp:1.41
--- llvm/lib/VMCore/SymbolTable.cpp:1.40	Tue Nov 18 19:02:52 2003
+++ llvm/lib/VMCore/SymbolTable.cpp	Fri Nov 21 14:23:48 2003
@@ -16,8 +16,7 @@
 #include "llvm/Module.h"
 #include "Support/StringExtras.h"
 #include <algorithm>
-
-namespace llvm {
+using namespace llvm;
 
 #define DEBUG_SYMBOL_TABLE 0
 #define DEBUG_ABSTYPE 0
@@ -363,5 +362,3 @@
   std::cout << "Symbol table dump:\n";
   for_each(begin(), end(), DumpPlane);
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/Value.cpp
diff -u llvm/lib/VMCore/Value.cpp:1.40 llvm/lib/VMCore/Value.cpp:1.41
--- llvm/lib/VMCore/Value.cpp:1.40	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/Value.cpp	Fri Nov 21 14:23:48 2003
@@ -17,8 +17,7 @@
 #include "llvm/Constant.h"
 #include "Support/LeakDetector.h"
 #include <algorithm>
-
-namespace llvm {
+using namespace llvm;
 
 //===----------------------------------------------------------------------===//
 //                                Value Class
@@ -109,5 +108,3 @@
       setOperand(i, To); // Fix it now...
     }
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.71 llvm/lib/VMCore/Verifier.cpp:1.72
--- llvm/lib/VMCore/Verifier.cpp:1.71	Fri Nov 21 11:35:51 2003
+++ llvm/lib/VMCore/Verifier.cpp	Fri Nov 21 14:23:48 2003
@@ -57,8 +57,7 @@
 #include "llvm/Support/InstVisitor.h"
 #include "Support/STLExtras.h"
 #include <algorithm>
-
-namespace llvm {
+using namespace llvm;
 
 namespace {  // Anonymous namespace for class
 
@@ -158,9 +157,11 @@
 
     void WriteValue(const Value *V) {
       if (!V) return;
-      if (isa<Instruction>(V))
+      if (isa<Instruction>(V)) {
         std::cerr << *V;
-      else {
+      } else if (const Type *Ty = dyn_cast<Type>(V)) {
+        WriteTypeSymbolic(std::cerr, Ty, Mod);
+      } else {
         WriteAsOperand (std::cerr, V, true, true, Mod);
         std::cerr << "\n";
       }
@@ -184,6 +185,8 @@
   };
 
   RegisterOpt<Verifier> X("verify", "Module Verifier");
+} // End anonymous namespace
+
 
 // Assert - We know that cond should be true, if not print an error message.
 #define Assert(C, M) \
@@ -569,19 +572,18 @@
           "Illegal # arguments for intrinsic function!", IF);
 }
 
-} // End anonymous namespace
 
 //===----------------------------------------------------------------------===//
 //  Implement the public interfaces to this file...
 //===----------------------------------------------------------------------===//
 
-FunctionPass *createVerifierPass() {
+FunctionPass *llvm::createVerifierPass() {
   return new Verifier();
 }
 
 
 // verifyFunction - Create 
-bool verifyFunction(const Function &f) {
+bool llvm::verifyFunction(const Function &f) {
   Function &F = (Function&)f;
   assert(!F.isExternal() && "Cannot verify external functions");
 
@@ -600,12 +602,10 @@
 // verifyModule - Check a module for errors, printing messages on stderr.
 // Return true if the module is corrupt.
 //
-bool verifyModule(const Module &M) {
+bool llvm::verifyModule(const Module &M) {
   PassManager PM;
   Verifier *V = new Verifier();
   PM.add(V);
   PM.run((Module&)M);
   return V->Broken;
 }
-
-} // End llvm namespace


Index: llvm/lib/VMCore/iMemory.cpp
diff -u llvm/lib/VMCore/iMemory.cpp:1.33 llvm/lib/VMCore/iMemory.cpp:1.34
--- llvm/lib/VMCore/iMemory.cpp:1.33	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/iMemory.cpp	Fri Nov 21 14:23:48 2003
@@ -14,7 +14,6 @@
 #include "llvm/iMemory.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
-
 using namespace llvm;
 
 AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, 





More information about the llvm-commits mailing list