[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp BasicBlock.cpp ConstantHandling.cpp Constants.cpp Dominators.cpp Function.cpp InstrTypes.cpp Instruction.cpp Module.cpp ModuleProvider.cpp Pass.cpp PassManagerT.h SlotCalculator.cpp SymbolTable.cpp SymbolTableListTraitsImpl.h Type.cpp Value.cpp Verifier.cpp iBranch.cpp iCall.cpp iMemory.cpp iOperators.cpp iSwitch.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Tue Nov 11 16:42:50 PST 2003


Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.107 -> 1.108
BasicBlock.cpp updated: 1.35 -> 1.36
ConstantHandling.cpp updated: 1.36 -> 1.37
Constants.cpp updated: 1.61 -> 1.62
Dominators.cpp updated: 1.50 -> 1.51
Function.cpp updated: 1.55 -> 1.56
InstrTypes.cpp updated: 1.22 -> 1.23
Instruction.cpp updated: 1.30 -> 1.31
Module.cpp updated: 1.43 -> 1.44
ModuleProvider.cpp updated: 1.6 -> 1.7
Pass.cpp updated: 1.52 -> 1.53
PassManagerT.h updated: 1.45 -> 1.46
SlotCalculator.cpp updated: 1.37 -> 1.38
SymbolTable.cpp updated: 1.38 -> 1.39
SymbolTableListTraitsImpl.h updated: 1.5 -> 1.6
Type.cpp updated: 1.79 -> 1.80
Value.cpp updated: 1.39 -> 1.40
Verifier.cpp updated: 1.65 -> 1.66
iBranch.cpp updated: 1.9 -> 1.10
iCall.cpp updated: 1.20 -> 1.21
iMemory.cpp updated: 1.32 -> 1.33
iOperators.cpp updated: 1.23 -> 1.24
iSwitch.cpp updated: 1.9 -> 1.10

---
Log message:

Put all LLVM code into the llvm namespace, as per bug 109.

---
Diffs of the changes:  (+144 -51)

Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.107 llvm/lib/VMCore/AsmWriter.cpp:1.108
--- llvm/lib/VMCore/AsmWriter.cpp:1.107	Sun Nov  9 09:51:07 2003
+++ llvm/lib/VMCore/AsmWriter.cpp	Tue Nov 11 16:41:34 2003
@@ -33,6 +33,8 @@
 #include "Support/STLExtras.h"
 #include <algorithm>
 
+namespace llvm {
+
 static RegisterPass<PrintModulePass>
 X("printm", "Print module to stderr",PassInfo::Analysis|PassInfo::Optimization);
 static RegisterPass<PrintFunctionPass>
@@ -1052,3 +1054,5 @@
   }
   return *this;
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/BasicBlock.cpp
diff -u llvm/lib/VMCore/BasicBlock.cpp:1.35 llvm/lib/VMCore/BasicBlock.cpp:1.36
--- llvm/lib/VMCore/BasicBlock.cpp:1.35	Tue Nov  4 23:15:42 2003
+++ llvm/lib/VMCore/BasicBlock.cpp	Tue Nov 11 16:41:34 2003
@@ -22,6 +22,8 @@
 #include "SymbolTableListTraitsImpl.h"
 #include <algorithm>
 
+namespace llvm {
+
 // DummyInst - An instance of this class is used to mark the end of the
 // instruction list.  This is not a real instruction.
 //
@@ -141,7 +143,7 @@
 //
 bool BasicBlock::hasConstantReferences() const {
   for (use_const_iterator I = use_begin(), E = use_end(); I != E; ++I)
-    if (::isa<Constant>((Value*)*I))
+    if (isa<Constant>((Value*)*I))
       return true;
 
   return false;
@@ -263,3 +265,5 @@
   }
   return New;
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/ConstantHandling.cpp
diff -u llvm/lib/VMCore/ConstantHandling.cpp:1.36 llvm/lib/VMCore/ConstantHandling.cpp:1.37
--- llvm/lib/VMCore/ConstantHandling.cpp:1.36	Mon Oct 20 14:43:20 2003
+++ llvm/lib/VMCore/ConstantHandling.cpp	Tue Nov 11 16:41:34 2003
@@ -17,6 +17,8 @@
 #include "llvm/DerivedTypes.h"
 #include <cmath>
 
+namespace llvm {
+
 AnnotationID ConstRules::AID(AnnotationManager::getID("opt::ConstRules",
 						      &ConstRules::find));
 
@@ -638,3 +640,5 @@
   static EmptyRules CERules;
   return &CERules;
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.61 llvm/lib/VMCore/Constants.cpp:1.62
--- llvm/lib/VMCore/Constants.cpp:1.61	Wed Nov  5 13:52:52 2003
+++ llvm/lib/VMCore/Constants.cpp	Tue Nov 11 16:41:34 2003
@@ -20,6 +20,8 @@
 #include "Support/StringExtras.h"
 #include <algorithm>
 
+namespace llvm {
+
 ConstantBool *ConstantBool::True  = new ConstantBool(true);
 ConstantBool *ConstantBool::False = new ConstantBool(false);
 
@@ -1029,3 +1031,5 @@
     return NumReplaced;
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.50 llvm/lib/VMCore/Dominators.cpp:1.51
--- llvm/lib/VMCore/Dominators.cpp:1.50	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/Dominators.cpp	Tue Nov 11 16:41:34 2003
@@ -20,6 +20,8 @@
 #include "Support/DepthFirstIterator.h"
 #include "Support/SetOperations.h"
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 //  DominatorSet Implementation
 //===----------------------------------------------------------------------===//
@@ -358,3 +360,5 @@
     o << " is:\t" << I->second << "\n";
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.55 llvm/lib/VMCore/Function.cpp:1.56
--- llvm/lib/VMCore/Function.cpp:1.55	Tue Nov  4 23:15:42 2003
+++ llvm/lib/VMCore/Function.cpp	Tue Nov 11 16:41:34 2003
@@ -19,6 +19,8 @@
 #include "Support/LeakDetector.h"
 #include "SymbolTableListTraitsImpl.h"
 
+namespace llvm {
+
 BasicBlock *ilist_traits<BasicBlock>::createNode() {
   BasicBlock *Ret = new BasicBlock();
   // This should not be garbage monitored.
@@ -158,7 +160,7 @@
 }
 
 /// getIntrinsicID - This method returns the ID number of the specified
-/// function, or LLVMIntrinsic::not_intrinsic if the function is not an
+/// function, or Intrinsic::not_intrinsic if the function is not an
 /// intrinsic, or if the pointer is null.  This value is always defined to be
 /// zero to allow easy checking for whether a function is intrinsic or not.  The
 /// particular intrinsic functions which correspond to this value are defined in
@@ -176,21 +178,21 @@
    std::string name;  // The name of the intrinsic 
    unsigned id;       // Its ID number
   } alpha_intrinsics[] = {
-     { "llvm.alpha.ctlz",      LLVMIntrinsic::alpha_ctlz },
-     { "llvm.alpha.cttz",      LLVMIntrinsic::alpha_cttz },
-     { "llvm.alpha.ctpop",     LLVMIntrinsic::alpha_ctpop },
-     { "llvm.alpha.umulh",     LLVMIntrinsic::alpha_umulh },
-     { "llvm.alpha.vecop",     LLVMIntrinsic::alpha_vecop },
-     { "llvm.alpha.pup",       LLVMIntrinsic::alpha_pup },
-     { "llvm.alpha.bytezap",   LLVMIntrinsic::alpha_bytezap },
-     { "llvm.alpha.bytemanip", LLVMIntrinsic::alpha_bytemanip },
-     { "llvm.alpha.dfp_bop",   LLVMIntrinsic::alpha_dfpbop }, 
-     { "llvm.alpha.dfp_uop",   LLVMIntrinsic::alpha_dfpuop },
-     { "llvm.alpha.unordered", LLVMIntrinsic::alpha_unordered },
-     { "llvm.alpha.uqtodfp",   LLVMIntrinsic::alpha_uqtodfp },
-     { "llvm.alpha.uqtosfp",   LLVMIntrinsic::alpha_uqtosfp },
-     { "llvm.alpha.dfptosq",   LLVMIntrinsic::alpha_dfptosq },
-     { "llvm.alpha.sfptosq",   LLVMIntrinsic::alpha_sfptosq },
+     { "llvm.alpha.ctlz",      Intrinsic::alpha_ctlz },
+     { "llvm.alpha.cttz",      Intrinsic::alpha_cttz },
+     { "llvm.alpha.ctpop",     Intrinsic::alpha_ctpop },
+     { "llvm.alpha.umulh",     Intrinsic::alpha_umulh },
+     { "llvm.alpha.vecop",     Intrinsic::alpha_vecop },
+     { "llvm.alpha.pup",       Intrinsic::alpha_pup },
+     { "llvm.alpha.bytezap",   Intrinsic::alpha_bytezap },
+     { "llvm.alpha.bytemanip", Intrinsic::alpha_bytemanip },
+     { "llvm.alpha.dfp_bop",   Intrinsic::alpha_dfpbop }, 
+     { "llvm.alpha.dfp_uop",   Intrinsic::alpha_dfpuop },
+     { "llvm.alpha.unordered", Intrinsic::alpha_unordered },
+     { "llvm.alpha.uqtodfp",   Intrinsic::alpha_uqtodfp },
+     { "llvm.alpha.uqtosfp",   Intrinsic::alpha_uqtosfp },
+     { "llvm.alpha.dfptosq",   Intrinsic::alpha_dfptosq },
+     { "llvm.alpha.sfptosq",   Intrinsic::alpha_sfptosq },
   };
   const unsigned num_alpha_intrinsics = 
                  sizeof(alpha_intrinsics) / sizeof(*alpha_intrinsics);
@@ -204,17 +206,17 @@
           return alpha_intrinsics[i].id;
     break;
   case 'l':
-    if (getName() == "llvm.longjmp")  return LLVMIntrinsic::longjmp;
+    if (getName() == "llvm.longjmp")  return Intrinsic::longjmp;
     break;
   case 's':
-    if (getName() == "llvm.setjmp")     return LLVMIntrinsic::setjmp;
-    if (getName() == "llvm.sigsetjmp")  return LLVMIntrinsic::sigsetjmp;
-    if (getName() == "llvm.siglongjmp") return LLVMIntrinsic::siglongjmp;
+    if (getName() == "llvm.setjmp")     return Intrinsic::setjmp;
+    if (getName() == "llvm.sigsetjmp")  return Intrinsic::sigsetjmp;
+    if (getName() == "llvm.siglongjmp") return Intrinsic::siglongjmp;
     break;
   case 'v':
-    if (getName() == "llvm.va_copy")  return LLVMIntrinsic::va_copy;
-    if (getName() == "llvm.va_end")   return LLVMIntrinsic::va_end;
-    if (getName() == "llvm.va_start") return LLVMIntrinsic::va_start;
+    if (getName() == "llvm.va_copy")  return Intrinsic::va_copy;
+    if (getName() == "llvm.va_end")   return Intrinsic::va_end;
+    if (getName() == "llvm.va_start") return Intrinsic::va_start;
     break;
   }
   // The "llvm." namespace is reserved!
@@ -257,3 +259,5 @@
   Value::setName(name);
   if (P && getName() != "") P->getSymbolTable().insert(this);
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/InstrTypes.cpp
diff -u llvm/lib/VMCore/InstrTypes.cpp:1.22 llvm/lib/VMCore/InstrTypes.cpp:1.23
--- llvm/lib/VMCore/InstrTypes.cpp:1.22	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/InstrTypes.cpp	Tue Nov 11 16:41:34 2003
@@ -19,6 +19,8 @@
 #include "llvm/Type.h"
 #include <algorithm>  // find
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 //                            TerminatorInst Class
 //===----------------------------------------------------------------------===//
@@ -56,3 +58,5 @@
   }
   return Removed;
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/Instruction.cpp
diff -u llvm/lib/VMCore/Instruction.cpp:1.30 llvm/lib/VMCore/Instruction.cpp:1.31
--- llvm/lib/VMCore/Instruction.cpp:1.30	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/Instruction.cpp	Tue Nov 11 16:41:34 2003
@@ -16,6 +16,8 @@
 #include "llvm/Type.h"
 #include "Support/LeakDetector.h"
 
+namespace llvm {
+
 Instruction::Instruction(const Type *ty, unsigned it, const std::string &Name,
                          Instruction *InsertBefore)
   : User(ty, Value::InstructionVal, Name) {
@@ -163,3 +165,5 @@
     return false;
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/Module.cpp
diff -u llvm/lib/VMCore/Module.cpp:1.43 llvm/lib/VMCore/Module.cpp:1.44
--- llvm/lib/VMCore/Module.cpp:1.43	Tue Nov  4 23:15:42 2003
+++ llvm/lib/VMCore/Module.cpp	Tue Nov 11 16:41:34 2003
@@ -22,6 +22,8 @@
 #include <cstdarg>
 #include <map>
 
+namespace llvm {
+
 Function *ilist_traits<Function>::createNode() {
   FunctionType *FTy =
     FunctionType::get(Type::VoidTy, std::vector<const Type*>(), false);
@@ -307,3 +309,5 @@
     delete Ref;
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/ModuleProvider.cpp
diff -u llvm/lib/VMCore/ModuleProvider.cpp:1.6 llvm/lib/VMCore/ModuleProvider.cpp:1.7
--- llvm/lib/VMCore/ModuleProvider.cpp:1.6	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/ModuleProvider.cpp	Tue Nov 11 16:41:34 2003
@@ -14,6 +14,8 @@
 #include "llvm/ModuleProvider.h"
 #include "llvm/Module.h"
 
+namespace llvm {
+
 /// ctor - always have a valid Module
 ///
 ModuleProvider::ModuleProvider() : TheModule(0) { }
@@ -35,3 +37,5 @@
 
   return TheModule;
 }
+
+} // End llvm namespace


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


Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.45 llvm/lib/VMCore/PassManagerT.h:1.46
--- llvm/lib/VMCore/PassManagerT.h:1.45	Tue Nov  4 23:15:42 2003
+++ llvm/lib/VMCore/PassManagerT.h	Tue Nov 11 16:41:34 2003
@@ -28,6 +28,9 @@
 #include "Support/Timer.h"
 #include <algorithm>
 #include <iostream>
+
+namespace llvm {
+
 class Annotable;
 
 //===----------------------------------------------------------------------===//
@@ -791,5 +794,7 @@
     ((PMType*)this)->Passes[i]->doFinalization(M);
   return Changed;
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/lib/VMCore/SlotCalculator.cpp
diff -u llvm/lib/VMCore/SlotCalculator.cpp:1.37 llvm/lib/VMCore/SlotCalculator.cpp:1.38
--- llvm/lib/VMCore/SlotCalculator.cpp:1.37	Thu Oct 30 21:02:34 2003
+++ llvm/lib/VMCore/SlotCalculator.cpp	Tue Nov 11 16:41:34 2003
@@ -27,6 +27,8 @@
 #include "Support/STLExtras.h"
 #include <algorithm>
 
+namespace llvm {
+
 #if 0
 #define SC_DEBUG(X) std::cerr << X
 #else
@@ -361,3 +363,5 @@
   SC_DEBUG("]\n");
   return (int)DestSlot;
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/SymbolTable.cpp
diff -u llvm/lib/VMCore/SymbolTable.cpp:1.38 llvm/lib/VMCore/SymbolTable.cpp:1.39
--- llvm/lib/VMCore/SymbolTable.cpp:1.38	Sun Nov  9 13:39:46 2003
+++ llvm/lib/VMCore/SymbolTable.cpp	Tue Nov 11 16:41:34 2003
@@ -17,6 +17,8 @@
 #include "Support/StringExtras.h"
 #include <algorithm>
 
+namespace llvm {
+
 #define DEBUG_SYMBOL_TABLE 0
 #define DEBUG_ABSTYPE 0
 
@@ -354,3 +356,5 @@
   std::cout << "Symbol table dump:\n";
   for_each(begin(), end(), DumpPlane);
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/SymbolTableListTraitsImpl.h
diff -u llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.5 llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.6
--- llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.5	Tue Oct 21 10:17:13 2003
+++ llvm/lib/VMCore/SymbolTableListTraitsImpl.h	Tue Nov 11 16:41:34 2003
@@ -19,6 +19,8 @@
 #include "llvm/SymbolTableListTraits.h"
 #include "llvm/SymbolTable.h"
 
+namespace llvm {
+
 template<typename ValueSubClass, typename ItemParentClass,typename SymTabClass,
          typename SubClass>
 void SymbolTableListTraits<ValueSubClass,ItemParentClass,SymTabClass,SubClass>
@@ -93,5 +95,7 @@
       first->setParent(NewIP);
   }
 }
+
+} // End llvm namespace
 
 #endif


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.79 llvm/lib/VMCore/Type.cpp:1.80
--- llvm/lib/VMCore/Type.cpp:1.79	Mon Nov  3 12:44:58 2003
+++ llvm/lib/VMCore/Type.cpp	Tue Nov 11 16:41:34 2003
@@ -18,6 +18,8 @@
 #include "Support/STLExtras.h"
 #include <algorithm>
 
+namespace llvm {
+
 // DEBUG_MERGE_TYPES - Enable this #define to see how and when derived types are
 // created and later destroyed, all in an effort to make sure that there is only
 // a single canonical version of a type.
@@ -1114,3 +1116,4 @@
   refineAbstractType(AbsTy, AbsTy);
 }
 
+} // End llvm namespace


Index: llvm/lib/VMCore/Value.cpp
diff -u llvm/lib/VMCore/Value.cpp:1.39 llvm/lib/VMCore/Value.cpp:1.40
--- llvm/lib/VMCore/Value.cpp:1.39	Wed Nov  5 13:09:40 2003
+++ llvm/lib/VMCore/Value.cpp	Tue Nov 11 16:41:34 2003
@@ -18,6 +18,8 @@
 #include "Support/LeakDetector.h"
 #include <algorithm>
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 //                                Value Class
 //===----------------------------------------------------------------------===//
@@ -107,3 +109,5 @@
       setOperand(i, To); // Fix it now...
     }
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.65 llvm/lib/VMCore/Verifier.cpp:1.66
--- llvm/lib/VMCore/Verifier.cpp:1.65	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/Verifier.cpp	Tue Nov 11 16:41:34 2003
@@ -57,6 +57,8 @@
 #include "Support/STLExtras.h"
 #include <algorithm>
 
+namespace llvm {
+
 namespace {  // Anonymous namespace for class
 
   struct Verifier : public FunctionPass, InstVisitor<Verifier> {
@@ -149,7 +151,7 @@
     void visitReturnInst(ReturnInst &RI);
     void visitUserOp1(Instruction &I);
     void visitUserOp2(Instruction &I) { visitUserOp1(I); }
-    void visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI);
+    void visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI);
 
     // CheckFailed - A check failed, so print out the condition and the message
     // that failed.  This provides a nice place to put a breakpoint if you want
@@ -168,7 +170,6 @@
   };
 
   RegisterPass<Verifier> X("verify", "Module Verifier");
-}
 
 // Assert - We know that cond should be true, if not print an error message.
 #define Assert(C, M) \
@@ -368,7 +369,7 @@
             CI.getOperand(i+1), FTy->getParamType(i));
 
   if (Function *F = CI.getCalledFunction())
-    if (LLVMIntrinsic::ID ID = (LLVMIntrinsic::ID)F->getIntrinsicID())
+    if (Intrinsic::ID ID = (Intrinsic::ID)F->getIntrinsicID())
       visitIntrinsicFunctionCall(ID, CI);
 
   visitInstruction(CI);
@@ -500,7 +501,7 @@
 }
 
 /// visitIntrinsicFunction - Allow intrinsics to be verified in different ways.
-void Verifier::visitIntrinsicFunctionCall(LLVMIntrinsic::ID ID, CallInst &CI) {
+void Verifier::visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI) {
   Function *IF = CI.getCalledFunction();
   const FunctionType *FT = IF->getFunctionType();
   Assert1(IF->isExternal(), "Intrinsic functions should never be defined!", IF);
@@ -509,37 +510,37 @@
   // FIXME: this should check the return type of each intrinsic as well, also
   // arguments!
   switch (ID) {
-  case LLVMIntrinsic::va_start:
+  case Intrinsic::va_start:
     Assert1(CI.getParent()->getParent()->getFunctionType()->isVarArg(),
             "llvm.va_start intrinsic may only occur in function with variable"
             " args!", &CI);
     NumArgs = 0;
     break;
-  case LLVMIntrinsic::va_end:          NumArgs = 1; break;
-  case LLVMIntrinsic::va_copy:         NumArgs = 1; break;
+  case Intrinsic::va_end:          NumArgs = 1; break;
+  case Intrinsic::va_copy:         NumArgs = 1; break;
 
-  case LLVMIntrinsic::setjmp:          NumArgs = 1; break;
-  case LLVMIntrinsic::longjmp:         NumArgs = 2; break;
-  case LLVMIntrinsic::sigsetjmp:       NumArgs = 2; break;
-  case LLVMIntrinsic::siglongjmp:      NumArgs = 2; break;
+  case Intrinsic::setjmp:          NumArgs = 1; break;
+  case Intrinsic::longjmp:         NumArgs = 2; break;
+  case Intrinsic::sigsetjmp:       NumArgs = 2; break;
+  case Intrinsic::siglongjmp:      NumArgs = 2; break;
  
-  case LLVMIntrinsic::alpha_ctlz:      NumArgs = 1; break;
-  case LLVMIntrinsic::alpha_cttz:      NumArgs = 1; break;
-  case LLVMIntrinsic::alpha_ctpop:     NumArgs = 1; break;
-  case LLVMIntrinsic::alpha_umulh:     NumArgs = 2; break;
-  case LLVMIntrinsic::alpha_vecop:     NumArgs = 4; break;
-  case LLVMIntrinsic::alpha_pup:       NumArgs = 3; break;
-  case LLVMIntrinsic::alpha_bytezap:   NumArgs = 2; break;
-  case LLVMIntrinsic::alpha_bytemanip: NumArgs = 3; break;
-  case LLVMIntrinsic::alpha_dfpbop:    NumArgs = 3; break;
-  case LLVMIntrinsic::alpha_dfpuop:    NumArgs = 2; break;
-  case LLVMIntrinsic::alpha_unordered: NumArgs = 2; break;
-  case LLVMIntrinsic::alpha_uqtodfp:   NumArgs = 2; break;
-  case LLVMIntrinsic::alpha_uqtosfp:   NumArgs = 2; break;
-  case LLVMIntrinsic::alpha_dfptosq:   NumArgs = 2; break;
-  case LLVMIntrinsic::alpha_sfptosq:   NumArgs = 2; break;
+  case Intrinsic::alpha_ctlz:      NumArgs = 1; break;
+  case Intrinsic::alpha_cttz:      NumArgs = 1; break;
+  case Intrinsic::alpha_ctpop:     NumArgs = 1; break;
+  case Intrinsic::alpha_umulh:     NumArgs = 2; break;
+  case Intrinsic::alpha_vecop:     NumArgs = 4; break;
+  case Intrinsic::alpha_pup:       NumArgs = 3; break;
+  case Intrinsic::alpha_bytezap:   NumArgs = 2; break;
+  case Intrinsic::alpha_bytemanip: NumArgs = 3; break;
+  case Intrinsic::alpha_dfpbop:    NumArgs = 3; break;
+  case Intrinsic::alpha_dfpuop:    NumArgs = 2; break;
+  case Intrinsic::alpha_unordered: NumArgs = 2; break;
+  case Intrinsic::alpha_uqtodfp:   NumArgs = 2; break;
+  case Intrinsic::alpha_uqtosfp:   NumArgs = 2; break;
+  case Intrinsic::alpha_dfptosq:   NumArgs = 2; break;
+  case Intrinsic::alpha_sfptosq:   NumArgs = 2; break;
 
-  case LLVMIntrinsic::not_intrinsic: 
+  case Intrinsic::not_intrinsic: 
     assert(0 && "Invalid intrinsic!"); NumArgs = 0; break;
   }
 
@@ -548,6 +549,7 @@
           "Illegal # arguments for intrinsic function!", IF);
 }
 
+} // End anonymous namespace
 
 //===----------------------------------------------------------------------===//
 //  Implement the public interfaces to this file...
@@ -585,3 +587,5 @@
   PM.run((Module&)M);
   return V->Broken;
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/iBranch.cpp
diff -u llvm/lib/VMCore/iBranch.cpp:1.9 llvm/lib/VMCore/iBranch.cpp:1.10
--- llvm/lib/VMCore/iBranch.cpp:1.9	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/iBranch.cpp	Tue Nov 11 16:41:34 2003
@@ -16,6 +16,8 @@
 #include "llvm/BasicBlock.h"
 #include "llvm/Type.h"
 
+namespace llvm {
+
 BranchInst::BranchInst(BasicBlock *True, BasicBlock *False, Value *Cond,
                        Instruction *InsertBefore) 
   : TerminatorInst(Instruction::Br, InsertBefore) {
@@ -49,3 +51,5 @@
     Operands.push_back(Use(BI.Operands[2], this));
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/iCall.cpp
diff -u llvm/lib/VMCore/iCall.cpp:1.20 llvm/lib/VMCore/iCall.cpp:1.21
--- llvm/lib/VMCore/iCall.cpp:1.20	Fri Oct 31 12:38:06 2003
+++ llvm/lib/VMCore/iCall.cpp	Tue Nov 11 16:41:34 2003
@@ -17,6 +17,8 @@
 #include "llvm/DerivedTypes.h"
 #include "llvm/Function.h"
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 //                        CallInst Implementation
 //===----------------------------------------------------------------------===//
@@ -144,8 +146,12 @@
   return 0;
 }
 
+} // End llvm namespace
+
 #include "llvm/Support/CallSite.h"
 
+namespace llvm {
+
 Function *CallSite::getCalledFunction() const {
   Value *Callee = getCalledValue();
   if (Function *F = dyn_cast<Function>(Callee))
@@ -155,3 +161,4 @@
   return 0;
 }
 
+} // End llvm namespace


Index: llvm/lib/VMCore/iMemory.cpp
diff -u llvm/lib/VMCore/iMemory.cpp:1.32 llvm/lib/VMCore/iMemory.cpp:1.33
--- llvm/lib/VMCore/iMemory.cpp:1.32	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/iMemory.cpp	Tue Nov 11 16:41:34 2003
@@ -15,6 +15,8 @@
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 
+using namespace llvm;
+
 AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, 
                                const std::string &Name, Instruction *InsertBef)
   : Instruction(PointerType::get(Ty), iTy, Name, InsertBef) {


Index: llvm/lib/VMCore/iOperators.cpp
diff -u llvm/lib/VMCore/iOperators.cpp:1.23 llvm/lib/VMCore/iOperators.cpp:1.24
--- llvm/lib/VMCore/iOperators.cpp:1.23	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/iOperators.cpp	Tue Nov 11 16:41:34 2003
@@ -16,6 +16,8 @@
 #include "llvm/Constants.h"
 #include "llvm/BasicBlock.h"
 
+namespace llvm {
+
 //===----------------------------------------------------------------------===//
 //                             BinaryOperator Class
 //===----------------------------------------------------------------------===//
@@ -194,3 +196,5 @@
   case SetLE: return SetGE;
   }
 }
+
+} // End llvm namespace


Index: llvm/lib/VMCore/iSwitch.cpp
diff -u llvm/lib/VMCore/iSwitch.cpp:1.9 llvm/lib/VMCore/iSwitch.cpp:1.10
--- llvm/lib/VMCore/iSwitch.cpp:1.9	Mon Oct 20 14:43:21 2003
+++ llvm/lib/VMCore/iSwitch.cpp	Tue Nov 11 16:41:34 2003
@@ -14,6 +14,8 @@
 #include "llvm/iTerminators.h"
 #include "llvm/BasicBlock.h"
 
+namespace llvm {
+
 SwitchInst::SwitchInst(Value *V, BasicBlock *DefaultDest,
                        Instruction *InsertBefore) 
   : TerminatorInst(Instruction::Switch, InsertBefore) {
@@ -48,3 +50,5 @@
   assert(idx*2 < Operands.size() && "Successor index out of range!!!");
   Operands.erase(Operands.begin()+idx*2, Operands.begin()+(idx+1)*2);  
 }
+
+} // End llvm namespace





More information about the llvm-commits mailing list