[llvm-commits] CVS: llvm/lib/VMCore/AsmWriter.cpp BasicBlock.cpp ConstantFolding.cpp ConstantFolding.h ConstantRange.cpp Constants.cpp Dominators.cpp Function.cpp Globals.cpp Instruction.cpp Instructions.cpp LeakDetector.cpp Mangler.cpp Module.cpp ModuleProvider.cpp Pass.cpp PassManagerT.h SymbolTable.cpp SymbolTableListTraitsImpl.h Type.cpp Value.cpp Verifier.cpp

Misha Brukman brukman at cs.uiuc.edu
Thu Apr 21 16:47:03 PDT 2005



Changes in directory llvm/lib/VMCore:

AsmWriter.cpp updated: 1.175 -> 1.176
BasicBlock.cpp updated: 1.62 -> 1.63
ConstantFolding.cpp updated: 1.72 -> 1.73
ConstantFolding.h updated: 1.44 -> 1.45
ConstantRange.cpp updated: 1.13 -> 1.14
Constants.cpp updated: 1.125 -> 1.126
Dominators.cpp updated: 1.60 -> 1.61
Function.cpp updated: 1.91 -> 1.92
Globals.cpp updated: 1.10 -> 1.11
Instruction.cpp updated: 1.44 -> 1.45
Instructions.cpp updated: 1.13 -> 1.14
LeakDetector.cpp updated: 1.12 -> 1.13
Mangler.cpp updated: 1.16 -> 1.17
Module.cpp updated: 1.60 -> 1.61
ModuleProvider.cpp updated: 1.9 -> 1.10
Pass.cpp updated: 1.64 -> 1.65
PassManagerT.h updated: 1.56 -> 1.57
SymbolTable.cpp updated: 1.58 -> 1.59
SymbolTableListTraitsImpl.h updated: 1.6 -> 1.7
Type.cpp updated: 1.123 -> 1.124
Value.cpp updated: 1.56 -> 1.57
Verifier.cpp updated: 1.129 -> 1.130
---
Log message:

Remove trailing whitespace


---
Diffs of the changes:  (+386 -386)

 AsmWriter.cpp               |  160 ++++++++++++++++++++++----------------------
 BasicBlock.cpp              |   18 ++--
 ConstantFolding.cpp         |   80 +++++++++++-----------
 ConstantFolding.h           |    6 -
 ConstantRange.cpp           |   14 +--
 Constants.cpp               |   62 ++++++++---------
 Dominators.cpp              |   38 +++++-----
 Function.cpp                |   16 ++--
 Globals.cpp                 |   16 ++--
 Instruction.cpp             |   14 +--
 Instructions.cpp            |   80 +++++++++++-----------
 LeakDetector.cpp            |    4 -
 Mangler.cpp                 |   10 +-
 Module.cpp                  |   10 +-
 ModuleProvider.cpp          |    4 -
 Pass.cpp                    |   20 ++---
 PassManagerT.h              |   32 ++++----
 SymbolTable.cpp             |   22 +++---
 SymbolTableListTraitsImpl.h |    4 -
 Type.cpp                    |   96 +++++++++++++-------------
 Value.cpp                   |   12 +--
 Verifier.cpp                |   54 +++++++-------
 22 files changed, 386 insertions(+), 386 deletions(-)


Index: llvm/lib/VMCore/AsmWriter.cpp
diff -u llvm/lib/VMCore/AsmWriter.cpp:1.175 llvm/lib/VMCore/AsmWriter.cpp:1.176
--- llvm/lib/VMCore/AsmWriter.cpp:1.175	Mon Mar 14 23:03:36 2005
+++ llvm/lib/VMCore/AsmWriter.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- AsmWriter.cpp - Printing LLVM as an assembly file -----------------===//
-// 
+//
 //                     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 library implements the functionality defined in llvm/Assembly/Writer.h
@@ -46,7 +46,7 @@
   typedef std::map<const Type*, unsigned> TypeMap;
 
   /// @brief A plane with next slot number and ValueMap
-  struct ValuePlane { 
+  struct ValuePlane {
     unsigned next_slot;        ///< The next slot number to use
     ValueMap map;              ///< The map of Value* -> unsigned
     ValuePlane() { next_slot = 0; } ///< Make sure we start at 0
@@ -90,15 +90,15 @@
 /// @name Mutators
 /// @{
 public:
-  /// If you'd like to deal with a function instead of just a module, use 
+  /// If you'd like to deal with a function instead of just a module, use
   /// this method to get its data into the SlotMachine.
-  void incorporateFunction(const Function *F) { 
-    TheFunction = F;  
+  void incorporateFunction(const Function *F) {
+    TheFunction = F;
     FunctionProcessed = false;
   }
 
-  /// After calling incorporateFunction, use this method to remove the 
-  /// most recently incorporated function from the SlotMachine. This 
+  /// After calling incorporateFunction, use this method to remove the
+  /// most recently incorporated function from the SlotMachine. This
   /// will reset the state of the machine back to just the module contents.
   void purgeFunction();
 
@@ -109,7 +109,7 @@
   /// This function does the actual initialization.
   inline void initialize();
 
-  /// Values can be crammed into here at will. If they haven't 
+  /// Values can be crammed into here at will. If they haven't
   /// been inserted already, they get inserted, otherwise they are ignored.
   /// Either way, the slot number for the Value* is returned.
   unsigned createSlot(const Value *V);
@@ -117,7 +117,7 @@
 
   /// Insert a value into the value table. Return the slot number
   /// that it now occupies.  BadThings(TM) will happen if you insert a
-  /// Value that's already been inserted. 
+  /// Value that's already been inserted.
   unsigned insertValue( const Value *V );
   unsigned insertValue( const Type* Ty);
 
@@ -162,12 +162,12 @@
 static RegisterPass<PrintFunctionPass>
 Y("print","Print function to stderr",PassInfo::Analysis|PassInfo::Optimization);
 
-static void WriteAsOperandInternal(std::ostream &Out, const Value *V, 
+static void WriteAsOperandInternal(std::ostream &Out, const Value *V,
                                    bool PrintName,
                                  std::map<const Type *, std::string> &TypeTable,
                                    SlotMachine *Machine);
 
-static void WriteAsOperandInternal(std::ostream &Out, const Type *T, 
+static void WriteAsOperandInternal(std::ostream &Out, const Type *T,
                                    bool PrintName,
                                  std::map<const Type *, std::string> &TypeTable,
                                    SlotMachine *Machine);
@@ -219,7 +219,7 @@
         C != '-' && C != '.' && C != '_')
       return "\"" + Name + "\"";
   }
-  
+
   // If we get here, then the identifier is legal to use as a "VarID".
   if (prefixName)
     return "%"+Name;
@@ -250,7 +250,7 @@
 
 
 
-static void calcTypeName(const Type *Ty, 
+static void calcTypeName(const Type *Ty,
                          std::vector<const Type *> &TypeStack,
                          std::map<const Type *, std::string> &TypeNames,
                          std::string & Result){
@@ -275,7 +275,7 @@
   unsigned Slot = 0, CurSize = TypeStack.size();
   while (Slot < CurSize && TypeStack[Slot] != Ty) ++Slot; // Scan for type
 
-  // This is another base case for the recursion.  In this case, we know 
+  // This is another base case for the recursion.  In this case, we know
   // that we have looped back to a type that we have previously visited.
   // Generate the appropriate upreference to handle this.
   if (Slot < CurSize) {
@@ -284,7 +284,7 @@
   }
 
   TypeStack.push_back(Ty);    // Recursive case: Add us to the stack..
-  
+
   switch (Ty->getTypeID()) {
   case Type::FunctionTyID: {
     const FunctionType *FTy = cast<FunctionType>(Ty);
@@ -316,7 +316,7 @@
     break;
   }
   case Type::PointerTyID:
-    calcTypeName(cast<PointerType>(Ty)->getElementType(), 
+    calcTypeName(cast<PointerType>(Ty)->getElementType(),
                           TypeStack, TypeNames, Result);
     Result += "*";
     break;
@@ -379,22 +379,22 @@
 ///
 std::ostream &llvm::WriteTypeSymbolic(std::ostream &Out, const Type *Ty,
                                       const Module *M) {
-  Out << ' '; 
+  Out << ' ';
 
   // If they want us to print out a type, attempt to make it symbolic if there
   // is a symbol table in the module...
   if (M) {
     std::map<const Type *, std::string> TypeNames;
     fillTypeNameTable(M, TypeNames);
-    
+
     return printTypeInt(Out, Ty, TypeNames);
   } else {
     return Out << Ty->getDescription();
   }
 }
 
-/// @brief Internal constant writer. 
-static void WriteConstantInt(std::ostream &Out, const Constant *CV, 
+/// @brief Internal constant writer.
+static void WriteConstantInt(std::ostream &Out, const Constant *CV,
                              bool PrintName,
                              std::map<const Type *, std::string> &TypeTable,
                              SlotMachine *Machine) {
@@ -424,7 +424,7 @@
         Out << StrVal;
         return;
       }
-    
+
     // Otherwise we could not reparse it to exactly the same value, so we must
     // output the string in hexadecimal format!
     //
@@ -445,7 +445,7 @@
   } else if (const ConstantArray *CA = dyn_cast<ConstantArray>(CV)) {
     // As a special case, print the array as a string if it is an array of
     // ubytes or an array of sbytes with positive values.
-    // 
+    //
     const Type *ETy = CA->getType()->getElementType();
     bool isString = (ETy == Type::SByteTy || ETy == Type::UByteTy);
 
@@ -459,9 +459,9 @@
     if (isString) {
       Out << "c\"";
       for (unsigned i = 0; i < CA->getNumOperands(); ++i) {
-        unsigned char C = 
+        unsigned char C =
           (unsigned char)cast<ConstantInt>(CA->getOperand(i))->getRawValue();
-        
+
         if (isprint(C) && C != '"' && C != '\\') {
           Out << C;
         } else {
@@ -509,7 +509,7 @@
     Out << " }";
   } else if (const ConstantPacked *CP = dyn_cast<ConstantPacked>(CV)) {
       const Type *ETy = CP->getType()->getElementType();
-      assert(CP->getNumOperands() > 0 && 
+      assert(CP->getNumOperands() > 0 &&
              "Number of operands for a PackedConst must be > 0");
       Out << '<';
       Out << ' ';
@@ -531,14 +531,14 @@
 
   } else if (const ConstantExpr *CE = dyn_cast<ConstantExpr>(CV)) {
     Out << CE->getOpcodeName() << " (";
-    
+
     for (User::const_op_iterator OI=CE->op_begin(); OI != CE->op_end(); ++OI) {
       printTypeInt(Out, (*OI)->getType(), TypeTable);
       WriteAsOperandInternal(Out, *OI, PrintName, TypeTable, Machine);
       if (OI+1 != CE->op_end())
         Out << ", ";
     }
-    
+
     if (CE->getOpcode() == Instruction::Cast) {
       Out << " to ";
       printTypeInt(Out, CE->getType(), TypeTable);
@@ -555,7 +555,7 @@
 /// ostream.  This can be useful when you just want to print int %reg126, not
 /// the whole instruction that generated it.
 ///
-static void WriteAsOperandInternal(std::ostream &Out, const Value *V, 
+static void WriteAsOperandInternal(std::ostream &Out, const Value *V,
                                    bool PrintName,
                                   std::map<const Type*, std::string> &TypeTable,
                                    SlotMachine *Machine) {
@@ -572,7 +572,7 @@
         Slot = Machine->getSlot(V);
       } else {
         Machine = createSlotMachine(V);
-        if (Machine == 0) 
+        if (Machine == 0)
           Slot = Machine->getSlot(V);
         else
           Slot = -1;
@@ -591,7 +591,7 @@
 /// the whole instruction that generated it.
 ///
 std::ostream &llvm::WriteAsOperand(std::ostream &Out, const Value *V,
-                                   bool PrintType, bool PrintName, 
+                                   bool PrintType, bool PrintName,
                                    const Module *Context) {
   std::map<const Type *, std::string> TypeNames;
   if (Context == 0) Context = getModuleFromVal(V);
@@ -601,16 +601,16 @@
 
   if (PrintType)
     printTypeInt(Out, V->getType(), TypeNames);
-  
+
   WriteAsOperandInternal(Out, V, PrintName, TypeNames, 0);
   return Out;
 }
 
-/// WriteAsOperandInternal - Write the name of the specified value out to 
-/// the specified ostream.  This can be useful when you just want to print 
+/// WriteAsOperandInternal - Write the name of the specified value out to
+/// the specified ostream.  This can be useful when you just want to print
 /// int %reg126, not the whole instruction that generated it.
 ///
-static void WriteAsOperandInternal(std::ostream &Out, const Type *T, 
+static void WriteAsOperandInternal(std::ostream &Out, const Type *T,
                                    bool PrintName,
                                   std::map<const Type*, std::string> &TypeTable,
                                    SlotMachine *Machine) {
@@ -632,7 +632,7 @@
 /// the whole instruction that generated it.
 ///
 std::ostream &llvm::WriteAsOperand(std::ostream &Out, const Type *Ty,
-                                   bool PrintType, bool PrintName, 
+                                   bool PrintType, bool PrintName,
                                    const Module *Context) {
   std::map<const Type *, std::string> TypeNames;
   assert(Context != 0 && "Can't write types as operand without module context");
@@ -641,7 +641,7 @@
 
   // if (PrintType)
     // printTypeInt(Out, V->getType(), TypeNames);
-  
+
   printTypeInt(Out, Ty, TypeNames);
 
   WriteAsOperandInternal(Out, Ty, PrintName, TypeNames, 0);
@@ -753,7 +753,7 @@
 }
 
 
-void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType, 
+void AssemblyWriter::writeOperand(const Value *Operand, bool PrintType,
                                   bool PrintName) {
   if (Operand != 0) {
     if (PrintType) { Out << ' '; printType(Operand->getType()); }
@@ -766,7 +766,7 @@
 
 void AssemblyWriter::printModule(const Module *M) {
   if (!M->getModuleIdentifier().empty() &&
-      // Don't print the ID if it will start a new line (which would 
+      // Don't print the ID if it will start a new line (which would
       // require a comment char before it).
       M->getModuleIdentifier().find('\n') == std::string::npos)
     Out << "; ModuleID = '" << M->getModuleIdentifier() << "'\n";
@@ -783,7 +783,7 @@
   }
   if (!M->getTargetTriple().empty())
     Out << "target triple = \"" << M->getTargetTriple() << "\"\n";
-  
+
   // Loop over the dependent libraries and emit them.
   Module::lib_iterator LI = M->lib_begin();
   Module::lib_iterator LE = M->lib_end();
@@ -800,12 +800,12 @@
 
   // Loop over the symbol table, emitting all named constants.
   printSymbolTable(M->getSymbolTable());
-  
+
   for (Module::const_global_iterator I = M->global_begin(), E = M->global_end(); I != E; ++I)
     printGlobal(I);
 
   Out << "\nimplementation   ; Functions:\n";
-  
+
   // Output all of the functions.
   for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
     printFunction(I);
@@ -814,7 +814,7 @@
 void AssemblyWriter::printGlobal(const GlobalVariable *GV) {
   if (GV->hasName()) Out << getLLVMName(GV->getName()) << " = ";
 
-  if (!GV->hasInitializer()) 
+  if (!GV->hasInitializer())
     Out << "external ";
   else
     switch (GV->getLinkage()) {
@@ -856,7 +856,7 @@
     //
     printTypeAtLeastOneLevel(TI->second) << "\n";
   }
-    
+
   // Print the constants, in type plane order.
   for (SymbolTable::plane_const_iterator PI = ST.plane_begin();
        PI != ST.plane_end(); ++PI ) {
@@ -940,7 +940,7 @@
     Out << "\n";
   } else {
     Out << " {";
-  
+
     // Output all of its basic blocks... for the function
     for (Function::const_iterator I = F->begin(), E = F->end(); I != E; ++I)
       printBasicBlock(I);
@@ -960,7 +960,7 @@
 
   // Output type...
   printType(Arg->getType());
-  
+
   // Output name, if available...
   if (Arg->hasName())
     Out << ' ' << getLLVMName(Arg->getName());
@@ -987,7 +987,7 @@
       // Output predecessors for the block...
       Out << "\t\t;";
       pred_const_iterator PI = pred_begin(BB), PE = pred_end(BB);
-      
+
       if (PI == PE) {
         Out << " No predecessors!";
       } else {
@@ -1000,7 +1000,7 @@
       }
     }
   }
-  
+
   Out << "\n";
 
   if (AnnotationWriter) AnnotationWriter->emitBasicBlockStartAnnot(BB, Out);
@@ -1080,7 +1080,7 @@
 
     for (unsigned op = 0, Eop = I.getNumOperands(); op < Eop; op += 2) {
       if (op) Out << ", ";
-      Out << '[';  
+      Out << '[';
       writeOperand(I.getOperand(op  ), false); Out << ',';
       writeOperand(I.getOperand(op+1), false); Out << " ]";
     }
@@ -1096,7 +1096,7 @@
     // and if the return type is not a pointer to a function.
     //
     if (!FTy->isVarArg() &&
-        (!isa<PointerType>(RetTy) || 
+        (!isa<PointerType>(RetTy) ||
          !isa<FunctionType>(cast<PointerType>(RetTy)->getElementType()))) {
       Out << ' '; printType(RetTy);
       writeOperand(Operand, false);
@@ -1121,7 +1121,7 @@
     // and if the return type is not a pointer to a function.
     //
     if (!FTy->isVarArg() &&
-        (!isa<PointerType>(RetTy) || 
+        (!isa<PointerType>(RetTy) ||
          !isa<FunctionType>(cast<PointerType>(RetTy)->getElementType()))) {
       Out << ' '; printType(RetTy);
       writeOperand(Operand, false);
@@ -1162,7 +1162,7 @@
     printType(VAN->getArgType());
   } else if (Operand) {   // Print the normal way...
 
-    // PrintAllTypes - Instructions who have operands of all the same type 
+    // PrintAllTypes - Instructions who have operands of all the same type
     // omit the type from all but the first operand.  If the instruction has
     // different type operands (for example br), then they are all printed.
     bool PrintAllTypes = false;
@@ -1181,7 +1181,7 @@
         }
       }
     }
-    
+
     if (!PrintAllTypes) {
       Out << ' ';
       printType(TheType);
@@ -1223,7 +1223,7 @@
 
 void BasicBlock::print(std::ostream &o, AssemblyAnnotationWriter *AAW) const {
   SlotMachine SlotTable(getParent());
-  AssemblyWriter W(o, SlotTable, 
+  AssemblyWriter W(o, SlotTable,
                    getParent() ? getParent()->getParent() : 0, AAW);
   W.write(this);
 }
@@ -1245,7 +1245,7 @@
   WriteConstantInt(o, this, false, TypeTable, 0);
 }
 
-void Type::print(std::ostream &o) const { 
+void Type::print(std::ostream &o) const {
   if (this == 0)
     o << "<null Type>";
   else
@@ -1294,7 +1294,7 @@
     AW->write(F);
   else if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(&V))
     AW->write(GV);
-  else 
+  else
     AW->writeOperand(&V, true, true);
   return *this;
 }
@@ -1321,7 +1321,7 @@
 
 // Module level constructor. Causes the contents of the Module (sans functions)
 // to be added to the slot table.
-SlotMachine::SlotMachine(const Module *M) 
+SlotMachine::SlotMachine(const Module *M)
   : TheModule(M)    ///< Saved for lazy initialization.
   , TheFunction(0)
   , FunctionProcessed(false)
@@ -1334,7 +1334,7 @@
 
 // Function level constructor. Causes the contents of the Module and the one
 // function provided to be added to the slot table.
-SlotMachine::SlotMachine(const Function *F ) 
+SlotMachine::SlotMachine(const Function *F )
   : TheModule( F ? F->getParent() : 0 ) ///< Saved for lazy initialization
   , TheFunction(F) ///< Saved for lazy initialization
   , FunctionProcessed(false)
@@ -1346,17 +1346,17 @@
 }
 
 inline void SlotMachine::initialize(void) {
-  if ( TheModule) { 
-    processModule(); 
+  if ( TheModule) {
+    processModule();
     TheModule = 0; ///< Prevent re-processing next time we're called.
   }
-  if ( TheFunction && ! FunctionProcessed) { 
-    processFunction(); 
+  if ( TheFunction && ! FunctionProcessed) {
+    processFunction();
   }
 }
 
 // Iterate through all the global variables, functions, and global
-// variable initializers and create slots for them. 
+// variable initializers and create slots for them.
 void SlotMachine::processModule() {
   SC_DEBUG("begin processModule!\n");
 
@@ -1379,14 +1379,14 @@
   SC_DEBUG("begin processFunction!\n");
 
   // Add all the function arguments
-  for(Function::const_arg_iterator AI = TheFunction->arg_begin(), 
+  for(Function::const_arg_iterator AI = TheFunction->arg_begin(),
       AE = TheFunction->arg_end(); AI != AE; ++AI)
     createSlot(AI);
 
   SC_DEBUG("Inserting Instructions:\n");
 
   // Add all of the basic blocks and instructions
-  for (Function::const_iterator BB = TheFunction->begin(), 
+  for (Function::const_iterator BB = TheFunction->begin(),
        E = TheFunction->end(); BB != E; ++BB) {
     createSlot(BB);
     for (BasicBlock::const_iterator I = BB->begin(), E = BB->end(); I!=E; ++I) {
@@ -1417,8 +1417,8 @@
 /// Types are forbidden because Type does not inherit from Value (any more).
 int SlotMachine::getSlot(const Value *V) {
   assert( V && "Can't get slot for null Value" );
-  assert(!isa<Constant>(V) || isa<GlobalValue>(V) && 
-    "Can't insert a non-GlobalValue Constant into SlotMachine"); 
+  assert(!isa<Constant>(V) || isa<GlobalValue>(V) &&
+    "Can't insert a non-GlobalValue Constant into SlotMachine");
 
   // Check for uninitialized state and do lazy initialization
   this->initialize();
@@ -1445,7 +1445,7 @@
         if (MVI == MI->second.map.end()) return -1;
         assert( MVI != MI->second.map.end() && "Value not found");
         // We found it only at the module level
-        return MVI->second; 
+        return MVI->second;
 
       // else the value exists in the function map
       } else {
@@ -1489,10 +1489,10 @@
     if ( FTI == fTypes.map.end() ) {
       TypeMap::const_iterator MTI = mTypes.map.find(Ty);
       // If we didn't find it, it wasn't inserted
-      if (MTI == mTypes.map.end()) 
+      if (MTI == mTypes.map.end())
         return -1;
       // We found it only at the module level
-      return MTI->second; 
+      return MTI->second;
 
     // else the value exists in the function map
     } else {
@@ -1518,8 +1518,8 @@
 // of asserting when the Value* isn't found, it inserts the value.
 unsigned SlotMachine::createSlot(const Value *V) {
   assert( V && "Can't insert a null Value to SlotMachine");
-  assert(!isa<Constant>(V) || isa<GlobalValue>(V) && 
-    "Can't insert a non-GlobalValue Constant into SlotMachine"); 
+  assert(!isa<Constant>(V) || isa<GlobalValue>(V) &&
+    "Can't insert a non-GlobalValue Constant into SlotMachine");
 
   const Type* VTy = V->getType();
 
@@ -1587,7 +1587,7 @@
   if ( MI != mMap.end() ) {
     // Lookup the value in the module's map
     ValueMap::const_iterator MVI = MI->second.map.find(V);
-    if ( MVI != MI->second.map.end() ) 
+    if ( MVI != MI->second.map.end() )
       return MVI->second;
   }
 
@@ -1627,7 +1627,7 @@
 
   // Lookup the type in the module's map
   TypeMap::const_iterator MTI = mTypes.map.find(Ty);
-  if ( MTI != mTypes.map.end() ) 
+  if ( MTI != mTypes.map.end() )
     return MTI->second;
 
   return insertValue(Ty);
@@ -1637,11 +1637,11 @@
 // function is just for the convenience of createSlot (above).
 unsigned SlotMachine::insertValue(const Value *V ) {
   assert(V && "Can't insert a null Value into SlotMachine!");
-  assert(!isa<Constant>(V) || isa<GlobalValue>(V) && 
-    "Can't insert a non-GlobalValue Constant into SlotMachine"); 
+  assert(!isa<Constant>(V) || isa<GlobalValue>(V) &&
+    "Can't insert a non-GlobalValue Constant into SlotMachine");
 
   // If this value does not contribute to a plane (is void)
-  // or if the value already has a name then ignore it. 
+  // or if the value already has a name then ignore it.
   if (V->getType() == Type::VoidTy || V->hasName() ) {
       SC_DEBUG("ignored value " << *V << "\n");
       return 0;   // FIXME: Wrong return value
@@ -1652,7 +1652,7 @@
 
   if ( TheFunction ) {
     TypedPlanes::iterator I = fMap.find( VTy );
-    if ( I == fMap.end() ) 
+    if ( I == fMap.end() )
       I = fMap.insert(std::make_pair(VTy,ValuePlane())).first;
     DestSlot = I->second.map[V] = I->second.next_slot++;
   } else {
@@ -1662,10 +1662,10 @@
     DestSlot = I->second.map[V] = I->second.next_slot++;
   }
 
-  SC_DEBUG("  Inserting value [" << VTy << "] = " << V << " slot=" << 
+  SC_DEBUG("  Inserting value [" << VTy << "] = " << V << " slot=" <<
            DestSlot << " [");
   // G = Global, C = Constant, T = Type, F = Function, o = other
-  SC_DEBUG((isa<GlobalVariable>(V) ? 'G' : (isa<Function>(V) ? 'F' : 
+  SC_DEBUG((isa<GlobalVariable>(V) ? 'G' : (isa<Function>(V) ? 'F' :
            (isa<Constant>(V) ? 'C' : 'o'))));
   SC_DEBUG("]\n");
   return DestSlot;


Index: llvm/lib/VMCore/BasicBlock.cpp
diff -u llvm/lib/VMCore/BasicBlock.cpp:1.62 llvm/lib/VMCore/BasicBlock.cpp:1.63
--- llvm/lib/VMCore/BasicBlock.cpp:1.62	Thu Apr 21 11:06:03 2005
+++ llvm/lib/VMCore/BasicBlock.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- BasicBlock.cpp - Implement BasicBlock related methods -------------===//
-// 
+//
 //                     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 BasicBlock class for the VMCore library.
@@ -130,7 +130,7 @@
 
 /// removePredecessor - This method is used to notify a BasicBlock that the
 /// specified Predecessor of the block is no longer able to reach it.  This is
-/// actually not used to update the Predecessor list, but is actually used to 
+/// actually not used to update the Predecessor list, but is actually used to
 /// update the PHI nodes that reside in the block.  Note that this should be
 /// called while the predecessor still refers to this block.
 ///
@@ -153,9 +153,9 @@
   //    br Loop                 ;; %x2 does not dominate all uses
   //
   // This is because the PHI node input is actually taken from the predecessor
-  // basic block.  The only case this can happen is with a self loop, so we 
+  // basic block.  The only case this can happen is with a self loop, so we
   // check for this case explicitly now.
-  // 
+  //
   unsigned max_idx = APN->getNumIncomingValues();
   assert(max_idx != 0 && "PHI Node in block with 0 predecessors!?!?!");
   if (max_idx == 2) {
@@ -197,18 +197,18 @@
 
 /// splitBasicBlock - This splits a basic block into two at the specified
 /// instruction.  Note that all instructions BEFORE the specified iterator stay
-/// as part of the original basic block, an unconditional branch is added to 
+/// as part of the original basic block, an unconditional branch is added to
 /// the new BB, and the rest of the instructions in the BB are moved to the new
 /// BB, including the old terminator.  This invalidates the iterator.
 ///
-/// Note that this only works on well formed basic blocks (must have a 
+/// Note that this only works on well formed basic blocks (must have a
 /// terminator), and 'I' must not be the end of instruction list (which would
 /// cause a degenerate basic block to be formed, having a terminator inside of
-/// the basic block). 
+/// the basic block).
 ///
 BasicBlock *BasicBlock::splitBasicBlock(iterator I, const std::string &BBName) {
   assert(getTerminator() && "Can't use splitBasicBlock on degenerate BB!");
-  assert(I != InstList.end() && 
+  assert(I != InstList.end() &&
 	 "Trying to get me to create degenerate basic block!");
 
   BasicBlock *New = new BasicBlock(BBName, getParent(), getNext());


Index: llvm/lib/VMCore/ConstantFolding.cpp
diff -u llvm/lib/VMCore/ConstantFolding.cpp:1.72 llvm/lib/VMCore/ConstantFolding.cpp:1.73
--- llvm/lib/VMCore/ConstantFolding.cpp:1.72	Fri Jan 28 17:17:27 2005
+++ llvm/lib/VMCore/ConstantFolding.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===- ConstantFolding.cpp - LLVM constant folder -------------------------===//
-// 
+//
 //                     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 folding of constants for LLVM.  This implements the
@@ -30,7 +30,7 @@
 namespace {
   struct ConstRules {
     ConstRules() {}
-    
+
     // Binary Operators...
     virtual Constant *add(const Constant *V1, const Constant *V2) const = 0;
     virtual Constant *sub(const Constant *V1, const Constant *V2) const = 0;
@@ -59,7 +59,7 @@
     virtual Constant *castToDouble(const Constant *V) const = 0;
     virtual Constant *castToPointer(const Constant *V,
                                     const PointerType *Ty) const = 0;
-    
+
     // ConstRules::get - Return an instance of ConstRules for the specified
     // constant operands.
     //
@@ -75,11 +75,11 @@
 //                             TemplateRules Class
 //===----------------------------------------------------------------------===//
 //
-// TemplateRules - Implement a subclass of ConstRules that provides all 
-// operations as noops.  All other rules classes inherit from this class so 
-// that if functionality is needed in the future, it can simply be added here 
+// TemplateRules - Implement a subclass of ConstRules that provides all
+// operations as noops.  All other rules classes inherit from this class so
+// that if functionality is needed in the future, it can simply be added here
 // and to ConstRules without changing anything else...
-// 
+//
 // This class also provides subclasses with typesafe implementations of methods
 // so that don't have to do type casting.
 //
@@ -90,41 +90,41 @@
   // Redirecting functions that cast to the appropriate types
   //===--------------------------------------------------------------------===//
 
-  virtual Constant *add(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Add((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *add(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Add((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *sub(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Sub((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *sub(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Sub((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *mul(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Mul((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *mul(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Mul((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *div(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Div((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *div(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Div((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *rem(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Rem((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *rem(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Rem((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *op_and(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::And((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *op_and(const Constant *V1, const Constant *V2) const {
+    return SubClassName::And((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *op_or(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Or((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *op_or(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Or((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *op_xor(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Xor((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *op_xor(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Xor((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *shl(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Shl((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *shl(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Shl((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *shr(const Constant *V1, const Constant *V2) const { 
-    return SubClassName::Shr((const ArgType *)V1, (const ArgType *)V2);  
+  virtual Constant *shr(const Constant *V1, const Constant *V2) const {
+    return SubClassName::Shr((const ArgType *)V1, (const ArgType *)V2);
   }
 
-  virtual Constant *lessthan(const Constant *V1, const Constant *V2) const { 
+  virtual Constant *lessthan(const Constant *V1, const Constant *V2) const {
     return SubClassName::LessThan((const ArgType *)V1, (const ArgType *)V2);
   }
-  virtual Constant *equalto(const Constant *V1, const Constant *V2) const { 
+  virtual Constant *equalto(const Constant *V1, const Constant *V2) const {
     return SubClassName::EqualTo((const ArgType *)V1, (const ArgType *)V2);
   }
 
@@ -162,7 +162,7 @@
   virtual Constant *castToDouble(const Constant *V) const {
     return SubClassName::CastToDouble((const ArgType*)V);
   }
-  virtual Constant *castToPointer(const Constant *V, 
+  virtual Constant *castToPointer(const Constant *V,
                                   const PointerType *Ty) const {
     return SubClassName::CastToPointer((const ArgType*)V, Ty);
   }
@@ -357,7 +357,7 @@
   static Constant *LessThan(const ConstantClass *V1, const ConstantClass *V2) {
     bool R = (BuiltinType)V1->getValue() < (BuiltinType)V2->getValue();
     return ConstantBool::get(R);
-  } 
+  }
 
   static Constant *EqualTo(const ConstantClass *V1, const ConstantClass *V2) {
     bool R = (BuiltinType)V1->getValue() == (BuiltinType)V2->getValue();
@@ -654,7 +654,7 @@
   // ConstantExprs?  If so, we can't do anything with them.
   if (!isa<ConstantInt>(C1) || !isa<ConstantInt>(C2))
     return -2; // don't know!
-  
+
   // Ok, we have two differing integer indices.  Sign extend them to be the same
   // type.  Long is always big enough, so we use it.
   C1 = ConstantExpr::getSignExtend(C1, Type::LongTy);
@@ -798,7 +798,7 @@
             // same global.  From this, we can precisely determine the relative
             // ordering of the resultant pointers.
             unsigned i = 1;
-            
+
             // Compare all of the operands the GEP's have in common.
             gep_type_iterator GTI = gep_type_begin(CE1);
             for (;i != CE1->getNumOperands() && i != CE2->getNumOperands();
@@ -818,7 +818,7 @@
                   return Instruction::SetGT;
                 else
                   return Instruction::BinaryOpsEnd; // Might be equal.
-                    
+
             for (; i < CE2->getNumOperands(); ++i)
               if (!CE2->getOperand(i)->isNullValue())
                 if (isa<ConstantIntegral>(CE2->getOperand(i)))
@@ -829,7 +829,7 @@
           }
         }
       }
-      
+
     default:
       break;
     }
@@ -910,7 +910,7 @@
       if (Opcode == Instruction::SetLT) return ConstantBool::False;
       if (Opcode == Instruction::SetGT) return ConstantBool::True;
       break;
-      
+
     case Instruction::SetNE:
       // If we know that V1 != V2, we can only partially decide this relation.
       if (Opcode == Instruction::SetEQ) return ConstantBool::False;
@@ -1115,12 +1115,12 @@
         if (!Idx0->isNullValue()) {
           const Type *IdxTy = Combined->getType();
           if (IdxTy != Idx0->getType()) IdxTy = Type::LongTy;
-          Combined = 
+          Combined =
             ConstantExpr::get(Instruction::Add,
                               ConstantExpr::getCast(Idx0, IdxTy),
                               ConstantExpr::getCast(Combined, IdxTy));
         }
-        
+
         NewIndices.push_back(Combined);
         NewIndices.insert(NewIndices.end(), IdxList.begin()+1, IdxList.end());
         return ConstantExpr::getGetElementPtr(CE->getOperand(0), NewIndices);
@@ -1134,7 +1134,7 @@
     //
     if (CE->getOpcode() == Instruction::Cast && IdxList.size() > 1 &&
         Idx0->isNullValue())
-      if (const PointerType *SPT = 
+      if (const PointerType *SPT =
           dyn_cast<PointerType>(CE->getOperand(0)->getType()))
         if (const ArrayType *SAT = dyn_cast<ArrayType>(SPT->getElementType()))
           if (const ArrayType *CAT =


Index: llvm/lib/VMCore/ConstantFolding.h
diff -u llvm/lib/VMCore/ConstantFolding.h:1.44 llvm/lib/VMCore/ConstantFolding.h:1.45
--- llvm/lib/VMCore/ConstantFolding.h:1.44	Wed Oct 27 11:09:56 2004
+++ llvm/lib/VMCore/ConstantFolding.h	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- ConstantFolding.h - Internal Constant Folding Interface -*- C++ -*-===//
-// 
+//
 //                     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 defines the (internal) constant folding interfaces for LLVM.  These
@@ -25,7 +25,7 @@
   class Value;
   class Constant;
   class Type;
-  
+
   // Constant fold various types of instruction...
   Constant *ConstantFoldCastInstruction(const Constant *V, const Type *DestTy);
   Constant *ConstantFoldSelectInstruction(const Constant *Cond,


Index: llvm/lib/VMCore/ConstantRange.cpp
diff -u llvm/lib/VMCore/ConstantRange.cpp:1.13 llvm/lib/VMCore/ConstantRange.cpp:1.14
--- llvm/lib/VMCore/ConstantRange.cpp:1.13	Wed Jul 14 20:29:12 2004
+++ llvm/lib/VMCore/ConstantRange.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- ConstantRange.cpp - ConstantRange implementation ------------------===//
-// 
+//
 //                     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.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // Represent a range of possible values that may occur when the program is run
@@ -32,7 +32,7 @@
 static ConstantIntegral *Next(ConstantIntegral *CI) {
   if (CI->getType() == Type::BoolTy)
     return CI == ConstantBool::True ? ConstantBool::False : ConstantBool::True;
-      
+
   Constant *Result = ConstantExpr::getAdd(CI,
                                           ConstantInt::get(CI->getType(), 1));
   return cast<ConstantIntegral>(Result);
@@ -84,7 +84,7 @@
   : Lower(cast<ConstantIntegral>(L)), Upper(cast<ConstantIntegral>(U)) {
   assert(Lower->getType() == Upper->getType() &&
          "Incompatible types for ConstantRange!");
-  
+
   // Make sure that if L & U are equal that they are either Min or Max...
   assert((L != U || (L == ConstantIntegral::getMaxValue(L->getType()) ||
                      L == ConstantIntegral::getMinValue(L->getType()))) &&
@@ -126,7 +126,7 @@
 bool ConstantRange::isFullSet() const {
   return Lower == Upper && Lower == ConstantIntegral::getMaxValue(getType());
 }
-  
+
 /// isEmptySet - Return true if this set contains no members.
 ///
 bool ConstantRange::isEmptySet() const {
@@ -140,7 +140,7 @@
   return GT(Lower, Upper);
 }
 
-  
+
 /// getSingleElement - If this set contains a single element, return it,
 /// otherwise return null.
 ConstantIntegral *ConstantRange::getSingleElement() const {
@@ -158,7 +158,7 @@
       return 1;
     return 2;            // Must be full set...
   }
-  
+
   // Simply subtract the bounds...
   Constant *Result = ConstantExpr::getSub(Upper, Lower);
   return cast<ConstantInt>(Result)->getRawValue();


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.125 llvm/lib/VMCore/Constants.cpp:1.126
--- llvm/lib/VMCore/Constants.cpp:1.125	Sat Mar 19 05:40:31 2005
+++ llvm/lib/VMCore/Constants.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Constants.cpp - Implement Constant nodes --------------------------===//
-// 
+//
 //                     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 Constant* classes...
@@ -108,7 +108,7 @@
     return NullDouble;
   }
 
-  case Type::PointerTyID: 
+  case Type::PointerTyID:
     return ConstantPointerNull::get(cast<PointerType>(Ty));
 
   case Type::StructTyID:
@@ -130,7 +130,7 @@
   case Type::ShortTyID:
   case Type::IntTyID:
   case Type::LongTyID: {
-    // Calculate 011111111111111... 
+    // Calculate 011111111111111...
     unsigned TypeBits = Ty->getPrimitiveSize()*8;
     int64_t Val = INT64_MAX;             // All ones
     Val >>= 64-TypeBits;                 // Shift out unwanted 1 bits...
@@ -154,7 +154,7 @@
   case Type::ShortTyID:
   case Type::IntTyID:
   case Type::LongTyID: {
-     // Calculate 1111111111000000000000 
+     // Calculate 1111111111000000000000
      unsigned TypeBits = Ty->getPrimitiveSize()*8;
      int64_t Val = -1;                    // All ones
      Val <<= TypeBits-1;                  // Shift over to the right spot
@@ -347,7 +347,7 @@
       OperandList[i+1].init(IdxList[i], this);
   }
   ~GetElementPtrConstantExpr() {
-    delete [] OperandList;    
+    delete [] OperandList;
   }
 };
 
@@ -489,7 +489,7 @@
     if (Val == From) Val = cast<Constant>(To);
     Values.push_back(Val);
   }
-  
+
   Constant *Replacement = ConstantArray::get(getType(), Values);
   assert(Replacement != this && "I didn't contain From!");
 
@@ -498,9 +498,9 @@
     uncheckedReplaceAllUsesWith(Replacement);
   else
     replaceAllUsesWith(Replacement);
-  
+
   // Delete the old constant!
-  destroyConstant();  
+  destroyConstant();
 }
 
 void ConstantStruct::replaceUsesOfWithOnConstant(Value *From, Value *To,
@@ -514,7 +514,7 @@
     if (Val == From) Val = cast<Constant>(To);
     Values.push_back(Val);
   }
-  
+
   Constant *Replacement = ConstantStruct::get(getType(), Values);
   assert(Replacement != this && "I didn't contain From!");
 
@@ -523,7 +523,7 @@
     uncheckedReplaceAllUsesWith(Replacement);
   else
     replaceAllUsesWith(Replacement);
-  
+
   // Delete the old constant!
   destroyConstant();
 }
@@ -539,7 +539,7 @@
     if (Val == From) Val = cast<Constant>(To);
     Values.push_back(Val);
   }
-  
+
   Constant *Replacement = ConstantPacked::get(getType(), Values);
   assert(Replacement != this && "I didn't contain From!");
 
@@ -548,9 +548,9 @@
     uncheckedReplaceAllUsesWith(Replacement);
   else
     replaceAllUsesWith(Replacement);
-  
+
   // Delete the old constant!
-  destroyConstant();  
+  destroyConstant();
 }
 
 void ConstantExpr::replaceUsesOfWithOnConstant(Value *From, Value *ToV,
@@ -564,7 +564,7 @@
     Constant *Pointer = getOperand(0);
     Indices.reserve(getNumOperands()-1);
     if (Pointer == From) Pointer = To;
-    
+
     for (unsigned i = 1, e = getNumOperands(); i != e; ++i) {
       Constant *Val = getOperand(i);
       if (Val == From) Val = To;
@@ -592,7 +592,7 @@
     assert(0 && "Unknown ConstantExpr type!");
     return;
   }
-  
+
   assert(Replacement != this && "I didn't contain From!");
 
   // Everyone using this now uses the replacement...
@@ -600,7 +600,7 @@
     uncheckedReplaceAllUsesWith(Replacement);
   else
     replaceAllUsesWith(Replacement);
-  
+
   // Delete the old constant!
   destroyConstant();
 }
@@ -620,7 +620,7 @@
       return new ConstantClass(Ty, V);
     }
   };
-  
+
   template<class ConstantClass, class TypeClass>
   struct ConvertConstantType {
     static void convert(ConstantClass *OldC, const TypeClass *NewTy) {
@@ -683,7 +683,7 @@
       }
       return Result;
     }
-    
+
     void remove(ConstantClass *CP) {
       MapIterator I = Map.find(MapKey((TypeClass*)CP->getRawType(),
                                       getValType(CP)));
@@ -708,14 +708,14 @@
           // Yes, we are removing the representative entry for this type.
           // See if there are any other entries of the same type.
           MapIterator TmpIt = ATMEntryIt;
-          
+
           // First check the entry before this one...
           if (TmpIt != Map.begin()) {
             --TmpIt;
             if (TmpIt->first.first != Ty) // Not the same type, move back...
               ++TmpIt;
           }
-          
+
           // If we didn't find the same type, try to move forward...
           if (TmpIt == ATMEntryIt) {
             ++TmpIt;
@@ -735,12 +735,12 @@
           }
         }
       }
-      
+
       Map.erase(I);
     }
 
     void refineAbstractType(const DerivedType *OldTy, const Type *NewTy) {
-      typename AbstractTypeMapTy::iterator I = 
+      typename AbstractTypeMapTy::iterator I =
         AbstractTypeMap.find(cast<TypeClass>(OldTy));
 
       assert(I != AbstractTypeMap.end() &&
@@ -995,14 +995,14 @@
         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, 
+static ValueMap<std::vector<Constant*>, StructType,
                 ConstantStruct> StructConstants;
 
 static std::vector<Constant*> getValType(ConstantStruct *CS) {
@@ -1197,9 +1197,9 @@
         return new BinaryConstantExpr(V.first, V.second[0], V.second[1]);
       if (V.first == Instruction::Select)
         return new SelectConstantExpr(V.second[0], V.second[1], V.second[2]);
-      
+
       assert(V.first == Instruction::GetElementPtr && "Invalid ConstantExpr!");
-      
+
       std::vector<Constant*> IdxList(V.second.begin()+1, V.second.end());
       return new GetElementPtrConstantExpr(V.second[0], IdxList, Ty);
     }
@@ -1230,12 +1230,12 @@
                                   OldC->getOperand(1));
         break;
       case Instruction::GetElementPtr:
-        // Make everyone now use a constant of the new type... 
+        // Make everyone now use a constant of the new type...
         std::vector<Value*> Idx(OldC->op_begin()+1, OldC->op_end());
         New = ConstantExpr::getGetElementPtrTy(NewTy, OldC->getOperand(0), Idx);
         break;
       }
-      
+
       assert(New != OldC && "Didn't replace constant??");
       OldC->uncheckedReplaceAllUsesWith(New);
       OldC->destroyConstant();    // This constant is now dead, destroy it.
@@ -1333,7 +1333,7 @@
   case Instruction::Mul: case Instruction::Div:
   case Instruction::Rem:
     assert(C1->getType() == C2->getType() && "Op types should be identical!");
-    assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint()) && 
+    assert((C1->getType()->isInteger() || C1->getType()->isFloatingPoint()) &&
            "Tried to create an arithmetic operation on a non-arithmetic type!");
     break;
   case Instruction::And:
@@ -1471,7 +1471,7 @@
   UndefValueConstants.clear(Constants);
   ExprConstants.clear(Constants);
 
-  for (std::vector<Constant *>::iterator I = Constants.begin(), 
+  for (std::vector<Constant *>::iterator I = Constants.begin(),
        E = Constants.end(); I != E; ++I)
     (*I)->dropAllReferences();
   for (std::vector<Constant *>::iterator I = Constants.begin(),


Index: llvm/lib/VMCore/Dominators.cpp
diff -u llvm/lib/VMCore/Dominators.cpp:1.60 llvm/lib/VMCore/Dominators.cpp:1.61
--- llvm/lib/VMCore/Dominators.cpp:1.60	Mon Dec  6 22:03:45 2004
+++ llvm/lib/VMCore/Dominators.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===- Dominators.cpp - Dominator Calculation -----------------------------===//
-// 
+//
 //                     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 simple dominator construction algorithms for finding
@@ -74,7 +74,7 @@
 
   Compress(VAncestor, VAInfo);
 
-  BasicBlock *VAncestorLabel = VAInfo.Label; 
+  BasicBlock *VAncestorLabel = VAInfo.Label;
   BasicBlock *VLabel = VInfo.Label;
   if (Info[VAncestorLabel].Semi < Info[VLabel].Semi)
     VInfo.Label = VAncestorLabel;
@@ -115,10 +115,10 @@
   unsigned WLabelSemi = Info[WLabel].Semi;
   BasicBlock *S = W;
   InfoRec *SInfo = &Info[S];
-  
+
   BasicBlock *SChild = SInfo->Child;
   InfoRec *SChildInfo = &Info[SChild];
-  
+
   while (WLabelSemi < Info[SChildInfo->Label].Semi) {
     BasicBlock *SChildChild = SChildInfo->Child;
     if (SInfo->Size+Info[SChildChild].Size >= 2*SChildInfo->Size) {
@@ -133,17 +133,17 @@
       SChildInfo = &Info[SChild];
     }
   }
-  
+
   InfoRec &VInfo = Info[V];
   SInfo->Label = WLabel;
-  
+
   assert(V != W && "The optimization here will not work in this case!");
   unsigned WSize = WInfo.Size;
   unsigned VSize = (VInfo.Size += WSize);
-  
+
   if (VSize < 2*WSize)
     std::swap(S, VInfo.Child);
-  
+
   while (S) {
     SInfo = &Info[S];
     SInfo->Ancestor = V;
@@ -161,7 +161,7 @@
   Roots.push_back(Root);
 
   Vertex.push_back(0);
-  
+
   // Step #1: Number blocks in depth-first order and initialize variables used
   // in later stages of the algorithm.
   unsigned N = 0;
@@ -179,7 +179,7 @@
         if (SemiU < WInfo.Semi)
           WInfo.Semi = SemiU;
       }
-    
+
     Info[Vertex[WInfo.Semi]].Bucket.push_back(W);
 
     BasicBlock *WParent = WInfo.Parent;
@@ -240,11 +240,11 @@
 bool DominatorSetBase::dominates(Instruction *A, Instruction *B) const {
   BasicBlock *BBA = A->getParent(), *BBB = B->getParent();
   if (BBA != BBB) return dominates(BBA, BBB);
-  
+
   // Loop through the basic block until we find A or B.
   BasicBlock::iterator I = BBA->begin();
   for (; &*I != A && &*I != B; ++I) /*empty*/;
-  
+
   // A dominates B if it is found first in the basic block...
   return &*I == A;
 }
@@ -275,8 +275,8 @@
       DomSetType &DS = Doms[I];
       assert(DS.empty() && "Domset already filled in for this block?");
       DS.insert(I);  // Blocks always dominate themselves
-      
-      // Insert all dominators into the set... 
+
+      // Insert all dominators into the set...
       while (IDom) {
         // If we have already computed the dominator sets for our immediate
         // dominator, just use it instead of walking all the way up to the root.
@@ -333,7 +333,7 @@
 
 // DominatorTreeBase::reset - Free all of the tree node memory.
 //
-void DominatorTreeBase::reset() { 
+void DominatorTreeBase::reset() {
   for (NodeMapType::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I)
     delete I->second;
   Nodes.clear();
@@ -364,7 +364,7 @@
   // immediate dominator.
   BasicBlock *IDom = getAnalysis<ImmediateDominators>()[BB];
   Node *IDomNode = getNodeForBlock(IDom);
-    
+
   // Add a new tree node for this BasicBlock, and link it as a child of
   // IDomNode
   return BBNode = IDomNode->addChild(new Node(BB, IDomNode));
@@ -403,7 +403,7 @@
 static void PrintDomTree(const DominatorTreeBase::Node *N, std::ostream &o,
                          unsigned Lev) {
   o << std::string(2*Lev, ' ') << "[" << Lev << "] " << N;
-  for (DominatorTreeBase::Node::const_iterator I = N->begin(), E = N->end(); 
+  for (DominatorTreeBase::Node::const_iterator I = N->begin(), E = N->end();
        I != E; ++I)
     PrintDomTree(*I, o, Lev+1);
 }
@@ -423,7 +423,7 @@
 G("domfrontier", "Dominance Frontier Construction", true);
 
 const DominanceFrontier::DomSetType &
-DominanceFrontier::calculate(const DominatorTree &DT, 
+DominanceFrontier::calculate(const DominatorTree &DT,
                              const DominatorTree::Node *Node) {
   // Loop over CFG successors to calculate DFlocal[Node]
   BasicBlock *BB = Node->getBlock();


Index: llvm/lib/VMCore/Function.cpp
diff -u llvm/lib/VMCore/Function.cpp:1.91 llvm/lib/VMCore/Function.cpp:1.92
--- llvm/lib/VMCore/Function.cpp:1.91	Mon Mar 28 14:05:49 2005
+++ llvm/lib/VMCore/Function.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Function.cpp - Implement the Global object classes ----------------===//
-// 
+//
 //                     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 Function & GlobalVariable classes for the VMCore
@@ -51,7 +51,7 @@
 // Argument Implementation
 //===----------------------------------------------------------------------===//
 
-Argument::Argument(const Type *Ty, const std::string &Name, Function *Par) 
+Argument::Argument(const Type *Ty, const std::string &Name, Function *Par)
   : Value(Ty, Value::ArgumentVal, Name) {
   Parent = 0;
 
@@ -125,7 +125,7 @@
   return getFunctionType()->isVarArg();
 }
 
-const Type *Function::getReturnType() const { 
+const Type *Function::getReturnType() const {
   return getFunctionType()->getReturnType();
 }
 
@@ -182,7 +182,7 @@
 // 'delete' a whole class at a time, even though there may be circular
 // references... first all references are dropped, and all use counts go to
 // zero.  Then everything is deleted for real.  Note that no operations are
-// valid on an object that has "dropped all references", except operator 
+// valid on an object that has "dropped all references", except operator
 // delete.
 //
 void Function::dropAllReferences() {
@@ -204,7 +204,7 @@
     return 0;  // All intrinsics start with 'llvm.'
 
   assert(getName().size() != 5 && "'llvm.' is an invalid intrinsic name!");
-  
+
   switch (getName()[5]) {
   case 'd':
     if (getName() == "llvm.dbg.stoppoint")   return Intrinsic::dbg_stoppoint;
@@ -233,8 +233,8 @@
     if (getName() == "llvm.memset")  return Intrinsic::memset;
     break;
   case 'p':
-    if (getName() == "llvm.prefetch")  return Intrinsic::prefetch; 
-    if (getName() == "llvm.pcmarker")  return Intrinsic::pcmarker; 
+    if (getName() == "llvm.prefetch")  return Intrinsic::prefetch;
+    if (getName() == "llvm.pcmarker")  return Intrinsic::pcmarker;
     break;
   case 'r':
     if (getName() == "llvm.returnaddress")  return Intrinsic::returnaddress;


Index: llvm/lib/VMCore/Globals.cpp
diff -u llvm/lib/VMCore/Globals.cpp:1.10 llvm/lib/VMCore/Globals.cpp:1.11
--- llvm/lib/VMCore/Globals.cpp:1.10	Sat Mar  5 13:51:50 2005
+++ llvm/lib/VMCore/Globals.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Globals.cpp - Implement the Global object classes -----------------===//
-// 
+//
 //                     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 GlobalValue & GlobalVariable classes for the VMCore
@@ -23,7 +23,7 @@
 //                            GlobalValue Class
 //===----------------------------------------------------------------------===//
 
-/// This could be named "SafeToDestroyGlobalValue". It just makes sure that 
+/// This could be named "SafeToDestroyGlobalValue". It just makes sure that
 /// there are no non-constant uses of this GlobalValue. If there aren't then
 /// this and the transitive closure of the constants can be deleted. See the
 /// destructor for details.
@@ -32,7 +32,7 @@
 
   while (!C->use_empty())
     if (Constant *User = dyn_cast<Constant>(C->use_back())) {
-      if (!removeDeadConstantUsers(User)) 
+      if (!removeDeadConstantUsers(User))
         return false; // Constant wasn't dead
     } else {
       return false; // Non-constant usage;
@@ -47,7 +47,7 @@
 /// that want to check to see if a global is unused, but don't want to deal
 /// with potentially dead constants hanging off of the globals.
 ///
-/// This function returns true if the global value is now dead.  If all 
+/// This function returns true if the global value is now dead.  If all
 /// users of this global are not dead, this method may return false and
 /// leave some of them around.
 void GlobalValue::removeDeadConstantUsers() {
@@ -61,7 +61,7 @@
   }
 }
 
-/// Override destroyConstant to make sure it doesn't get called on 
+/// Override destroyConstant to make sure it doesn't get called on
 /// GlobalValue's because they shouldn't be treated like other constants.
 void GlobalValue::destroyConstant() {
   assert(0 && "You can't GV->destroyConstant()!");
@@ -111,7 +111,7 @@
                                                  bool DisableChecking) {
   // If you call this, then you better know this GVar has a constant
   // initializer worth replacing. Enforce that here.
-  assert(getNumOperands() == 1 && 
+  assert(getNumOperands() == 1 &&
          "Attempt to replace uses of Constants on a GVar with no initializer");
 
   // And, since you know it has an initializer, the From value better be
@@ -122,7 +122,7 @@
   // And, you better have a constant for the replacement value
   assert(isa<Constant>(To) &&
          "Attempt to replace GVar initializer with non-constant");
-  
+
   // Okay, preconditions out of the way, replace the constant initializer.
   this->setOperand(0, cast<Constant>(To));
 }


Index: llvm/lib/VMCore/Instruction.cpp
diff -u llvm/lib/VMCore/Instruction.cpp:1.44 llvm/lib/VMCore/Instruction.cpp:1.45
--- llvm/lib/VMCore/Instruction.cpp:1.44	Sat Mar  5 13:51:50 2005
+++ llvm/lib/VMCore/Instruction.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Instruction.cpp - Implement the Instruction 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 Instruction class for the VMCore library.
@@ -74,7 +74,7 @@
   case Invoke: return "invoke";
   case Unwind: return "unwind";
   case Unreachable: return "unreachable";
-    
+
   // Standard binary operators...
   case Add: return "add";
   case Sub: return "sub";
@@ -94,7 +94,7 @@
   case SetGT:  return "setgt";
   case SetEQ:  return "seteq";
   case SetNE:  return "setne";
-    
+
   // Memory instructions...
   case Malloc:        return "malloc";
   case Free:          return "free";
@@ -102,7 +102,7 @@
   case Load:          return "load";
   case Store:         return "store";
   case GetElementPtr: return "getelementptr";
-    
+
   // Other instructions...
   case PHI:     return "phi";
   case Cast:    return "cast";
@@ -115,7 +115,7 @@
 
   default: return "<Invalid operator> ";
   }
-  
+
   return 0;
 }
 
@@ -172,7 +172,7 @@
   switch (op) {
   case Add:
   case Mul:
-  case And: 
+  case And:
   case Or:
   case Xor:
   case SetEQ:


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.13 llvm/lib/VMCore/Instructions.cpp:1.14
--- llvm/lib/VMCore/Instructions.cpp:1.13	Tue Mar 15 23:42:00 2005
+++ llvm/lib/VMCore/Instructions.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Instructions.cpp - Implement the LLVM instructions ----------------===//
-// 
+//
 //                     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 all of the non-inline methods for the LLVM instruction
@@ -25,7 +25,7 @@
 //===----------------------------------------------------------------------===//
 
 TerminatorInst::TerminatorInst(Instruction::TermOps iType,
-                               Use *Ops, unsigned NumOps, Instruction *IB) 
+                               Use *Ops, unsigned NumOps, Instruction *IB)
   : Instruction(Type::VoidTy, iType, Ops, NumOps, "", IB) {
 }
 
@@ -104,7 +104,7 @@
   } else if (NumOps == NumOperands) {
     if (ReservedSpace == NumOps) return;
   } else {
-    return;        
+    return;
   }
 
   ReservedSpace = NumOps;
@@ -132,10 +132,10 @@
   Use *OL = OperandList = new Use[Params.size()+1];
   OL[0].init(Func, this);
 
-  const FunctionType *FTy = 
+  const FunctionType *FTy =
     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
 
-  assert((Params.size() == FTy->getNumParams() || 
+  assert((Params.size() == FTy->getNumParams() ||
           (FTy->isVarArg() && Params.size() > FTy->getNumParams())) &&
          "Calling a function with bad signature");
   for (unsigned i = 0, e = Params.size(); i != e; ++i)
@@ -148,8 +148,8 @@
   OL[0].init(Func, this);
   OL[1].init(Actual1, this);
   OL[2].init(Actual2, this);
-  
-  const FunctionType *FTy = 
+
+  const FunctionType *FTy =
     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
 
   assert((FTy->getNumParams() == 2 ||
@@ -162,8 +162,8 @@
   Use *OL = OperandList = new Use[2];
   OL[0].init(Func, this);
   OL[1].init(Actual, this);
-  
-  const FunctionType *FTy = 
+
+  const FunctionType *FTy =
     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
 
   assert((FTy->getNumParams() == 1 ||
@@ -175,23 +175,23 @@
   NumOperands = 1;
   Use *OL = OperandList = new Use[1];
   OL[0].init(Func, this);
-  
-  const FunctionType *MTy = 
+
+  const FunctionType *MTy =
     cast<FunctionType>(cast<PointerType>(Func->getType())->getElementType());
 
   assert(MTy->getNumParams() == 0 && "Calling a function with bad signature");
 }
 
-CallInst::CallInst(Value *Func, const std::vector<Value*> &Params, 
-                   const std::string &Name, Instruction *InsertBefore) 
+CallInst::CallInst(Value *Func, const std::vector<Value*> &Params,
+                   const std::string &Name, Instruction *InsertBefore)
   : Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
                                  ->getElementType())->getReturnType(),
                 Instruction::Call, 0, 0, Name, InsertBefore) {
   init(Func, Params);
 }
 
-CallInst::CallInst(Value *Func, const std::vector<Value*> &Params, 
-                   const std::string &Name, BasicBlock *InsertAtEnd) 
+CallInst::CallInst(Value *Func, const std::vector<Value*> &Params,
+                   const std::string &Name, BasicBlock *InsertAtEnd)
   : Instruction(cast<FunctionType>(cast<PointerType>(Func->getType())
                                  ->getElementType())->getReturnType(),
                 Instruction::Call, 0, 0, Name, InsertAtEnd) {
@@ -246,7 +246,7 @@
   init(Func);
 }
 
-CallInst::CallInst(const CallInst &CI) 
+CallInst::CallInst(const CallInst &CI)
   : Instruction(CI.getType(), Instruction::Call, new Use[CI.getNumOperands()],
                 CI.getNumOperands()) {
   Use *OL = OperandList;
@@ -271,13 +271,13 @@
   OL[0].init(Fn, this);
   OL[1].init(IfNormal, this);
   OL[2].init(IfException, this);
-  const FunctionType *FTy = 
+  const FunctionType *FTy =
     cast<FunctionType>(cast<PointerType>(Fn->getType())->getElementType());
-  
-  assert((Params.size() == FTy->getNumParams()) || 
+
+  assert((Params.size() == FTy->getNumParams()) ||
          (FTy->isVarArg() && Params.size() > FTy->getNumParams()) &&
          "Calling a function with bad signature");
-  
+
   for (unsigned i = 0, e = Params.size(); i != e; i++)
     OL[i+3].init(Params[i], this);
 }
@@ -302,7 +302,7 @@
   init(Fn, IfNormal, IfException, Params);
 }
 
-InvokeInst::InvokeInst(const InvokeInst &II) 
+InvokeInst::InvokeInst(const InvokeInst &II)
   : TerminatorInst(II.getType(), Instruction::Invoke,
                    new Use[II.getNumOperands()], II.getNumOperands()) {
   Use *OL = OperandList, *InOL = II.OperandList;
@@ -327,7 +327,7 @@
 
 void ReturnInst::init(Value *retVal) {
   if (retVal && retVal->getType() != Type::VoidTy) {
-    assert(!isa<BasicBlock>(retVal) && 
+    assert(!isa<BasicBlock>(retVal) &&
            "Cannot return basic block.  Probably using the incorrect ctor");
     NumOperands = 1;
     RetVal.init(retVal, this);
@@ -393,7 +393,7 @@
 
 void BranchInst::AssertOK() {
   if (isConditional())
-    assert(getCondition()->getType() == Type::BoolTy && 
+    assert(getCondition()->getType() == Type::BoolTy &&
            "May only branch on boolean predicates!");
 }
 
@@ -428,10 +428,10 @@
   else
     assert(Amt->getType() == Type::UIntTy &&
            "Malloc/Allocation array size != UIntTy!");
-  return Amt;  
+  return Amt;
 }
 
-AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, 
+AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy,
                                const std::string &Name,
                                Instruction *InsertBefore)
   : UnaryInstruction(PointerType::get(Ty), iTy, getAISize(ArraySize),
@@ -439,7 +439,7 @@
   assert(Ty != Type::VoidTy && "Cannot allocate void!");
 }
 
-AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy, 
+AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize, unsigned iTy,
                                const std::string &Name,
                                BasicBlock *InsertAtEnd)
   : UnaryInstruction(PointerType::get(Ty), iTy, getAISize(ArraySize),
@@ -492,7 +492,7 @@
 //===----------------------------------------------------------------------===//
 
 void LoadInst::AssertOK() {
-  assert(isa<PointerType>(getOperand(0)->getType()) && 
+  assert(isa<PointerType>(getOperand(0)->getType()) &&
          "Ptr must have pointer type.");
 }
 
@@ -556,7 +556,7 @@
   AssertOK();
 }
 
-StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, 
+StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
                      Instruction *InsertBefore)
   : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertBefore) {
   Ops[0].init(val, this);
@@ -565,7 +565,7 @@
   AssertOK();
 }
 
-StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile, 
+StoreInst::StoreInst(Value *val, Value *addr, bool isVolatile,
                      BasicBlock *InsertAtEnd)
   : Instruction(Type::VoidTy, Store, Ops, 2, "", InsertAtEnd) {
   Ops[0].init(val, this);
@@ -642,10 +642,10 @@
 // getIndexedType - Returns the type of the element that would be loaded with
 // a load instruction with the specified parameters.
 //
-// A null type is returned if the indices are invalid for the specified 
+// A null type is returned if the indices are invalid for the specified
 // pointer type.
 //
-const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, 
+const Type* GetElementPtrInst::getIndexedType(const Type *Ptr,
                                               const std::vector<Value*> &Idx,
                                               bool AllowCompositeLeaf) {
   if (!isa<PointerType>(Ptr)) return 0;   // Type isn't a pointer type!
@@ -657,7 +657,7 @@
       return cast<PointerType>(Ptr)->getElementType();
     else
       return 0;
- 
+
   unsigned CurIdx = 0;
   while (const CompositeType *CT = dyn_cast<CompositeType>(Ptr)) {
     if (Idx.size() == CurIdx) {
@@ -682,7 +682,7 @@
   return CurIdx == Idx.size() ? Ptr : 0;
 }
 
-const Type* GetElementPtrInst::getIndexedType(const Type *Ptr, 
+const Type* GetElementPtrInst::getIndexedType(const Type *Ptr,
                                               Value *Idx0, Value *Idx1,
                                               bool AllowCompositeLeaf) {
   const PointerType *PTy = dyn_cast<PointerType>(Ptr);
@@ -716,9 +716,9 @@
   case Rem:
     assert(getType() == LHS->getType() &&
            "Arithmetic operation should return same type as operands!");
-    assert((getType()->isInteger() || 
-            getType()->isFloatingPoint() || 
-            isa<PackedType>(getType()) ) && 
+    assert((getType()->isInteger() ||
+            getType()->isFloatingPoint() ||
+            isa<PackedType>(getType()) ) &&
           "Tried to create an arithmetic operation on a non-arithmetic type!");
     break;
   case And: case Or:
@@ -870,7 +870,7 @@
 //                             SetCondInst Class
 //===----------------------------------------------------------------------===//
 
-SetCondInst::SetCondInst(BinaryOps Opcode, Value *S1, Value *S2, 
+SetCondInst::SetCondInst(BinaryOps Opcode, Value *S1, Value *S2,
                          const std::string &Name, Instruction *InsertBefore)
   : BinaryOperator(Opcode, S1, S2, Type::BoolTy, Name, InsertBefore) {
 
@@ -878,7 +878,7 @@
   assert(getInverseCondition(Opcode));
 }
 
-SetCondInst::SetCondInst(BinaryOps Opcode, Value *S1, Value *S2, 
+SetCondInst::SetCondInst(BinaryOps Opcode, Value *S1, Value *S2,
                          const std::string &Name, BasicBlock *InsertAtEnd)
   : BinaryOperator(Opcode, S1, S2, Type::BoolTy, Name, InsertAtEnd) {
 
@@ -931,7 +931,7 @@
   OperandList[1].init(Default, this);
 }
 
-SwitchInst::SwitchInst(const SwitchInst &SI) 
+SwitchInst::SwitchInst(const SwitchInst &SI)
   : TerminatorInst(Instruction::Switch, new Use[SI.getNumOperands()],
                    SI.getNumOperands()) {
   Use *OL = OperandList, *InOL = SI.OperandList;


Index: llvm/lib/VMCore/LeakDetector.cpp
diff -u llvm/lib/VMCore/LeakDetector.cpp:1.12 llvm/lib/VMCore/LeakDetector.cpp:1.13
--- llvm/lib/VMCore/LeakDetector.cpp:1.12	Fri Nov 19 11:09:48 2004
+++ llvm/lib/VMCore/LeakDetector.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- LeakDetector.cpp - Implement LeakDetector interface ---------------===//
-// 
+//
 //                     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 LeakDetector class.


Index: llvm/lib/VMCore/Mangler.cpp
diff -u llvm/lib/VMCore/Mangler.cpp:1.16 llvm/lib/VMCore/Mangler.cpp:1.17
--- llvm/lib/VMCore/Mangler.cpp:1.16	Mon Mar 14 22:54:21 2005
+++ llvm/lib/VMCore/Mangler.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Mangler.cpp - Self-contained c/asm llvm name mangler --------------===//
-// 
+//
 //                     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.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // Unified name mangler for CWriter and assembly backends.
@@ -27,10 +27,10 @@
 
 /// makeNameProper - We don't want identifier names non-C-identifier characters
 /// in them, so mangle them as appropriate.
-/// 
+///
 std::string Mangler::makeNameProper(const std::string &X) {
   std::string Result;
-  
+
   // Mangle the first letter specially, don't allow numbers...
   if ((X[0] < 'a' || X[0] > 'z') && (X[0] < 'A' || X[0] > 'Z') && X[0] != '_')
     Result += MangleLetter(X[0]);
@@ -85,7 +85,7 @@
   } else {
     name = "ltmp_" + utostr(Count++) + "_" + utostr(getTypeID(V->getType()));
   }
-  
+
   Memo[V] = name;
   return name;
 }


Index: llvm/lib/VMCore/Module.cpp
diff -u llvm/lib/VMCore/Module.cpp:1.60 llvm/lib/VMCore/Module.cpp:1.61
--- llvm/lib/VMCore/Module.cpp:1.60	Mon Mar 14 22:54:21 2005
+++ llvm/lib/VMCore/Module.cpp	Thu Apr 21 18:46:51 2005
@@ -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.
@@ -174,7 +174,7 @@
     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 @@
 /// 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 @@
   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);


Index: llvm/lib/VMCore/ModuleProvider.cpp
diff -u llvm/lib/VMCore/ModuleProvider.cpp:1.9 llvm/lib/VMCore/ModuleProvider.cpp:1.10
--- llvm/lib/VMCore/ModuleProvider.cpp:1.9	Wed Jan 21 16:54:50 2004
+++ llvm/lib/VMCore/ModuleProvider.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- ModuleProvider.cpp - Base implementation for module providers -----===//
-// 
+//
 //                     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.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // Minimal implementation of the abstract interface for providing a module.


Index: llvm/lib/VMCore/Pass.cpp
diff -u llvm/lib/VMCore/Pass.cpp:1.64 llvm/lib/VMCore/Pass.cpp:1.65
--- llvm/lib/VMCore/Pass.cpp:1.64	Mon Dec  6 22:03:45 2004
+++ llvm/lib/VMCore/Pass.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===- Pass.cpp - LLVM Pass Infrastructure Implementation -----------------===//
-// 
+//
 //                     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 LLVM Pass infrastructure.  It is primarily
@@ -90,12 +90,12 @@
 // is a simple Pimpl class that wraps the PassManagerT template. It
 // is like PassManager, but only deals in FunctionPasses.
 //
-FunctionPassManager::FunctionPassManager(ModuleProvider *P) : 
+FunctionPassManager::FunctionPassManager(ModuleProvider *P) :
   PM(new PassManagerT<Function>()), MP(P) {}
 FunctionPassManager::~FunctionPassManager() { delete PM; }
 void FunctionPassManager::add(FunctionPass *P) { PM->add(P); }
 void FunctionPassManager::add(ImmutablePass *IP) { PM->add(IP); }
-bool FunctionPassManager::run(Function &F) { 
+bool FunctionPassManager::run(Function &F) {
   try {
     MP->materializeFunction(&F);
   } catch (std::string& errstr) {
@@ -149,7 +149,7 @@
 void PMDebug::PrintPassInformation(unsigned Depth, const char *Action,
                                    Pass *P, Module *M) {
   if (PassDebugging >= Executions) {
-    std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" 
+    std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
               << P->getPassName();
     if (M) std::cerr << "' on Module '" << M->getModuleIdentifier() << "'\n";
     std::cerr << "'...\n";
@@ -159,7 +159,7 @@
 void PMDebug::PrintPassInformation(unsigned Depth, const char *Action,
                                    Pass *P, Function *F) {
   if (PassDebugging >= Executions) {
-    std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" 
+    std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
               << P->getPassName();
     if (F) std::cerr << "' on Function '" << F->getName();
     std::cerr << "'...\n";
@@ -169,7 +169,7 @@
 void PMDebug::PrintPassInformation(unsigned Depth, const char *Action,
                                    Pass *P, BasicBlock *BB) {
   if (PassDebugging >= Executions) {
-    std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '" 
+    std::cerr << (void*)P << std::string(Depth*2+1, ' ') << Action << " '"
               << P->getPassName();
     if (BB) std::cerr << "' on BasicBlock '" << BB->getName();
     std::cerr << "'...\n";
@@ -244,11 +244,11 @@
 //
 bool FunctionPass::runOnModule(Module &M) {
   bool Changed = doInitialization(M);
-  
+
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
     if (!I->isExternal())      // Passes are not run on external functions!
     Changed |= runOnFunction(*I);
-  
+
   return Changed | doFinalization(M);
 }
 
@@ -441,7 +441,7 @@
 
     if (AGI.DefaultImpl == ImplementationInfo)
       AGI.DefaultImpl = 0;
-    
+
     AGI.Implementations.erase(ImplementationInfo);
 
     // Last member of this analysis group? Unregister PassInfo, delete map entry


Index: llvm/lib/VMCore/PassManagerT.h
diff -u llvm/lib/VMCore/PassManagerT.h:1.56 llvm/lib/VMCore/PassManagerT.h:1.57
--- llvm/lib/VMCore/PassManagerT.h:1.56	Fri Jan 14 09:53:26 2005
+++ llvm/lib/VMCore/PassManagerT.h	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===- PassManagerT.h - Container for Passes --------------------*- C++ -*-===//
-// 
+//
 //                     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 defines the PassManagerT class.  This class is used to hold,
@@ -131,7 +131,7 @@
 
 //===----------------------------------------------------------------------===//
 // PassManagerT - Container object for passes.  The PassManagerT destructor
-// deletes all passes contained inside of the PassManagerT, so you shouldn't 
+// deletes all passes contained inside of the PassManagerT, so you shouldn't
 // delete passes manually, and all passes should be dynamically allocated.
 //
 template<typename UnitType>
@@ -147,7 +147,7 @@
   friend SubPassClass;
 #else
   friend class PassManagerTraits<UnitType>::PassClass;
-  friend class PassManagerTraits<UnitType>::SubPassClass;  
+  friend class PassManagerTraits<UnitType>::SubPassClass;
 #endif
   friend class PassManagerTraits<UnitType>;
   friend class ImmutablePass;
@@ -219,7 +219,7 @@
     // Run all of the passes
     for (unsigned i = 0, e = Passes.size(); i < e; ++i) {
       PassClass *P = Passes[i];
-      
+
       PMDebug::PrintPassInformation(getDepth(), "Executing Pass", P, M);
 
       // Get information about what analyses the pass uses...
@@ -236,7 +236,7 @@
       P->AnalysisImpls.clear();
       P->AnalysisImpls.reserve(AnUsage.getRequiredSet().size());
       for (std::vector<const PassInfo *>::const_iterator
-             I = AnUsage.getRequiredSet().begin(), 
+             I = AnUsage.getRequiredSet().begin(),
              E = AnUsage.getRequiredSet().end(); I != E; ++I) {
         Pass *Impl = getAnalysisOrNullUp(*I);
         if (Impl == 0) {
@@ -353,7 +353,7 @@
       const PassInfo *IPID = ImmutablePasses[i]->getPassInfo();
       if (IPID == ID)
         return ImmutablePasses[i];
-      
+
       // This pass is the current implementation of all of the interfaces it
       // implements as well.
       //
@@ -420,14 +420,14 @@
       if (Parent) {
         Parent->markPassUsed(P, this);
       } else {
-        assert(getAnalysisOrNullUp(P) && 
+        assert(getAnalysisOrNullUp(P) &&
                dynamic_cast<ImmutablePass*>(getAnalysisOrNullUp(P)) &&
                "Pass available but not found! "
                "Perhaps this is a module pass requiring a function pass?");
       }
     }
   }
-  
+
   // Return the number of parent PassManagers that exist
   virtual unsigned getDepth() const {
     if (Parent == 0) return 0;
@@ -514,8 +514,8 @@
     //const std::vector<AnalysisID> &ProvidedSet = AnUsage.getProvidedSet();
     if (Batcher /*&& ProvidedSet.empty()*/)
       closeBatcher();                     // This pass cannot be batched!
-    
-    // Set the Resolver instance variable in the Pass so that it knows where to 
+
+    // Set the Resolver instance variable in the Pass so that it knows where to
     // find this object...
     //
     setAnalysisResolver(P, this);
@@ -559,7 +559,7 @@
     // For now assume that our results are never used...
     LastUseOf[P] = P;
   }
-  
+
   // For FunctionPass subclasses, we must be sure to batch the FunctionPass's
   // together in a BatcherClass object so that all of the analyses are run
   // together a function at a time.
@@ -588,7 +588,7 @@
       return;
     }
 
-    // Set the Resolver instance variable in the Pass so that it knows where to 
+    // Set the Resolver instance variable in the Pass so that it knows where to
     // find this object...
     //
     setAnalysisResolver(IP, this);
@@ -601,7 +601,7 @@
     //
     IP->AnalysisImpls.clear();
     IP->AnalysisImpls.reserve(AU.getRequiredSet().size());
-    for (std::vector<const PassInfo *>::const_iterator 
+    for (std::vector<const PassInfo *>::const_iterator
            I = AU.getRequiredSet().begin(),
            E = AU.getRequiredSet().end(); I != E; ++I) {
       Pass *Impl = getAnalysisOrNullUp(*I);
@@ -616,7 +616,7 @@
       }
       IP->AnalysisImpls.push_back(std::make_pair(*I, Impl));
     }
-    
+
     // Initialize the immutable pass...
     IP->initializePass();
   }
@@ -642,7 +642,7 @@
   typedef PassManagerT<Module> SubPassClass;
 
   // BatcherClass - The type to use for collation of subtypes... This class is
-  // never instantiated for the PassManager<BasicBlock>, but it must be an 
+  // never instantiated for the PassManager<BasicBlock>, but it must be an
   // instance of PassClass to typecheck.
   //
   typedef PassClass BatcherClass;


Index: llvm/lib/VMCore/SymbolTable.cpp
diff -u llvm/lib/VMCore/SymbolTable.cpp:1.58 llvm/lib/VMCore/SymbolTable.cpp:1.59
--- llvm/lib/VMCore/SymbolTable.cpp:1.58	Sat Mar  5 23:55:40 2005
+++ llvm/lib/VMCore/SymbolTable.cpp	Thu Apr 21 18:46:51 2005
@@ -1,11 +1,11 @@
 //===-- SymbolTable.cpp - Implement the SymbolTable class -----------------===//
-// 
+//
 //                     The LLVM Compiler Infrastructure
 //
 // This file was developed by the LLVM research group and revised by Reid
-// Spencer. It is distributed under the University of Illinois Open Source 
+// Spencer. It is distributed under the University of Illinois Open Source
 // License. See LICENSE.TXT for details.
-// 
+//
 //===----------------------------------------------------------------------===//
 //
 // This file implements the SymbolTable class for the VMCore library.
@@ -31,7 +31,7 @@
       cast<DerivedType>(TI->second)->removeAbstractTypeUser(this);
   }
 
- // TODO: FIXME: BIG ONE: This doesn't unreference abstract types for the 
+ // TODO: FIXME: BIG ONE: This doesn't unreference abstract types for the
  // planes that could still have entries!
 
 #ifndef NDEBUG   // Only do this in -g mode...
@@ -45,7 +45,7 @@
         LeftoverValues = false;
       }
   }
-  
+
   assert(LeftoverValues && "Values remain in symbol table!");
 #endif
 }
@@ -194,7 +194,7 @@
 
 #if DEBUG_SYMBOL_TABLE
   dump();
-  std::cerr << " Inserting definition: " << Name << ": " 
+  std::cerr << " Inserting definition: " << Name << ": "
             << VTy->getDescription() << "\n";
 #endif
 
@@ -243,7 +243,7 @@
 
 #if DEBUG_SYMBOL_TABLE
   dump();
-  std::cerr << " Inserting type: " << UniqueName << ": " 
+  std::cerr << " Inserting type: " << UniqueName << ": "
             << T->getDescription() << "\n";
 #endif
 
@@ -282,7 +282,7 @@
     remove(TI++);
     RemovedSymbol = true;
   }
- 
+
   return RemovedSymbol;
 }
 
@@ -299,7 +299,7 @@
     plane_iterator NewTypeIt = pmap.find(NewType);
     if (NewTypeIt == pmap.end()) {      // If no plane exists, add one
       NewTypeIt = pmap.insert(make_pair(NewType, ValueMap())).first;
-      
+
       if (NewType->isAbstract()) {
         cast<DerivedType>(NewType)->addAbstractTypeUser(this);
 #if DEBUG_ABSTYPE
@@ -338,7 +338,7 @@
           // Ok we have two external global values.  Make all uses of the new
           // one use the old one...
           NewGV->uncheckedReplaceAllUsesWith(ExistGV);
-          
+
           // Update NewGV's name, we're about the remove it from the symbol
           // table.
           NewGV->Name = "";
@@ -387,7 +387,7 @@
       std::cerr << "Removing type " << OldType->getDescription() << "\n";
 #endif
       OldType->removeAbstractTypeUser(this);
-        
+
       I->second = (Type*)NewType;  // TODO FIXME when types aren't const
       if (NewType->isAbstract()) {
 #if DEBUG_ABSTYPE


Index: llvm/lib/VMCore/SymbolTableListTraitsImpl.h
diff -u llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.6 llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.7
--- llvm/lib/VMCore/SymbolTableListTraitsImpl.h:1.6	Tue Nov 11 16:41:34 2003
+++ llvm/lib/VMCore/SymbolTableListTraitsImpl.h	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- llvm/SymbolTableListTraitsImpl.h - Implementation ------*- C++ -*--===//
-// 
+//
 //                     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 stickier parts of the SymbolTableListTraits class,


Index: llvm/lib/VMCore/Type.cpp
diff -u llvm/lib/VMCore/Type.cpp:1.123 llvm/lib/VMCore/Type.cpp:1.124
--- llvm/lib/VMCore/Type.cpp:1.123	Wed Mar  9 11:34:27 2005
+++ llvm/lib/VMCore/Type.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Type.cpp - Implement the Type 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 Type class for the VMCore library.
@@ -103,13 +103,13 @@
   switch (getTypeID()) {
   default:
     assert(isInteger()&&"Type::getUnsignedVersion is only valid for integers!");
-  case Type::UByteTyID:   
+  case Type::UByteTyID:
   case Type::SByteTyID:   return Type::UByteTy;
-  case Type::UShortTyID:  
+  case Type::UShortTyID:
   case Type::ShortTyID:   return Type::UShortTy;
-  case Type::UIntTyID:    
+  case Type::UIntTyID:
   case Type::IntTyID:     return Type::UIntTy;
-  case Type::ULongTyID:   
+  case Type::ULongTyID:
   case Type::LongTyID:    return Type::ULongTy;
   }
 }
@@ -120,13 +120,13 @@
   switch (getTypeID()) {
   default:
     assert(isInteger() && "Type::getSignedVersion is only valid for integers!");
-  case Type::UByteTyID:   
+  case Type::UByteTyID:
   case Type::SByteTyID:   return Type::SByteTy;
-  case Type::UShortTyID:  
+  case Type::UShortTyID:
   case Type::ShortTyID:   return Type::ShortTy;
-  case Type::UIntTyID:    
+  case Type::UIntTyID:
   case Type::IntTyID:     return Type::IntTy;
-  case Type::ULongTyID:   
+  case Type::ULongTyID:
   case Type::LongTyID:    return Type::LongTy;
   }
 }
@@ -167,7 +167,7 @@
 /// algorithm for when a type is being forwarded to another type.
 const Type *Type::getForwardedTypeInternal() const {
   assert(ForwardType && "This type is not being forwarded to another type!");
-  
+
   // Check to see if the forwarded type has been forwarded on.  If so, collapse
   // the forwarding links.
   const Type *RealForwardedType = ForwardType->getForwardedType();
@@ -181,7 +181,7 @@
 
   // Now drop the old reference.  This could cause ForwardType to get deleted.
   cast<DerivedType>(ForwardType)->dropRef();
-  
+
   // Return the updated type.
   ForwardType = RealForwardedType;
   return ForwardType;
@@ -201,28 +201,28 @@
     AbstractTypeDescriptions.insert(std::make_pair(Ty, Desc));
     return Desc;
   }
-  
+
   if (!Ty->isAbstract()) {                       // Base case for the recursion
     std::map<const Type*, std::string>::iterator I =
       ConcreteTypeDescriptions.find(Ty);
     if (I != ConcreteTypeDescriptions.end()) return I->second;
   }
-      
+
   // Check to see if the Type is already on the stack...
   unsigned Slot = 0, CurSize = TypeStack.size();
   while (Slot < CurSize && TypeStack[Slot] != Ty) ++Slot; // Scan for type
-  
-  // This is another base case for the recursion.  In this case, we know 
+
+  // This is another base case for the recursion.  In this case, we know
   // that we have looped back to a type that we have previously visited.
   // Generate the appropriate upreference to handle this.
-  // 
+  //
   if (Slot < CurSize)
     return "\\" + utostr(CurSize-Slot);         // Here's the upreference
 
   // Recursive case: derived types...
   std::string Result;
   TypeStack.push_back(Ty);    // Add us to the stack..
-      
+
   switch (Ty->getTypeID()) {
   case Type::FunctionTyID: {
     const FunctionType *FTy = cast<FunctionType>(Ty);
@@ -289,7 +289,7 @@
                                           const Type *Ty) {
   std::map<const Type*, std::string>::iterator I = Map.find(Ty);
   if (I != Map.end()) return I->second;
-    
+
   std::vector<const Type *> TypeStack;
   std::string Result = getTypeDescription(Ty, TypeStack);
   return Map[Ty] = Result;
@@ -366,11 +366,11 @@
 //===----------------------------------------------------------------------===//
 
 FunctionType::FunctionType(const Type *Result,
-                           const std::vector<const Type*> &Params, 
-                           bool IsVarArgs) : DerivedType(FunctionTyID), 
+                           const std::vector<const Type*> &Params,
+                           bool IsVarArgs) : DerivedType(FunctionTyID),
                                              isVarArgs(IsVarArgs) {
   assert((Result->isFirstClassType() || Result == Type::VoidTy ||
-         isa<OpaqueType>(Result)) && 
+         isa<OpaqueType>(Result)) &&
          "LLVM functions cannot return aggregates");
   bool isAbstract = Result->isAbstract();
   ContainedTys.reserve(Params.size()+1);
@@ -415,7 +415,7 @@
   NumElements = NumEl;
 
   assert(NumEl > 0 && "NumEl of a PackedType must be greater than 0");
-  assert((ElType->isIntegral() || ElType->isFloatingPoint()) && 
+  assert((ElType->isIntegral() || ElType->isFloatingPoint()) &&
          "Elements of a PackedType must be a primitive type");
 }
 
@@ -439,7 +439,7 @@
   if (!ContainedTys.empty()) {
     while (ContainedTys.size() > 1)
       ContainedTys.pop_back();
-    
+
     // The type must stay abstract.  To do this, we insert a pointer to a type
     // that will never get resolved, thus will always be abstract.
     static Type *AlwaysOpaqueTy = OpaqueType::get();
@@ -463,15 +463,15 @@
   template <> struct GraphTraits<TypePromotionGraph> {
     typedef Type NodeType;
     typedef Type::subtype_iterator ChildIteratorType;
-    
+
     static inline NodeType *getEntryNode(TypePromotionGraph G) { return G.Ty; }
-    static inline ChildIteratorType child_begin(NodeType *N) { 
+    static inline ChildIteratorType child_begin(NodeType *N) {
       if (N->isAbstract())
-        return N->subtype_begin(); 
+        return N->subtype_begin();
       else           // No need to process children of concrete types.
-        return N->subtype_end(); 
+        return N->subtype_end();
     }
-    static inline ChildIteratorType child_end(NodeType *N) { 
+    static inline ChildIteratorType child_end(NodeType *N) {
       return N->subtype_end();
     }
   };
@@ -507,12 +507,12 @@
             // abstract unless there is a non-SCC abstract type.
             if (std::find(SCC.begin(), SCC.end(), *CI) == SCC.end())
               return;               // Not going to be concrete, sorry.
-      
+
       // Okay, we just discovered this whole SCC is now concrete, mark it as
       // such!
       for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
         assert(SCC[i]->isAbstract() && "Why are we processing concrete types?");
-        
+
         SCC[i]->setAbstract(false);
       }
 
@@ -606,7 +606,7 @@
   if (!VisitedTypes.insert(CurTy).second)
     return false;  // Already been here.
 
-  for (Type::subtype_iterator I = CurTy->subtype_begin(), 
+  for (Type::subtype_iterator I = CurTy->subtype_begin(),
        E = CurTy->subtype_end(); I != E; ++I)
     if (AbstractTypeHasCycleThrough(TargetTy, *I, VisitedTypes))
       return true;
@@ -620,7 +620,7 @@
   if (!VisitedTypes.insert(CurTy).second)
     return false;  // Already been here.
 
-  for (Type::subtype_iterator I = CurTy->subtype_begin(), 
+  for (Type::subtype_iterator I = CurTy->subtype_begin(),
        E = CurTy->subtype_end(); I != E; ++I)
     if (ConcreteTypeHasCycleThrough(TargetTy, *I, VisitedTypes))
       return true;
@@ -633,7 +633,7 @@
   std::set<const Type*> VisitedTypes;
 
   if (Ty->isAbstract()) {  // Optimized case for abstract types.
-    for (Type::subtype_iterator I = Ty->subtype_begin(), E = Ty->subtype_end(); 
+    for (Type::subtype_iterator I = Ty->subtype_begin(), E = Ty->subtype_end();
          I != E; ++I)
       if (AbstractTypeHasCycleThrough(Ty, *I, VisitedTypes))
         return true;
@@ -670,7 +670,7 @@
 
 private:
   void clear(std::vector<Type *> &DerivedTypes) {
-    for (typename std::map<ValType, PATypeHolder>::iterator I = Map.begin(), 
+    for (typename std::map<ValType, PATypeHolder>::iterator I = Map.begin(),
          E = Map.end(); I != E; ++I)
       DerivedTypes.push_back(I->second.get());
     TypesByHash.clear();
@@ -694,7 +694,7 @@
   }
 
   void RemoveFromTypesByHash(unsigned Hash, const Type *Ty) {
-    std::multimap<unsigned, PATypeHolder>::iterator I = 
+    std::multimap<unsigned, PATypeHolder>::iterator I =
       TypesByHash.lower_bound(Hash);
     while (I->second != Ty) {
       ++I;
@@ -736,7 +736,7 @@
       }
 
     unsigned TypeHash = ValType::hashTypeStructure(Ty);
-    
+
     // If there are no cycles going through this node, we can do a simple,
     // efficient lookup in the map, instead of an inefficient nasty linear
     // lookup.
@@ -756,7 +756,7 @@
         Ty->refineAbstractTypeTo(NewTy);
         return;
       }
-      
+
     } else {
       // Now we check to see if there is an existing entry in the table which is
       // structurally identical to the newly refined type.  If so, this type
@@ -770,7 +770,7 @@
           if (TypesEqual(Ty, I->second)) {
             assert(Ty->isAbstract() && "Replacing a non-abstract type?");
             TypeClass *NewTy = cast<TypeClass>((Type*)I->second.get());
-            
+
             if (Entry == E) {
               // Find the location of Ty in the TypesByHash structure.
               while (I->second != Ty) {
@@ -785,7 +785,7 @@
             return;
           }
         } else {
-          // Remember the position of 
+          // Remember the position of
           Entry = I;
         }
       }
@@ -807,14 +807,14 @@
     if (Ty->isAbstract())
       Ty->PromoteAbstractToConcrete();
   }
-  
+
   void print(const char *Arg) const {
 #ifdef DEBUG_MERGE_TYPES
     std::cerr << "TypeMap<>::" << Arg << " table contents:\n";
     unsigned i = 0;
     for (typename std::map<ValType, PATypeHolder>::const_iterator I
            = Map.begin(), E = Map.end(); I != E; ++I)
-      std::cerr << " " << (++i) << ". " << (void*)I->second.get() << " " 
+      std::cerr << " " << (++i) << ". " << (void*)I->second.get() << " "
                 << *I->second.get() << "\n";
 #endif
   }
@@ -879,7 +879,7 @@
 
 
 // FunctionType::get - The factory function for the FunctionType class...
-FunctionType *FunctionType::get(const Type *ReturnType, 
+FunctionType *FunctionType::get(const Type *ReturnType,
                                 const std::vector<const Type*> &Params,
                                 bool isVarArg) {
   FunctionValType VT(ReturnType, Params, isVarArg);
@@ -1010,7 +1010,7 @@
     ElTypes.reserve(ST->getNumElements());
     for (unsigned i = 0, e = ST->getNumElements(); i != e; ++i)
       ElTypes.push_back(ST->getElementType(i));
-    
+
     return StructValType(ElTypes);
   }
 
@@ -1121,12 +1121,12 @@
   assert(i < AbstractTypeUsers.size() && "Index out of range!");  // Wraparound?
 
   AbstractTypeUsers.erase(AbstractTypeUsers.begin()+i);
-      
+
 #ifdef DEBUG_MERGE_TYPES
   std::cerr << "  remAbstractTypeUser[" << (void*)this << ", "
             << *this << "][" << i << "] User = " << U << "\n";
 #endif
-    
+
   if (AbstractTypeUsers.empty() && getRefCount() == 0 && isAbstract()) {
 #ifdef DEBUG_MERGE_TYPES
     std::cerr << "DELETEing unused abstract type: <" << *this
@@ -1223,7 +1223,7 @@
            "AbstractTypeUser did not remove itself from the use list!");
   }
 }
-  
+
 
 
 
@@ -1333,7 +1333,7 @@
   ArrayTypes.clear(DerivedTypes);
   PackedTypes.clear(DerivedTypes);
 
-  for(std::vector<Type *>::iterator I = DerivedTypes.begin(), 
+  for(std::vector<Type *>::iterator I = DerivedTypes.begin(),
       E = DerivedTypes.end(); I != E; ++I)
     (*I)->ContainedTys.clear();
   for(std::vector<Type *>::iterator I = DerivedTypes.begin(),


Index: llvm/lib/VMCore/Value.cpp
diff -u llvm/lib/VMCore/Value.cpp:1.56 llvm/lib/VMCore/Value.cpp:1.57
--- llvm/lib/VMCore/Value.cpp:1.56	Sat Mar  5 20:14:28 2005
+++ llvm/lib/VMCore/Value.cpp	Thu Apr 21 18:46:51 2005
@@ -1,13 +1,13 @@
 //===-- Value.cpp - Implement the Value 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 Value and User classes. 
+// This file implements the Value and User classes.
 //
 //===----------------------------------------------------------------------===//
 
@@ -34,7 +34,7 @@
   : SubclassID(scid), SubclassData(0), Ty(checkType(ty)),
     UseList(0), Name(name) {
   if (!isa<Constant>(this) && !isa<BasicBlock>(this))
-    assert((Ty->isFirstClassType() || Ty == Type::VoidTy || 
+    assert((Ty->isFirstClassType() || Ty == Type::VoidTy ||
            isa<OpaqueType>(ty)) &&
            "Cannot create non-first-class values except for constants!");
   if (ty == Type::VoidTy)
@@ -46,7 +46,7 @@
   // Check to make sure that there are no uses of this value that are still
   // around when the value is destroyed.  If there are, then we have a dangling
   // reference and something is wrong.  This code is here to print out what is
-  // still being referenced.  The value in question should be printed as 
+  // still being referenced.  The value in question should be printed as
   // a <badref>
   //
   if (use_begin() != use_end()) {
@@ -142,7 +142,7 @@
     if (Constant *C = dyn_cast<Constant>(U.getUser())) {
       if (!isa<GlobalValue>(C))
         C->replaceUsesOfWithOnConstant(this, New, true);
-      else 
+      else
         U.set(New);
     } else {
       U.set(New);


Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.129 llvm/lib/VMCore/Verifier.cpp:1.130
--- llvm/lib/VMCore/Verifier.cpp:1.129	Mon Mar 28 14:05:49 2005
+++ llvm/lib/VMCore/Verifier.cpp	Thu Apr 21 18:46:51 2005
@@ -1,10 +1,10 @@
 //===-- Verifier.cpp - Implement the Module Verifier -------------*- C++ -*-==//
-// 
+//
 //                     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 defines the function verifier interface, that can be used for some
@@ -76,17 +76,17 @@
     /// an instruction in the same block.
     std::set<Instruction*> InstsInThisBlock;
 
-    Verifier() 
+    Verifier()
         : Broken(false), RealPass(true), action(AbortProcessAction),
           DS(0), msgs( std::ios::app | std::ios::out ) {}
     Verifier( VerifierFailureAction ctn )
-        : Broken(false), RealPass(true), action(ctn), DS(0), 
+        : Broken(false), RealPass(true), action(ctn), DS(0),
           msgs( std::ios::app | std::ios::out ) {}
-    Verifier(bool AB ) 
-        : Broken(false), RealPass(true), 
-          action( AB ? AbortProcessAction : PrintMessageAction), DS(0), 
+    Verifier(bool AB )
+        : Broken(false), RealPass(true),
+          action( AB ? AbortProcessAction : PrintMessageAction), DS(0),
           msgs( std::ios::app | std::ios::out ) {}
-    Verifier(DominatorSet &ds) 
+    Verifier(DominatorSet &ds)
       : Broken(false), RealPass(false), action(PrintMessageAction),
         DS(&ds), msgs( std::ios::app | std::ios::out ) {}
 
@@ -223,7 +223,7 @@
       Broken = true;
     }
 
-    void CheckFailed( const std::string& Message, const Value* V1, 
+    void CheckFailed( const std::string& Message, const Value* V1,
                       const Type* T2, const Value* V3 = 0 ) {
       msgs << Message << "\n";
       WriteValue(V1);
@@ -264,11 +264,11 @@
 }
 
 void Verifier::visitGlobalVariable(GlobalVariable &GV) {
-  if (GV.hasInitializer()) 
+  if (GV.hasInitializer())
     Assert1(GV.getInitializer()->getType() == GV.getType()->getElementType(),
             "Global variable initializer type does not match global "
             "variable type!", &GV);
-  
+
   visitGlobalValue(GV);
 }
 
@@ -278,7 +278,7 @@
 void Verifier::verifySymbolTable(SymbolTable &ST) {
 
   // Loop over all of the values in all type planes in the symbol table.
-  for (SymbolTable::plane_const_iterator PI = ST.plane_begin(), 
+  for (SymbolTable::plane_const_iterator PI = ST.plane_begin(),
        PE = ST.plane_end(); PI != PE; ++PI)
     for (SymbolTable::value_const_iterator VI = PI->second.begin(),
          VE = PI->second.end(); VI != VE; ++VI) {
@@ -312,7 +312,7 @@
             "Argument value does not match function argument type!",
             I, FT->getParamType(i));
     // Make sure no aggregates are passed by value.
-    Assert1(I->getType()->isFirstClassType(), 
+    Assert1(I->getType()->isFirstClassType(),
             "Functions cannot take aggregates as arguments by value!", I);
    }
 
@@ -340,7 +340,7 @@
   if (isa<PHINode>(BB.front())) {
     std::vector<BasicBlock*> Preds(pred_begin(&BB), pred_end(&BB));
     std::sort(Preds.begin(), Preds.end());
-    PHINode *PN; 
+    PHINode *PN;
     for (BasicBlock::iterator I = BB.begin(); (PN = dyn_cast<PHINode>(I));++I) {
 
       // Ensure that PHI nodes have at least one entry!
@@ -350,7 +350,7 @@
       Assert1(PN->getNumIncomingValues() == Preds.size(),
               "PHINode should have one entry for each predecessor of its "
               "parent basic block!", PN);
-      
+
       // Get and sort all incoming values in the PHI node...
       std::vector<std::pair<BasicBlock*, Value*> > Values;
       Values.reserve(PN->getNumIncomingValues());
@@ -358,7 +358,7 @@
         Values.push_back(std::make_pair(PN->getIncomingBlock(i),
                                         PN->getIncomingValue(i)));
       std::sort(Values.begin(), Values.end());
-      
+
       for (unsigned i = 0, e = Values.size(); i != e; ++i) {
         // Check to make sure that if there is more than one entry for a
         // particular basic block in this PHI node, that the incoming values are
@@ -369,12 +369,12 @@
                 "PHI node has multiple entries for the same basic block with "
                 "different incoming values!", PN, Values[i].first,
                 Values[i].second, Values[i-1].second);
-        
+
         // Check to make sure that the predecessors and PHI node entries are
         // matched up.
         Assert3(Values[i].first == Preds[i],
                 "PHI node entries do not match predecessors!", PN,
-                Values[i].first, Preds[i]);        
+                Values[i].first, Preds[i]);
       }
     }
   }
@@ -509,11 +509,11 @@
     Assert1(B.getType() == B.getOperand(0)->getType(),
             "Arithmetic operators must have same type for operands and result!",
             &B);
-    Assert1(B.getType()->isInteger() || B.getType()->isFloatingPoint() || 
+    Assert1(B.getType()->isInteger() || B.getType()->isFloatingPoint() ||
             isa<PackedType>(B.getType()),
             "Arithmetic operators must have integer, fp, or packed type!", &B);
   }
-  
+
   visitInstruction(B);
 }
 
@@ -557,7 +557,7 @@
 /// verifyInstruction - Verify that an instruction is well formed.
 ///
 void Verifier::visitInstruction(Instruction &I) {
-  BasicBlock *BB = I.getParent();  
+  BasicBlock *BB = I.getParent();
   Assert1(BB, "Instruction not embedded in basic block!", &I);
 
   if (!isa<PHINode>(I)) {   // Check that non-phi nodes are not self referential
@@ -749,13 +749,13 @@
   case Intrinsic::memset:          NumArgs = 4; break;
 
   case Intrinsic::prefetch:        NumArgs = 3; break;
-  case Intrinsic::pcmarker:        
-    NumArgs = 1; 
+  case Intrinsic::pcmarker:
+    NumArgs = 1;
     Assert1(isa<Constant>(CI.getOperand(1)),
             "First argument to llvm.pcmarker must be a constant!", &CI);
     break;
- 
-  case Intrinsic::not_intrinsic: 
+
+  case Intrinsic::not_intrinsic:
     assert(0 && "Invalid intrinsic!"); NumArgs = 0; break;
   }
 
@@ -774,11 +774,11 @@
 }
 
 
-// verifyFunction - Create 
+// verifyFunction - Create
 bool llvm::verifyFunction(const Function &f, VerifierFailureAction action) {
   Function &F = const_cast<Function&>(f);
   assert(!F.isExternal() && "Cannot verify external functions");
-  
+
   FunctionPassManager FPM(new ExistingModuleProvider(F.getParent()));
   Verifier *V = new Verifier(action);
   FPM.add(V);






More information about the llvm-commits mailing list