[llvm-commits] [llvm] r77516 - in /llvm/trunk: docs/tutorial/ examples/BrainF/ examples/Kaleidoscope/ examples/ModuleMaker/ include/llvm/ include/llvm/CodeGen/ include/llvm/Support/ lib/Analysis/ lib/AsmParser/ lib/Bitcode/Reader/ lib/CodeGen/ lib/CodeGen/SelectionDAG/ lib/ExecutionEngine/JIT/ lib/Linker/ lib/Target/CellSPU/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/XCore/ lib/Transforms/IPO/ lib/Transforms/Instrumentation/ lib/Transforms/Scalar/ lib/Transforms/Utils/ lib/VMCore/ tools/bugpoint/ unittests/Execut...

Jim Grosbach grosbach at apple.com
Wed Jul 29 18:05:48 PDT 2009


This broke ARM llvm-gcc.

../../llvm-gcc-public/gcc/config/arm/llvm-arm.cpp: In function ‘const  
llvm::VectorType* GetVldstType(tree_node*, machine_mode)’:
../../llvm-gcc-public/gcc/config/arm/llvm-arm.cpp:258: error: ‘class  
llvm::LLVMContext’ has no member named ‘getVectorType’

Fixed as r77561.


On Jul 29, 2009, at 3:17 PM, Owen Anderson wrote:

> Author: resistor
> Date: Wed Jul 29 17:17:13 2009
> New Revision: 77516
>
> URL: http://llvm.org/viewvc/llvm-project?rev=77516&view=rev
> Log:
> Move types back to the 2.5 API.
>
> Modified:
>    llvm/trunk/docs/tutorial/LangImpl3.html
>    llvm/trunk/docs/tutorial/LangImpl4.html
>    llvm/trunk/docs/tutorial/LangImpl5.html
>    llvm/trunk/docs/tutorial/LangImpl6.html
>    llvm/trunk/docs/tutorial/LangImpl7.html
>    llvm/trunk/examples/BrainF/BrainF.cpp
>    llvm/trunk/examples/Kaleidoscope/toy.cpp
>    llvm/trunk/examples/ModuleMaker/ModuleMaker.cpp
>    llvm/trunk/include/llvm/CodeGen/ValueTypes.h
>    llvm/trunk/include/llvm/InstrTypes.h
>    llvm/trunk/include/llvm/Instructions.h
>    llvm/trunk/include/llvm/LLVMContext.h
>    llvm/trunk/include/llvm/Support/TypeBuilder.h
>    llvm/trunk/lib/Analysis/ConstantFolding.cpp
>    llvm/trunk/lib/Analysis/DebugInfo.cpp
>    llvm/trunk/lib/Analysis/LoopVR.cpp
>    llvm/trunk/lib/Analysis/ScalarEvolution.cpp
>    llvm/trunk/lib/AsmParser/LLLexer.cpp
>    llvm/trunk/lib/AsmParser/LLParser.cpp
>    llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
>    llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
>    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
>    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
>    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
>    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
>    llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
>    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
>    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
>    llvm/trunk/lib/CodeGen/ShadowStackGC.cpp
>    llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
>    llvm/trunk/lib/Linker/LinkModules.cpp
>    llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
>    llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp
>    llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
>    llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp
>    llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
>    llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
>    llvm/trunk/lib/Transforms/IPO/ExtractGV.cpp
>    llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
>    llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp
>    llvm/trunk/lib/Transforms/IPO/RaiseAllocations.cpp
>    llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
>    llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp
>    llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp
>    llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp
>    llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
>    llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
>    llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
>    llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
>    llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
>    llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
>    llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
>    llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
>    llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp
>    llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
>    llvm/trunk/lib/VMCore/AutoUpgrade.cpp
>    llvm/trunk/lib/VMCore/ConstantFold.cpp
>    llvm/trunk/lib/VMCore/Constants.cpp
>    llvm/trunk/lib/VMCore/Core.cpp
>    llvm/trunk/lib/VMCore/Function.cpp
>    llvm/trunk/lib/VMCore/Globals.cpp
>    llvm/trunk/lib/VMCore/Instructions.cpp
>    llvm/trunk/lib/VMCore/LLVMContext.cpp
>    llvm/trunk/lib/VMCore/Module.cpp
>    llvm/trunk/lib/VMCore/ValueTypes.cpp
>    llvm/trunk/lib/VMCore/Verifier.cpp
>    llvm/trunk/tools/bugpoint/ExtractFunction.cpp
>    llvm/trunk/tools/bugpoint/Miscompilation.cpp
>    llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
>    llvm/trunk/unittests/Support/TypeBuilderTest.cpp
>    llvm/trunk/utils/TableGen/CallingConvEmitter.cpp
>
> Modified: llvm/trunk/docs/tutorial/LangImpl3.html
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl3.html?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/docs/tutorial/LangImpl3.html (original)
> +++ llvm/trunk/docs/tutorial/LangImpl3.html Wed Jul 29 17:17:13 2009
> @@ -308,7 +308,7 @@
> Function *PrototypeAST::Codegen() {
>   // Make the function type:  double(double,double) etc.
>   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
> -  FunctionType *FT = getGlobalContext().getFunctionType 
> (Type::DoubleTy, Doubles, false);
> +  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles,  
> false);
>
>   Function *F = Function::Create(FT, Function::ExternalLinkage,  
> Name, TheModule);
> </pre>
> @@ -1082,7 +1082,7 @@
> Function *PrototypeAST::Codegen() {
>   // Make the function type:  double(double,double) etc.
>   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
> -  FunctionType *FT = getGlobalContext().getFunctionType 
> (Type::DoubleTy, Doubles, false);
> +  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles,  
> false);
>
>   Function *F = Function::Create(FT, Function::ExternalLinkage,  
> Name, TheModule);
>
>
> Modified: llvm/trunk/docs/tutorial/LangImpl4.html
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl4.html?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/docs/tutorial/LangImpl4.html (original)
> +++ llvm/trunk/docs/tutorial/LangImpl4.html Wed Jul 29 17:17:13 2009
> @@ -917,7 +917,7 @@
> Function *PrototypeAST::Codegen() {
>   // Make the function type:  double(double,double) etc.
>   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
> -  FunctionType *FT = getGlobalContext().getFunctionType 
> (Type::DoubleTy, Doubles, false);
> +  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles,  
> false);
>
>   Function *F = Function::Create(FT, Function::ExternalLinkage,  
> Name, TheModule);
>
>
> Modified: llvm/trunk/docs/tutorial/LangImpl5.html
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl5.html?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/docs/tutorial/LangImpl5.html (original)
> +++ llvm/trunk/docs/tutorial/LangImpl5.html Wed Jul 29 17:17:13 2009
> @@ -1551,7 +1551,7 @@
> Function *PrototypeAST::Codegen() {
>   // Make the function type:  double(double,double) etc.
>   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
> -  FunctionType *FT = getGlobalContext().getFunctionType 
> (Type::DoubleTy, Doubles, false);
> +  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles,  
> false);
>
>   Function *F = Function::Create(FT, Function::ExternalLinkage,  
> Name, TheModule);
>
>
> Modified: llvm/trunk/docs/tutorial/LangImpl6.html
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl6.html?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/docs/tutorial/LangImpl6.html (original)
> +++ llvm/trunk/docs/tutorial/LangImpl6.html Wed Jul 29 17:17:13 2009
> @@ -1576,7 +1576,7 @@
> Function *PrototypeAST::Codegen() {
>   // Make the function type:  double(double,double) etc.
>   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
> -  FunctionType *FT = getGlobalContext().getFunctionType 
> (Type::DoubleTy, Doubles, false);
> +  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles,  
> false);
>
>   Function *F = Function::Create(FT, Function::ExternalLinkage,  
> Name, TheModule);
>
>
> Modified: llvm/trunk/docs/tutorial/LangImpl7.html
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/tutorial/LangImpl7.html?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/docs/tutorial/LangImpl7.html (original)
> +++ llvm/trunk/docs/tutorial/LangImpl7.html Wed Jul 29 17:17:13 2009
> @@ -1911,7 +1911,7 @@
> Function *PrototypeAST::Codegen() {
>   // Make the function type:  double(double,double) etc.
>   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
> -  FunctionType *FT = getGlobalContext().getFunctionType 
> (Type::DoubleTy, Doubles, false);
> +  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles,  
> false);
>
>   Function *F = Function::Create(FT, Function::ExternalLinkage,  
> Name, TheModule);
>
>
> Modified: llvm/trunk/examples/BrainF/BrainF.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/BrainF/BrainF.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/examples/BrainF/BrainF.cpp (original)
> +++ llvm/trunk/examples/BrainF/BrainF.cpp Wed Jul 29 17:17:13 2009
> @@ -138,7 +138,7 @@
>     //declare i32 @puts(i8 *)
>     Function *puts_func = cast<Function>(module->
>       getOrInsertFunction("puts", IntegerType::Int32Ty,
> -                          C.getPointerTypeUnqual 
> (IntegerType::Int8Ty), NULL));
> +                          PointerType::getUnqual 
> (IntegerType::Int8Ty), NULL));
>
>     //brainf.aberror:
>     aberrorbb = BasicBlock::Create(label, brainf_func);
> @@ -284,7 +284,7 @@
>
>           // Make part of PHI instruction now, wait until end of  
> loop to finish
>           PHINode *phi_0 =
> -            PHINode::Create(C.getPointerTypeUnqual 
> (IntegerType::Int8Ty),
> +            PHINode::Create(PointerType::getUnqual 
> (IntegerType::Int8Ty),
>                             headreg, testbb);
>           phi_0->reserveOperandSpace(2);
>           phi_0->addIncoming(curhead, bb_0);
> @@ -440,7 +440,7 @@
>
>       //%head.%d = phi i8 *[%head.%d, %main.%d]
>       PHINode *phi_1 = builder->
> -        CreatePHI(C.getPointerTypeUnqual(IntegerType::Int8Ty),  
> headreg);
> +        CreatePHI(PointerType::getUnqual(IntegerType::Int8Ty),  
> headreg);
>       phi_1->reserveOperandSpace(1);
>       phi_1->addIncoming(head_0, testbb);
>       curhead = phi_1;
>
> Modified: llvm/trunk/examples/Kaleidoscope/toy.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/toy.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/examples/Kaleidoscope/toy.cpp (original)
> +++ llvm/trunk/examples/Kaleidoscope/toy.cpp Wed Jul 29 17:17:13 2009
> @@ -909,8 +909,7 @@
> Function *PrototypeAST::Codegen() {
>   // Make the function type:  double(double,double) etc.
>   std::vector<const Type*> Doubles(Args.size(), Type::DoubleTy);
> -  FunctionType *FT =
> -    getGlobalContext().getFunctionType(Type::DoubleTy, Doubles,  
> false);
> +  FunctionType *FT = FunctionType::get(Type::DoubleTy, Doubles,  
> false);
>
>   Function *F = Function::Create(FT, Function::ExternalLinkage,  
> Name, TheModule);
>
>
> Modified: llvm/trunk/examples/ModuleMaker/ModuleMaker.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/ModuleMaker/ModuleMaker.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/examples/ModuleMaker/ModuleMaker.cpp (original)
> +++ llvm/trunk/examples/ModuleMaker/ModuleMaker.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -31,7 +31,7 @@
>
>   // Create the main function: first create the type 'int ()'
>   FunctionType *FT =
> -    Context.getFunctionType(Type::Int32Ty, /*not vararg*/false);
> +    FunctionType::get(Type::Int32Ty, /*not vararg*/false);
>
>   // By passing a module as the last parameter to the Function  
> constructor,
>   // it automatically gets appended to the Module.
>
> Modified: llvm/trunk/include/llvm/CodeGen/ValueTypes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/ValueTypes.h?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/include/llvm/CodeGen/ValueTypes.h (original)
> +++ llvm/trunk/include/llvm/CodeGen/ValueTypes.h Wed Jul 29 17:17:13  
> 2009
> @@ -477,7 +477,7 @@
>     /// getTypeForMVT - This method returns an LLVM type  
> corresponding to the
>     /// specified MVT.  For integer types, this returns an unsigned  
> type.  Note
>     /// that this will abort for types that cannot be represented.
> -    const Type *getTypeForMVT(LLVMContext &Context) const;
> +    const Type *getTypeForMVT() const;
>
>     /// getMVT - Return the value type corresponding to the  
> specified type.
>     /// This returns all pointers as iPTR.  If HandleUnknown is  
> true, unknown
>
> Modified: llvm/trunk/include/llvm/InstrTypes.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/InstrTypes.h?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/include/llvm/InstrTypes.h (original)
> +++ llvm/trunk/include/llvm/InstrTypes.h Wed Jul 29 17:17:13 2009
> @@ -667,6 +667,14 @@
>   static inline bool classof(const Value *V) {
>     return isa<Instruction>(V) && classof(cast<Instruction>(V));
>   }
> +
> +  /// @brief Create a result type for fcmp/icmp
> +  static const Type* makeCmpResultType(const Type* opnd_type) {
> +    if (const VectorType* vt = dyn_cast<const VectorType> 
> (opnd_type)) {
> +      return VectorType::get(Type::Int1Ty, vt->getNumElements());
> +    }
> +    return Type::Int1Ty;
> +  }
> };
>
>
>
> Modified: llvm/trunk/include/llvm/Instructions.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/include/llvm/Instructions.h (original)
> +++ llvm/trunk/include/llvm/Instructions.h Wed Jul 29 17:17:13 2009
> @@ -645,7 +645,7 @@
>     Value *LHS,      ///< The left-hand-side of the expression
>     Value *RHS,      ///< The right-hand-side of the expression
>     const Twine &NameStr = ""  ///< Name of the instruction
> -  ) : CmpInst(InsertBefore->getContext().makeCmpResultType(LHS- 
> >getType()),
> +  ) : CmpInst(makeCmpResultType(LHS->getType()),
>               Instruction::ICmp, pred, LHS, RHS, NameStr,
>               InsertBefore) {
>     assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
> @@ -666,7 +666,7 @@
>     Value *LHS,      ///< The left-hand-side of the expression
>     Value *RHS,      ///< The right-hand-side of the expression
>     const Twine &NameStr = ""  ///< Name of the instruction
> -  ) : CmpInst(InsertAtEnd.getContext().makeCmpResultType(LHS- 
> >getType()),
> +  ) : CmpInst(makeCmpResultType(LHS->getType()),
>               Instruction::ICmp, pred, LHS, RHS, NameStr,
>               &InsertAtEnd) {
>     assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
> @@ -687,7 +687,7 @@
>     Value *LHS,     ///< The left-hand-side of the expression
>     Value *RHS,     ///< The right-hand-side of the expression
>     const Twine &NameStr = "" ///< Name of the instruction
> -  ) : CmpInst(Context.makeCmpResultType(LHS->getType()),
> +  ) : CmpInst(makeCmpResultType(LHS->getType()),
>               Instruction::ICmp, pred, LHS, RHS, NameStr) {
>     assert(pred >= CmpInst::FIRST_ICMP_PREDICATE &&
>            pred <= CmpInst::LAST_ICMP_PREDICATE &&
> @@ -820,7 +820,7 @@
>     Value *LHS,      ///< The left-hand-side of the expression
>     Value *RHS,      ///< The right-hand-side of the expression
>     const Twine &NameStr = ""  ///< Name of the instruction
> -  ) : CmpInst(InsertBefore->getContext().makeCmpResultType(LHS- 
> >getType()),
> +  ) : CmpInst(makeCmpResultType(LHS->getType()),
>               Instruction::FCmp, pred, LHS, RHS, NameStr,
>               InsertBefore) {
>     assert(pred <= FCmpInst::LAST_FCMP_PREDICATE &&
> @@ -839,7 +839,7 @@
>     Value *LHS,      ///< The left-hand-side of the expression
>     Value *RHS,      ///< The right-hand-side of the expression
>     const Twine &NameStr = ""  ///< Name of the instruction
> -  ) : CmpInst(InsertAtEnd.getContext().makeCmpResultType(LHS- 
> >getType()),
> +  ) : CmpInst(makeCmpResultType(LHS->getType()),
>               Instruction::FCmp, pred, LHS, RHS, NameStr,
>               &InsertAtEnd) {
>     assert(pred <= FCmpInst::LAST_FCMP_PREDICATE &&
> @@ -858,7 +858,7 @@
>     Value *LHS,     ///< The left-hand-side of the expression
>     Value *RHS,     ///< The right-hand-side of the expression
>     const Twine &NameStr = "" ///< Name of the instruction
> -  ) : CmpInst(Context.makeCmpResultType(LHS->getType()),
> +  ) : CmpInst(makeCmpResultType(LHS->getType()),
>               Instruction::FCmp, pred, LHS, RHS, NameStr) {
>     assert(pred <= FCmpInst::LAST_FCMP_PREDICATE &&
>            "Invalid FCmp predicate value");
> @@ -910,7 +910,6 @@
>   static inline bool classof(const Value *V) {
>     return isa<Instruction>(V) && classof(cast<Instruction>(V));
>   }
> -
> };
>
> // 
> = 
> = 
> = 
> ----------------------------------------------------------------------= 
> ==//
>
> Modified: llvm/trunk/include/llvm/LLVMContext.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/LLVMContext.h?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/include/llvm/LLVMContext.h (original)
> +++ llvm/trunk/include/llvm/LLVMContext.h Wed Jul 29 17:17:13 2009
> @@ -91,40 +91,6 @@
>   // MDString accessors
>   MDString* getMDString(const StringRef &Str);
>
> -  // FunctionType accessors
> -  FunctionType* getFunctionType(const Type* Result, bool isVarArg);
> -  FunctionType* getFunctionType(const Type* Result,
> -                                const std::vector<const Type*>&  
> Params,
> -                                bool isVarArg);
> -
> -  // IntegerType accessors
> -  const IntegerType* getIntegerType(unsigned NumBits);
> -
> -  // OpaqueType accessors
> -  OpaqueType* getOpaqueType();
> -
> -  // StructType accessors
> -  StructType* getStructType(bool isPacked=false);
> -  StructType* getStructType(const std::vector<const Type*>& Params,
> -                            bool isPacked = false);
> -  StructType* getStructType(const Type* type, ...);
> -
> -  // ArrayType accessors
> -  ArrayType* getArrayType(const Type* ElementType, uint64_t  
> NumElements);
> -
> -  // PointerType accessors
> -  PointerType* getPointerType(const Type* ElementType, unsigned  
> AddressSpace);
> -  PointerType* getPointerTypeUnqual(const Type* ElementType);
> -
> -  // VectorType accessors
> -  VectorType* getVectorType(const Type* ElementType, unsigned  
> NumElements);
> -  VectorType* getVectorTypeInteger(const VectorType* VTy);
> -  VectorType* getVectorTypeExtendedElement(const VectorType* VTy);
> -  VectorType* getVectorTypeTruncatedElement(const VectorType* VTy);
> -
> -  // Other helpers
> -  /// @brief Create a result type for fcmp/icmp
> -  const Type* makeCmpResultType(const Type* opnd_type);
>
>   // Methods for erasing constants
>   void erase(MDString *M);
>
> Modified: llvm/trunk/include/llvm/Support/TypeBuilder.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TypeBuilder.h?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/include/llvm/Support/TypeBuilder.h (original)
> +++ llvm/trunk/include/llvm/Support/TypeBuilder.h Wed Jul 29  
> 17:17:13 2009
> @@ -107,7 +107,7 @@
> public:
>   static const PointerType *get(LLVMContext &Context) {
>     static const PointerType *const result =
> -      Context.getPointerTypeUnqual(TypeBuilder<T,cross>::get 
> (Context));
> +      PointerType::getUnqual(TypeBuilder<T,cross>::get(Context));
>     return result;
>   }
> };
> @@ -120,7 +120,7 @@
> public:
>   static const ArrayType *get(LLVMContext &Context) {
>     static const ArrayType *const result =
> -      Context.getArrayType(TypeBuilder<T, cross>::get(Context), N);
> +    ArrayType::get(TypeBuilder<T, cross>::get(Context), N);
>     return result;
>   }
> };
> @@ -129,7 +129,7 @@
> public:
>   static const ArrayType *get(LLVMContext &Context) {
>     static const ArrayType *const result =
> -      Context.getArrayType(TypeBuilder<T, cross>::get(Context), 0);
> +      ArrayType::get(TypeBuilder<T, cross>::get(Context), 0);
>     return result;
>   }
> };
> @@ -161,7 +161,7 @@
> public: \
>   static const IntegerType *get(LLVMContext &Context) { \
>     static const IntegerType *const result = \
> -      Context.getIntegerType(sizeof(T) * CHAR_BIT); \
> +      IntegerType::get(sizeof(T) * CHAR_BIT); \
>     return result; \
>   } \
> }; \
> @@ -191,7 +191,7 @@
> class TypeBuilder<types::i<num_bits>, cross> {
> public:
>   static const IntegerType *get(LLVMContext &Context) {
> -    static const IntegerType *const result = Context.getIntegerType 
> (num_bits);
> +    static const IntegerType *const result = IntegerType::get 
> (num_bits);
>     return result;
>   }
> };
> @@ -254,7 +254,7 @@
>
> private:
>   static const FunctionType *create(LLVMContext &Context) {
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context), false);
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),  
> false);
>   }
> };
> template<typename R, typename A1, bool cross> class TypeBuilder<R 
> (A1), cross> {
> @@ -269,7 +269,7 @@
>     std::vector<const Type*> params;
>     params.reserve(1);
>     params.push_back(TypeBuilder<A1, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                              params, false);
>   }
> };
> @@ -287,7 +287,7 @@
>     params.reserve(2);
>     params.push_back(TypeBuilder<A1, cross>::get(Context));
>     params.push_back(TypeBuilder<A2, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                              params, false);
>   }
> };
> @@ -306,7 +306,7 @@
>     params.push_back(TypeBuilder<A1, cross>::get(Context));
>     params.push_back(TypeBuilder<A2, cross>::get(Context));
>     params.push_back(TypeBuilder<A3, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                              params, false);
>   }
> };
> @@ -328,7 +328,7 @@
>     params.push_back(TypeBuilder<A2, cross>::get(Context));
>     params.push_back(TypeBuilder<A3, cross>::get(Context));
>     params.push_back(TypeBuilder<A4, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                              params, false);
>   }
> };
> @@ -351,7 +351,7 @@
>     params.push_back(TypeBuilder<A3, cross>::get(Context));
>     params.push_back(TypeBuilder<A4, cross>::get(Context));
>     params.push_back(TypeBuilder<A5, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                              params, false);
>   }
> };
> @@ -365,7 +365,7 @@
>
> private:
>   static const FunctionType *create(LLVMContext &Context) {
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context), true);
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),  
> true);
>   }
> };
> template<typename R, typename A1, bool cross>
> @@ -381,8 +381,7 @@
>     std::vector<const Type*> params;
>     params.reserve(1);
>     params.push_back(TypeBuilder<A1, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> -                                   params, true);
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),  
> params, true);
>   }
> };
> template<typename R, typename A1, typename A2, bool cross>
> @@ -399,7 +398,7 @@
>     params.reserve(2);
>     params.push_back(TypeBuilder<A1, cross>::get(Context));
>     params.push_back(TypeBuilder<A2, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                                    params, true);
>   }
> };
> @@ -418,7 +417,7 @@
>     params.push_back(TypeBuilder<A1, cross>::get(Context));
>     params.push_back(TypeBuilder<A2, cross>::get(Context));
>     params.push_back(TypeBuilder<A3, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                                    params, true);
>   }
> };
> @@ -440,7 +439,7 @@
>     params.push_back(TypeBuilder<A2, cross>::get(Context));
>     params.push_back(TypeBuilder<A3, cross>::get(Context));
>     params.push_back(TypeBuilder<A4, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                              params, true);
>   }
> };
> @@ -463,7 +462,7 @@
>     params.push_back(TypeBuilder<A3, cross>::get(Context));
>     params.push_back(TypeBuilder<A4, cross>::get(Context));
>     params.push_back(TypeBuilder<A5, cross>::get(Context));
> -    return Context.getFunctionType(TypeBuilder<R, cross>::get 
> (Context),
> +    return FunctionType::get(TypeBuilder<R, cross>::get(Context),
>                                    params, true);
>   }
> };
>
> Modified: llvm/trunk/lib/Analysis/ConstantFolding.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ConstantFolding.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Analysis/ConstantFolding.cpp (original)
> +++ llvm/trunk/lib/Analysis/ConstantFolding.cpp Wed Jul 29 17:17:13  
> 2009
> @@ -184,8 +184,8 @@
>       if (DstEltTy->isFloatingPoint()) {
>         // Fold to an vector of integers with same size as our FP  
> type.
>         unsigned FPWidth = DstEltTy->getPrimitiveSizeInBits();
> -        const Type *DestIVTy = Context.getVectorType(
> -                                   Context.getIntegerType(FPWidth),  
> NumDstElt);
> +        const Type *DestIVTy = VectorType::get(
> +                                   IntegerType::get(FPWidth),  
> NumDstElt);
>         // Recursively handle this integer conversion, if possible.
>         C = FoldBitCast(C, DestIVTy, TD, Context);
>         if (!C) return 0;
> @@ -198,8 +198,8 @@
>       // it to integer first.
>       if (SrcEltTy->isFloatingPoint()) {
>         unsigned FPWidth = SrcEltTy->getPrimitiveSizeInBits();
> -        const Type *SrcIVTy = Context.getVectorType(
> -                                   Context.getIntegerType(FPWidth),  
> NumSrcElt);
> +        const Type *SrcIVTy = VectorType::get(
> +                                   IntegerType::get(FPWidth),  
> NumSrcElt);
>         // Ask VMCore to do the conversion now that #elts line up.
>         C = ConstantExpr::getBitCast(C, SrcIVTy);
>         CV = dyn_cast<ConstantVector>(C);
>
> Modified: llvm/trunk/lib/Analysis/DebugInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/DebugInfo.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Analysis/DebugInfo.cpp (original)
> +++ llvm/trunk/lib/Analysis/DebugInfo.cpp Wed Jul 29 17:17:13 2009
> @@ -470,7 +470,7 @@
>   : M(m), VMContext(M.getContext()), StopPointFn(0), FuncStartFn(0),
>     RegionStartFn(0), RegionEndFn(0),
>     DeclareFn(0) {
> -  EmptyStructPtr = VMContext.getPointerTypeUnqual 
> (VMContext.getStructType());
> +  EmptyStructPtr = PointerType::getUnqual(StructType::get());
> }
>
> /// getCastToEmpty - Return this descriptor as a Constant* with type  
> '{}*'.
> @@ -493,7 +493,7 @@
>   // Return Constant if previously defined.
>   if (Slot) return Slot;
>
> -  const PointerType *DestTy = VMContext.getPointerTypeUnqual 
> (Type::Int8Ty);
> +  const PointerType *DestTy = PointerType::getUnqual(Type::Int8Ty);
>
>   // If empty string then use a i8* null instead.
>   if (String.empty())
> @@ -522,7 +522,7 @@
>   for (unsigned i = 0; i != NumTys; ++i)
>     Elts.push_back(getCastToEmpty(Tys[i]));
>
> -  Constant *Init = ConstantArray::get(VMContext.getArrayType 
> (EmptyStructPtr,
> +  Constant *Init = ConstantArray::get(ArrayType::get(EmptyStructPtr,
>                                                      Elts.size()),
>                                       Elts.data(), Elts.size());
>   // If we already have this array, just return the uniqued version.
> @@ -1075,7 +1075,7 @@
>     const Type *Ty = M->getTypeByName 
> ("llvm.dbg.global_variable.type");
>     if (!Ty) return 0;
>
> -    Ty = Context.getPointerType(Ty, 0);
> +    Ty = PointerType::get(Ty, 0);
>
>     Value *Val = V->stripPointerCasts();
>     for (Value::use_iterator I = Val->use_begin(), E = Val->use_end();
>
> Modified: llvm/trunk/lib/Analysis/LoopVR.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopVR.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Analysis/LoopVR.cpp (original)
> +++ llvm/trunk/lib/Analysis/LoopVR.cpp Wed Jul 29 17:17:13 2009
> @@ -75,8 +75,8 @@
>     ConstantRange X = getRange(Mul->getOperand(0), T, SE);
>     if (X.isFullSet()) return FullSet;
>
> -    const IntegerType *Ty = Context.getIntegerType(X.getBitWidth());
> -    const IntegerType *ExTy = Context.getIntegerType(X.getBitWidth 
> () *
> +    const IntegerType *Ty = IntegerType::get(X.getBitWidth());
> +    const IntegerType *ExTy = IntegerType::get(X.getBitWidth() *
>                                                Mul->getNumOperands());
>     ConstantRange XExt = X.zeroExtend(ExTy->getBitWidth());
>
>
> Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
> +++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Wed Jul 29 17:17:13  
> 2009
> @@ -4670,7 +4670,7 @@
>
>   // Check Add for unsigned overflow.
>   // TODO: More sophisticated things could be done here.
> -  const Type *WideTy = getContext().getIntegerType(getTypeSizeInBits 
> (Ty) + 1);
> +  const Type *WideTy = IntegerType::get(getTypeSizeInBits(Ty) + 1);
>   const SCEV *EDiff = getZeroExtendExpr(Diff, WideTy);
>   const SCEV *ERoundUp = getZeroExtendExpr(RoundUp, WideTy);
>   const SCEV *OperandExtendedAdd = getAddExpr(EDiff, ERoundUp);
>
> Modified: llvm/trunk/lib/AsmParser/LLLexer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLLexer.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/AsmParser/LLLexer.cpp (original)
> +++ llvm/trunk/lib/AsmParser/LLLexer.cpp Wed Jul 29 17:17:13 2009
> @@ -471,7 +471,7 @@
>       Error("bitwidth for integer type out of range!");
>       return lltok::Error;
>     }
> -    TyVal = Context.getIntegerType(NumBits);
> +    TyVal = IntegerType::get(NumBits);
>     return lltok::Type;
>   }
>
>
> Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
> +++ llvm/trunk/lib/AsmParser/LLParser.cpp Wed Jul 29 17:17:13 2009
> @@ -1104,7 +1104,7 @@
>     break;
>   case lltok::kw_opaque:
>     // TypeRec ::= 'opaque'
> -    Result = Context.getOpaqueType();
> +    Result = OpaqueType::get();
>     Lex.Lex();
>     break;
>   case lltok::lbrace:
> @@ -1134,7 +1134,7 @@
>     if (const Type *T = M->getTypeByName(Lex.getStrVal())) {
>       Result = T;
>     } else {
> -      Result = Context.getOpaqueType();
> +      Result = OpaqueType::get();
>       ForwardRefTypes.insert(std::make_pair(Lex.getStrVal(),
>                                             std::make_pair(Result,
>                                                            Lex.getLoc 
> ())));
> @@ -1153,7 +1153,7 @@
>       if (I != ForwardRefTypeIDs.end())
>         Result = I->second.first;
>       else {
> -        Result = Context.getOpaqueType();
> +        Result = OpaqueType::get();
>         ForwardRefTypeIDs.insert(std::make_pair(Lex.getUIntVal(),
>                                                 std::make_pair(Result,
>                                                                 
> Lex.getLoc())));
> @@ -1166,7 +1166,7 @@
>     Lex.Lex();
>     unsigned Val;
>     if (ParseUInt32(Val)) return true;
> -    OpaqueType *OT = Context.getOpaqueType(); //Use temporary  
> placeholder.
> +    OpaqueType *OT = OpaqueType::get(); //Use temporary placeholder.
>     UpRefs.push_back(UpRefRecord(Lex.getLoc(), Val, OT));
>     Result = OT;
>     break;
> @@ -1187,7 +1187,7 @@
>         return TokError("pointers to void are invalid; use i8*  
> instead");
>       if (!PointerType::isValidElementType(Result.get()))
>         return TokError("pointer to this type is invalid");
> -      Result = HandleUpRefs(Context.getPointerTypeUnqual(Result.get 
> ()));
> +      Result = HandleUpRefs(PointerType::getUnqual(Result.get()));
>       Lex.Lex();
>       break;
>
> @@ -1204,7 +1204,7 @@
>           ParseToken(lltok::star, "expected '*' in address space"))
>         return true;
>
> -      Result = HandleUpRefs(Context.getPointerType(Result.get(),  
> AddrSpace));
> +      Result = HandleUpRefs(PointerType::get(Result.get(),  
> AddrSpace));
>       break;
>     }
>
> @@ -1365,7 +1365,7 @@
>   for (unsigned i = 0, e = ArgList.size(); i != e; ++i)
>     ArgListTy.push_back(ArgList[i].Type);
>
> -  Result = HandleUpRefs(Context.getFunctionType(Result.get(),
> +  Result = HandleUpRefs(FunctionType::get(Result.get(),
>                                                 ArgListTy, isVarArg));
>   return false;
> }
> @@ -1381,7 +1381,7 @@
>   Lex.Lex(); // Consume the '{'
>
>   if (EatIfPresent(lltok::rbrace)) {
> -    Result = Context.getStructType(Packed);
> +    Result = StructType::get(Packed);
>     return false;
>   }
>
> @@ -1413,7 +1413,7 @@
>   std::vector<const Type*> ParamsListTy;
>   for (unsigned i = 0, e = ParamsList.size(); i != e; ++i)
>     ParamsListTy.push_back(ParamsList[i].get());
> -  Result = HandleUpRefs(Context.getStructType(ParamsListTy, Packed));
> +  Result = HandleUpRefs(StructType::get(ParamsListTy, Packed));
>   return false;
> }
>
> @@ -1452,11 +1452,11 @@
>       return Error(SizeLoc, "size too large for vector");
>     if (!VectorType::isValidElementType(EltTy))
>       return Error(TypeLoc, "vector element type must be fp or  
> integer");
> -    Result = Context.getVectorType(EltTy, unsigned(Size));
> +    Result = VectorType::get(EltTy, unsigned(Size));
>   } else {
>     if (!ArrayType::isValidElementType(EltTy))
>       return Error(TypeLoc, "invalid array element type");
> -    Result = HandleUpRefs(Context.getArrayType(EltTy, Size));
> +    Result = HandleUpRefs(ArrayType::get(EltTy, Size));
>   }
>   return false;
> }
> @@ -1836,7 +1836,7 @@
>       return Error(FirstEltLoc, "invalid array element type: " +
>                    Elts[0]->getType()->getDescription());
>
> -    ArrayType *ATy = Context.getArrayType(Elts[0]->getType(),  
> Elts.size());
> +    ArrayType *ATy = ArrayType::get(Elts[0]->getType(), Elts.size());
>
>     // Verify all elements are correct type!
>     for (unsigned i = 0, e = Elts.size(); i != e; ++i) {
> @@ -2417,8 +2417,8 @@
>     return Error(RetTypeLoc, "functions with 'sret' argument must  
> return void");
>
>   const FunctionType *FT =
> -    Context.getFunctionType(RetType, ParamTypeList, isVarArg);
> -  const PointerType *PFT = Context.getPointerTypeUnqual(FT);
> +    FunctionType::get(RetType, ParamTypeList, isVarArg);
> +  const PointerType *PFT = PointerType::getUnqual(FT);
>
>   Fn = 0;
>   if (!FunctionName.empty()) {
> @@ -2902,8 +2902,8 @@
>     if (!FunctionType::isValidReturnType(RetType))
>       return Error(RetTypeLoc, "Invalid result type for LLVM  
> function");
>
> -    Ty = Context.getFunctionType(RetType, ParamTypes, false);
> -    PFTy = Context.getPointerTypeUnqual(Ty);
> +    Ty = FunctionType::get(RetType, ParamTypes, false);
> +    PFTy = PointerType::getUnqual(Ty);
>   }
>
>   // Look up the callee.
> @@ -3242,8 +3242,8 @@
>     if (!FunctionType::isValidReturnType(RetType))
>       return Error(RetTypeLoc, "Invalid result type for LLVM  
> function");
>
> -    Ty = Context.getFunctionType(RetType, ParamTypes, false);
> -    PFTy = Context.getPointerTypeUnqual(Ty);
> +    Ty = FunctionType::get(RetType, ParamTypes, false);
> +    PFTy = PointerType::getUnqual(Ty);
>   }
>
>   // Look up the callee.
>
> Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
> +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -322,7 +322,7 @@
>   // The type table allows forward references.  Push as many Opaque  
> types as
>   // needed to get up to ID.
>   while (TypeList.size() <= ID)
> -    TypeList.push_back(Context.getOpaqueType());
> +    TypeList.push_back(OpaqueType::get());
>   return TypeList.back().get();
> }
>
> @@ -512,7 +512,7 @@
>       if (Record.size() < 1)
>         return Error("Invalid Integer type record");
>
> -      ResultTy = Context.getIntegerType(Record[0]);
> +      ResultTy = IntegerType::get(Record[0]);
>       break;
>     case bitc::TYPE_CODE_POINTER: { // POINTER: [pointee type] or
>                                     //          [pointee type,  
> address space]
> @@ -521,7 +521,7 @@
>       unsigned AddressSpace = 0;
>       if (Record.size() == 2)
>         AddressSpace = Record[1];
> -      ResultTy = Context.getPointerType(getTypeByID(Record[0], true),
> +      ResultTy = PointerType::get(getTypeByID(Record[0], true),
>                                         AddressSpace);
>       break;
>     }
> @@ -534,7 +534,7 @@
>       for (unsigned i = 3, e = Record.size(); i != e; ++i)
>         ArgTys.push_back(getTypeByID(Record[i], true));
>
> -      ResultTy = Context.getFunctionType(getTypeByID(Record[2],  
> true), ArgTys,
> +      ResultTy = FunctionType::get(getTypeByID(Record[2], true),  
> ArgTys,
>                                    Record[0]);
>       break;
>     }
> @@ -544,24 +544,24 @@
>       std::vector<const Type*> EltTys;
>       for (unsigned i = 1, e = Record.size(); i != e; ++i)
>         EltTys.push_back(getTypeByID(Record[i], true));
> -      ResultTy = Context.getStructType(EltTys, Record[0]);
> +      ResultTy = StructType::get(EltTys, Record[0]);
>       break;
>     }
>     case bitc::TYPE_CODE_ARRAY:     // ARRAY: [numelts, eltty]
>       if (Record.size() < 2)
>         return Error("Invalid ARRAY type record");
> -      ResultTy = Context.getArrayType(getTypeByID(Record[1], true),  
> Record[0]);
> +      ResultTy = ArrayType::get(getTypeByID(Record[1], true), Record 
> [0]);
>       break;
>     case bitc::TYPE_CODE_VECTOR:    // VECTOR: [numelts, eltty]
>       if (Record.size() < 2)
>         return Error("Invalid VECTOR type record");
> -      ResultTy = Context.getVectorType(getTypeByID(Record[1],  
> true), Record[0]);
> +      ResultTy = VectorType::get(getTypeByID(Record[1], true),  
> Record[0]);
>       break;
>     }
>
>     if (NumRecords == TypeList.size()) {
>       // If this is a new type slot, just append it.
> -      TypeList.push_back(ResultTy ? ResultTy : Context.getOpaqueType 
> ());
> +      TypeList.push_back(ResultTy ? ResultTy : OpaqueType::get());
>       ++NumRecords;
>     } else if (ResultTy == 0) {
>       // Otherwise, this was forward referenced, so an opaque type  
> was created,
> @@ -1046,7 +1046,7 @@
>         return Error("Invalid CE_SHUFFLEVEC record");
>       Constant *Op0 = ValueList.getConstantFwdRef(Record[0], OpTy);
>       Constant *Op1 = ValueList.getConstantFwdRef(Record[1], OpTy);
> -      const Type *ShufTy = Context.getVectorType(Type::Int32Ty,
> +      const Type *ShufTy = VectorType::get(Type::Int32Ty,
>                                                  OpTy->getNumElements 
> ());
>       Constant *Op2 = ValueList.getConstantFwdRef(Record[2], ShufTy);
>       V = ConstantExpr::getShuffleVector(Op0, Op1, Op2);
> @@ -1059,7 +1059,7 @@
>         return Error("Invalid CE_SHUFVEC_EX record");
>       Constant *Op0 = ValueList.getConstantFwdRef(Record[1], OpTy);
>       Constant *Op1 = ValueList.getConstantFwdRef(Record[2], OpTy);
> -      const Type *ShufTy = Context.getVectorType(Type::Int32Ty,
> +      const Type *ShufTy = VectorType::get(Type::Int32Ty,
>                                                  RTy->getNumElements 
> ());
>       Constant *Op2 = ValueList.getConstantFwdRef(Record[3], ShufTy);
>       V = ConstantExpr::getShuffleVector(Op0, Op1, Op2);
> @@ -1940,7 +1940,7 @@
>       Value *Val, *Ptr;
>       if (getValueTypePair(Record, OpNum, NextValueNo, Val) ||
>           getValue(Record, OpNum,
> -                   Context.getPointerTypeUnqual(Val->getType()),  
> Ptr)||
> +                   PointerType::getUnqual(Val->getType()), Ptr)||
>           OpNum+2 != Record.size())
>         return Error("Invalid STORE record");
>
>
> Modified: llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp (original)
> +++ llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp Wed Jul 29 17:17:13 2009
> @@ -354,8 +354,7 @@
>
>   // Create the temporary if we didn't already.
>   if (!ExceptionValueVar) {
> -    ExceptionValueVar = new AllocaInst(
> -                           BB->getContext().getPointerTypeUnqual 
> (Type::Int8Ty),
> +    ExceptionValueVar = new AllocaInst(PointerType::getUnqual 
> (Type::Int8Ty),
>                                        "eh.value", F->begin()->begin 
> ());
>     ++NumStackTempsIntroduced;
>   }
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -3664,7 +3664,7 @@
>       TLI.isConsecutiveLoad(LD2, LD1, LD1VT.getSizeInBits()/8, 1,  
> MFI)) {
>     unsigned Align = LD1->getAlignment();
>     unsigned NewAlign = TLI.getTargetData()->
> -      getABITypeAlignment(VT.getTypeForMVT(*DAG.getContext()));
> +      getABITypeAlignment(VT.getTypeForMVT());
>
>     if (NewAlign <= Align &&
>         (!LegalOperations || TLI.isOperationLegal(ISD::LOAD, VT)))
> @@ -3722,7 +3722,7 @@
>       (!LegalOperations || TLI.isOperationLegal(ISD::LOAD, VT))) {
>     LoadSDNode *LN0 = cast<LoadSDNode>(N0);
>     unsigned Align = TLI.getTargetData()->
> -      getABITypeAlignment(VT.getTypeForMVT(*DAG.getContext()));
> +      getABITypeAlignment(VT.getTypeForMVT());
>     unsigned OrigAlign = LN0->getAlignment();
>
>     if (Align <= OrigAlign) {
> @@ -4993,8 +4993,7 @@
>
>       unsigned NewAlign = MinAlign(LD->getAlignment(), PtrOff);
>       if (NewAlign <
> -          TLI.getTargetData()->getABITypeAlignment 
> (NewVT.getTypeForMVT(
> -                                                            
> *DAG.getContext())))
> +          TLI.getTargetData()->getABITypeAlignment 
> (NewVT.getTypeForMVT()))
>         return SDValue();
>
>       SDValue NewPtr = DAG.getNode(ISD::ADD, LD->getDebugLoc(),
> @@ -5049,7 +5048,7 @@
>     unsigned OrigAlign = ST->getAlignment();
>     MVT SVT = Value.getOperand(0).getValueType();
>     unsigned Align = TLI.getTargetData()->
> -      getABITypeAlignment(SVT.getTypeForMVT(*DAG.getContext()));
> +      getABITypeAlignment(SVT.getTypeForMVT());
>     if (Align <= OrigAlign &&
>         ((!LegalOperations && !ST->isVolatile()) ||
>          TLI.isOperationLegalOrCustom(ISD::STORE, SVT)))
> @@ -5329,8 +5328,7 @@
>       // Check the resultant load doesn't need a higher alignment  
> than the
>       // original load.
>       unsigned NewAlign =
> -        TLI.getTargetData()->getABITypeAlignment(LVT.getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +        TLI.getTargetData()->getABITypeAlignment(LVT.getTypeForMVT 
> ());
>
>       if (NewAlign > Align || !TLI.isOperationLegalOrCustom 
> (ISD::LOAD, LVT))
>         return SDValue();
> @@ -5812,8 +5810,7 @@
>         const TargetData &TD = *TLI.getTargetData();
>
>         // Create a ConstantArray of the two constants.
> -        Constant *CA = ConstantArray::get(
> -                          DAG.getContext()->getArrayType(FPTy, 2),  
> Elts, 2);
> +        Constant *CA = ConstantArray::get(ArrayType::get(FPTy, 2),  
> Elts, 2);
>         SDValue CPIdx = DAG.getConstantPool(CA, TLI.getPointerTy(),
>                                             TD.getPrefTypeAlignment 
> (FPTy));
>         unsigned Alignment = cast<ConstantPoolSDNode>(CPIdx)- 
> >getAlignment();
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -361,7 +361,7 @@
>         // smaller type.
>         TLI.isLoadExtLegal(ISD::EXTLOAD, SVT) &&
>         TLI.ShouldShrinkFPConstant(OrigVT)) {
> -      const Type *SType = SVT.getTypeForMVT(*DAG.getContext());
> +      const Type *SType = SVT.getTypeForMVT();
>       LLVMC = cast<ConstantFP>(ConstantExpr::getFPTrunc(LLVMC,  
> SType));
>       VT = SVT;
>       Extend = true;
> @@ -1107,11 +1107,10 @@
>         // expand it.
>         if (!TLI.allowsUnalignedMemoryAccesses()) {
>           unsigned ABIAlignment = TLI.getTargetData()->
> -            getABITypeAlignment(LD->getMemoryVT().getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +            getABITypeAlignment(LD->getMemoryVT().getTypeForMVT());
>           if (LD->getAlignment() < ABIAlignment){
> -            Result = ExpandUnalignedLoad(cast<LoadSDNode> 
> (Result.getNode()), DAG,
> -                                         TLI);
> +            Result = ExpandUnalignedLoad(cast<LoadSDNode> 
> (Result.getNode()),
> +                                         DAG, TLI);
>             Tmp3 = Result.getOperand(0);
>             Tmp4 = Result.getOperand(1);
>             Tmp3 = LegalizeOp(Tmp3);
> @@ -1291,11 +1290,10 @@
>             // expand it.
>             if (!TLI.allowsUnalignedMemoryAccesses()) {
>               unsigned ABIAlignment = TLI.getTargetData()->
> -                getABITypeAlignment(LD->getMemoryVT().getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +                getABITypeAlignment(LD->getMemoryVT().getTypeForMVT 
> ());
>               if (LD->getAlignment() < ABIAlignment){
> -                Result = ExpandUnalignedLoad(cast<LoadSDNode> 
> (Result.getNode()), DAG,
> -                                             TLI);
> +                Result = ExpandUnalignedLoad(cast<LoadSDNode> 
> (Result.getNode()),
> +                                             DAG, TLI);
>                 Tmp1 = Result.getOperand(0);
>                 Tmp2 = Result.getOperand(1);
>                 Tmp1 = LegalizeOp(Tmp1);
> @@ -1370,8 +1368,7 @@
>           // expand it.
>           if (!TLI.allowsUnalignedMemoryAccesses()) {
>             unsigned ABIAlignment = TLI.getTargetData()->
> -              getABITypeAlignment(ST->getMemoryVT().getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +              getABITypeAlignment(ST->getMemoryVT().getTypeForMVT());
>             if (ST->getAlignment() < ABIAlignment)
>               Result = ExpandUnalignedStore(cast<StoreSDNode> 
> (Result.getNode()), DAG,
>                                             TLI);
> @@ -1470,8 +1467,7 @@
>           // expand it.
>           if (!TLI.allowsUnalignedMemoryAccesses()) {
>             unsigned ABIAlignment = TLI.getTargetData()->
> -              getABITypeAlignment(ST->getMemoryVT().getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +              getABITypeAlignment(ST->getMemoryVT().getTypeForMVT());
>             if (ST->getAlignment() < ABIAlignment)
>               Result = ExpandUnalignedStore(cast<StoreSDNode> 
> (Result.getNode()), DAG,
>                                             TLI);
> @@ -1737,7 +1733,7 @@
>   // Create the stack frame object.
>   unsigned SrcAlign =
>     TLI.getTargetData()->getPrefTypeAlignment(SrcOp.getValueType().
> -                                              getTypeForMVT 
> (*DAG.getContext()));
> +                                              getTypeForMVT());
>   SDValue FIPtr = DAG.CreateStackTemporary(SlotVT, SrcAlign);
>
>   FrameIndexSDNode *StackPtrFI = cast<FrameIndexSDNode>(FIPtr);
> @@ -1748,8 +1744,7 @@
>   unsigned SlotSize = SlotVT.getSizeInBits();
>   unsigned DestSize = DestVT.getSizeInBits();
>   unsigned DestAlign =
> -    TLI.getTargetData()->getPrefTypeAlignment(DestVT.getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +    TLI.getTargetData()->getPrefTypeAlignment(DestVT.getTypeForMVT 
> ());
>
>   // Emit a store to the stack slot.  Use a truncstore if the input  
> value is
>   // later than DestVT.
> @@ -1844,7 +1839,7 @@
>         CV.push_back(const_cast<ConstantInt *>(V->getConstantIntValue 
> ()));
>       } else {
>         assert(Node->getOperand(i).getOpcode() == ISD::UNDEF);
> -        const Type *OpNTy = OpVT.getTypeForMVT(*DAG.getContext());
> +        const Type *OpNTy = OpVT.getTypeForMVT();
>         CV.push_back(Context->getUndef(OpNTy));
>       }
>     }
> @@ -1898,7 +1893,7 @@
>   TargetLowering::ArgListEntry Entry;
>   for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) {
>     MVT ArgVT = Node->getOperand(i).getValueType();
> -    const Type *ArgTy = ArgVT.getTypeForMVT(*DAG.getContext());
> +    const Type *ArgTy = ArgVT.getTypeForMVT();
>     Entry.Node = Node->getOperand(i); Entry.Ty = ArgTy;
>     Entry.isSExt = isSigned;
>     Entry.isZExt = !isSigned;
> @@ -1908,7 +1903,7 @@
>                                          TLI.getPointerTy());
>
>   // Splice the libcall in wherever FindInputOutputChains tells us to.
> -  const Type *RetTy = Node->getValueType(0).getTypeForMVT 
> (*DAG.getContext());
> +  const Type *RetTy = Node->getValueType(0).getTypeForMVT();
>   std::pair<SDValue, SDValue> CallInfo =
>     TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned, false, false,
>                     0, CallingConv::C, false, Callee, Args, DAG,
> @@ -2397,8 +2392,7 @@
>     // Increment the pointer, VAList, to the next vaarg
>     Tmp3 = DAG.getNode(ISD::ADD, dl, TLI.getPointerTy(), VAList,
>                        DAG.getConstant(TLI.getTargetData()->
> -                                       getTypeAllocSize 
> (VT.getTypeForMVT(
> -                                                             
> *DAG.getContext())),
> +                                       getTypeAllocSize 
> (VT.getTypeForMVT()),
>                                        TLI.getPointerTy()));
>     // Store the incremented VAList to the legalized pointer
>     Tmp3 = DAG.getStore(VAList.getValue(1), dl, Tmp3, Tmp2, V, 0);
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -1009,7 +1009,7 @@
>   TargetLowering::ArgListEntry Entry;
>   for (unsigned i = 0; i != NumOps; ++i) {
>     Entry.Node = Ops[i];
> -    Entry.Ty = Entry.Node.getValueType().getTypeForMVT 
> (*DAG.getContext());
> +    Entry.Ty = Entry.Node.getValueType().getTypeForMVT();
>     Entry.isSExt = isSigned;
>     Entry.isZExt = !isSigned;
>     Args.push_back(Entry);
> @@ -1017,7 +1017,7 @@
>   SDValue Callee = DAG.getExternalSymbol(TLI.getLibcallName(LC),
>                                          TLI.getPointerTy());
>
> -  const Type *RetTy = RetVT.getTypeForMVT(*DAG.getContext());
> +  const Type *RetTy = RetVT.getTypeForMVT();
>   std::pair<SDValue,SDValue> CallInfo =
>     TLI.LowerCallTo(DAG.getEntryNode(), RetTy, isSigned, !isSigned,  
> false,
>                     false, 0, CallingConv::C, false, Callee, Args,  
> DAG, dl);
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp  
> (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -115,8 +115,7 @@
>   // Create the stack frame object.  Make sure it is aligned for both
>   // the source and expanded destination types.
>   unsigned Alignment =
> -    TLI.getTargetData()->getPrefTypeAlignment(NOutVT.getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +    TLI.getTargetData()->getPrefTypeAlignment(NOutVT.getTypeForMVT 
> ());
>   SDValue StackPtr = DAG.CreateStackTemporary(InVT, Alignment);
>   int SPFI = cast<FrameIndexSDNode>(StackPtr.getNode())->getIndex();
>   const Value *SV = PseudoSourceValue::getFixedStack(SPFI);
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp  
> (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -667,8 +667,7 @@
>   // so use a truncating store.
>   SDValue EltPtr = GetVectorElementPointer(StackPtr, EltVT, Idx);
>   unsigned Alignment =
> -    TLI.getTargetData()->getPrefTypeAlignment(VecVT.getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +    TLI.getTargetData()->getPrefTypeAlignment(VecVT.getTypeForMVT());
>   Store = DAG.getTruncStore(Store, dl, Elt, EltPtr, NULL, 0, EltVT);
>
>   // Load the Lo part from the stack slot.
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -798,7 +798,7 @@
> unsigned SelectionDAG::getMVTAlignment(MVT VT) const {
>   const Type *Ty = VT == MVT::iPTR ?
>                    PointerType::get(Type::Int8Ty, 0) :
> -                   VT.getTypeForMVT(*Context);
> +                   VT.getTypeForMVT();
>
>   return TLI.getTargetData()->getABITypeAlignment(Ty);
> }
> @@ -1389,7 +1389,7 @@
> SDValue SelectionDAG::CreateStackTemporary(MVT VT, unsigned  
> minAlign) {
>   MachineFrameInfo *FrameInfo = getMachineFunction().getFrameInfo();
>   unsigned ByteSize = VT.getStoreSizeInBits()/8;
> -  const Type *Ty = VT.getTypeForMVT(*Context);
> +  const Type *Ty = VT.getTypeForMVT();
>   unsigned StackAlign =
>   std::max((unsigned)TLI.getTargetData()->getPrefTypeAlignment(Ty),  
> minAlign);
>
> @@ -1402,8 +1402,8 @@
> SDValue SelectionDAG::CreateStackTemporary(MVT VT1, MVT VT2) {
>   unsigned Bytes = std::max(VT1.getStoreSizeInBits(),
>                             VT2.getStoreSizeInBits())/8;
> -  const Type *Ty1 = VT1.getTypeForMVT(*Context);
> -  const Type *Ty2 = VT2.getTypeForMVT(*Context);
> +  const Type *Ty1 = VT1.getTypeForMVT();
> +  const Type *Ty2 = VT2.getTypeForMVT();
>   const TargetData *TD = TLI.getTargetData();
>   unsigned Align = std::max(TD->getPrefTypeAlignment(Ty1),
>                             TD->getPrefTypeAlignment(Ty2));
> @@ -3104,8 +3104,7 @@
>   MVT VT = TLI.getOptimalMemOpType(Size, Align, isSrcConst,  
> isSrcStr, DAG);
>   if (VT != MVT::iAny) {
>     unsigned NewAlign = (unsigned)
> -      TLI.getTargetData()->getABITypeAlignment(VT.getTypeForMVT(
> -                                                             
> *DAG.getContext()));
> +      TLI.getTargetData()->getABITypeAlignment(VT.getTypeForMVT());
>     // If source is a string constant, this will require an  
> unaligned load.
>     if (NewAlign > Align && (isSrcConst || AllowUnalign)) {
>       if (Dst.getOpcode() != ISD::FrameIndex) {
>
> Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp  
> (original)
> +++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -5516,7 +5516,7 @@
>     for (unsigned Value = 0, NumValues = ValueVTs.size();
>          Value != NumValues; ++Value) {
>       MVT VT = ValueVTs[Value];
> -      const Type *ArgTy = VT.getTypeForMVT(*DAG.getContext());
> +      const Type *ArgTy = VT.getTypeForMVT();
>       ISD::ArgFlagsTy Flags;
>       unsigned OriginalAlignment =
>         getTargetData()->getABITypeAlignment(ArgTy);
> @@ -5647,7 +5647,7 @@
>     for (unsigned Value = 0, NumValues = ValueVTs.size();
>          Value != NumValues; ++Value) {
>       MVT VT = ValueVTs[Value];
> -      const Type *ArgTy = VT.getTypeForMVT(*DAG.getContext());
> +      const Type *ArgTy = VT.getTypeForMVT();
>       SDValue Op = SDValue(Args[i].Node.getNode(),
>                            Args[i].Node.getResNo() + Value);
>       ISD::ArgFlagsTy Flags;
>
> Modified: llvm/trunk/lib/CodeGen/ShadowStackGC.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ShadowStackGC.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/CodeGen/ShadowStackGC.cpp (original)
> +++ llvm/trunk/lib/CodeGen/ShadowStackGC.cpp Wed Jul 29 17:17:13 2009
> @@ -188,8 +188,6 @@
>
> Constant *ShadowStackGC::GetFrameMap(Function &F) {
>   // doInitialization creates the abstract type of this value.
> -  LLVMContext &Context = F.getContext();
> -
>   Type *VoidPtr = PointerType::getUnqual(Type::Int8Ty);
>
>   // Truncate the ShadowStackDescriptor if some metadata is null.
> @@ -209,7 +207,7 @@
>
>   Constant *DescriptorElts[] = {
>     ConstantStruct::get(BaseElts, 2),
> -    ConstantArray::get(Context.getArrayType(VoidPtr, NumMeta),
> +    ConstantArray::get(ArrayType::get(VoidPtr, NumMeta),
>                        Metadata.begin(), NumMeta)
>   };
>
>
> Modified: llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp (original)
> +++ llvm/trunk/lib/ExecutionEngine/JIT/JIT.cpp Wed Jul 29 17:17:13  
> 2009
> @@ -368,7 +368,6 @@
> GenericValue JIT::runFunction(Function *F,
>                               const std::vector<GenericValue>  
> &ArgValues) {
>   assert(F && "Function *F was null at entry to run()");
> -  LLVMContext &Context = F->getContext();
>
>   void *FPtr = getPointerToFunction(F);
>   assert(FPtr && "Pointer to fn's code was null after  
> getPointerToFunction");
> @@ -470,7 +469,7 @@
>   // arguments.  Make this function and return.
>
>   // First, create the function.
> -  FunctionType *STy=Context.getFunctionType(RetTy, false);
> +  FunctionType *STy=FunctionType::get(RetTy, false);
>   Function *Stub = Function::Create(STy, Function::InternalLinkage,  
> "",
>                                     F->getParent());
>
>
> Modified: llvm/trunk/lib/Linker/LinkModules.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Linker/LinkModules.cpp (original)
> +++ llvm/trunk/lib/Linker/LinkModules.cpp Wed Jul 29 17:17:13 2009
> @@ -1148,7 +1148,7 @@
>          "Appending variables with different section name need to be  
> linked!");
>
>       unsigned NewSize = T1->getNumElements() + T2->getNumElements();
> -      ArrayType *NewType = Context.getArrayType(T1->getElementType(),
> +      ArrayType *NewType = ArrayType::get(T1->getElementType(),
>                                                          NewSize);
>
>       G1->setName("");   // Clear G1's name in case of a conflict!
>
> Modified: llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/CellSPU/SPUISelLowering.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -101,7 +101,7 @@
>     TargetLowering::ArgListEntry Entry;
>     for (unsigned i = 0, e = Op.getNumOperands(); i != e; ++i) {
>       MVT ArgVT = Op.getOperand(i).getValueType();
> -      const Type *ArgTy = ArgVT.getTypeForMVT(*DAG.getContext());
> +      const Type *ArgTy = ArgVT.getTypeForMVT();
>       Entry.Node = Op.getOperand(i);
>       Entry.Ty = ArgTy;
>       Entry.isSExt = isSigned;
> @@ -112,8 +112,7 @@
>                                            TLI.getPointerTy());
>
>     // Splice the libcall in wherever FindInputOutputChains tells us  
> to.
> -    const Type *RetTy =
> -                 Op.getNode()->getValueType(0).getTypeForMVT 
> (*DAG.getContext());
> +    const Type *RetTy = Op.getNode()->getValueType(0).getTypeForMVT 
> ();
>     std::pair<SDValue, SDValue> CallInfo =
>             TLI.LowerCallTo(InChain, RetTy, isSigned, !isSigned,  
> false, false,
>                             0, CallingConv::C, false, Callee, Args,  
> DAG,
>
> Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/PIC16/PIC16ISelLowering.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -372,14 +372,14 @@
>   TargetLowering::ArgListEntry Entry;
>   for (unsigned i = 0; i != NumOps; ++i) {
>     Entry.Node = Ops[i];
> -    Entry.Ty = Entry.Node.getValueType().getTypeForMVT 
> (*DAG.getContext());
> +    Entry.Ty = Entry.Node.getValueType().getTypeForMVT();
>     Entry.isSExt = isSigned;
>     Entry.isZExt = !isSigned;
>     Args.push_back(Entry);
>   }
>   SDValue Callee = DAG.getExternalSymbol(getPIC16LibcallName(Call),  
> MVT::i8);
>
> -   const Type *RetTy = RetVT.getTypeForMVT(*DAG.getContext());
> +   const Type *RetTy = RetVT.getTypeForMVT();
>    std::pair<SDValue,SDValue> CallInfo =
>      LowerCallTo(DAG.getEntryNode(), RetTy, isSigned, !isSigned,  
> false,
>                  false, 0, CallingConv::C, false, Callee, Args, DAG,  
> dl);
>
> Modified: llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/PowerPC/PPCISelLowering.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -1291,7 +1291,7 @@
>
>   // Lower to a call to __trampoline_setup(Trmp, TrampSize, FPtr,  
> ctx_reg)
>   std::pair<SDValue, SDValue> CallResult =
> -    LowerCallTo(Chain, Op.getValueType().getTypeForMVT 
> (*DAG.getContext()),
> +    LowerCallTo(Chain, Op.getValueType().getTypeForMVT(),
>                 false, false, false, false, 0, CallingConv::C, false,
>                 DAG.getExternalSymbol("__trampoline_setup", PtrVT),
>                 Args, DAG, dl);
>
> Modified: llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp (original)
> +++ llvm/trunk/lib/Target/XCore/XCoreISelLowering.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -380,7 +380,7 @@
>     return SDValue();
>   }
>   unsigned ABIAlignment = getTargetData()->
> -    getABITypeAlignment(LD->getMemoryVT().getTypeForMVT 
> (*DAG.getContext()));
> +    getABITypeAlignment(LD->getMemoryVT().getTypeForMVT());
>   // Leave aligned load alone.
>   if (LD->getAlignment() >= ABIAlignment) {
>     return SDValue();
> @@ -475,7 +475,7 @@
>     return SDValue();
>   }
>   unsigned ABIAlignment = getTargetData()->
> -    getABITypeAlignment(ST->getMemoryVT().getTypeForMVT 
> (*DAG.getContext()));
> +    getABITypeAlignment(ST->getMemoryVT().getTypeForMVT());
>   // Leave aligned store alone.
>   if (ST->getAlignment() >= ABIAlignment) {
>     return SDValue();
> @@ -1077,7 +1077,7 @@
>       break;
>     }
>     unsigned ABIAlignment = getTargetData()->
> -      getABITypeAlignment(ST->getMemoryVT().getTypeForMVT 
> (*DAG.getContext()));
> +      getABITypeAlignment(ST->getMemoryVT().getTypeForMVT());
>     unsigned Alignment = ST->getAlignment();
>     if (Alignment >= ABIAlignment) {
>       break;
>
> Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -588,7 +588,7 @@
>   }
>
>   // Construct the new function type using the new arguments.
> -  FunctionType *NFTy = Context.getFunctionType(RetTy, Params, FTy- 
> >isVarArg());
> +  FunctionType *NFTy = FunctionType::get(RetTy, Params, FTy- 
> >isVarArg());
>
>   // Create the new function body and insert it into the module...
>   Function *NF = Function::Create(NFTy, F->getLinkage(), F->getName 
> ());
>
> Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp  
> (original)
> +++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -197,10 +197,9 @@
>   // Start by computing a new prototype for the function, which is  
> the same as
>   // the old function, but doesn't have isVarArg set.
>   const FunctionType *FTy = Fn.getFunctionType();
> -  LLVMContext &Context = FTy->getContext();
>
>   std::vector<const Type*> Params(FTy->param_begin(), FTy->param_end 
> ());
> -  FunctionType *NFTy = Context.getFunctionType(FTy->getReturnType(),
> +  FunctionType *NFTy = FunctionType::get(FTy->getReturnType(),
>                                                 Params, false);
>   unsigned NumArgs = Params.size();
>
> @@ -641,7 +640,7 @@
>       // something and {} into void.
>       // Make the new struct packed if we used to return a packed  
> struct
>       // already.
> -      NRetTy = Context.getStructType(RetTypes, STy->isPacked());
> +      NRetTy = StructType::get(RetTypes, STy->isPacked());
>     else if (RetTypes.size() == 1)
>       // One return type? Just a simple value then, but only if we  
> didn't use to
>       // return a struct with that simple value before.
> @@ -709,7 +708,7 @@
>   }
>
>   // Create the new function type based on the recomputed parameters.
> -  FunctionType *NFTy = Context.getFunctionType(NRetTy, Params,
> +  FunctionType *NFTy = FunctionType::get(NRetTy, Params,
>                                                 FTy->isVarArg());
>
>   // No change?
>
> Modified: llvm/trunk/lib/Transforms/IPO/ExtractGV.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ExtractGV.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/ExtractGV.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/ExtractGV.cpp Wed Jul 29 17:17:13  
> 2009
> @@ -103,13 +103,13 @@
>       // by putting them in the used array
>       {
>         std::vector<Constant *> AUGs;
> -        const Type *SBP= Context.getPointerTypeUnqual(Type::Int8Ty);
> +        const Type *SBP= PointerType::getUnqual(Type::Int8Ty);
>         for (std::vector<GlobalValue*>::iterator GI = Named.begin(),
>                GE = Named.end(); GI != GE; ++GI) {
>           (*GI)->setLinkage(GlobalValue::ExternalLinkage);
>           AUGs.push_back(ConstantExpr::getBitCast(*GI, SBP));
>         }
> -        ArrayType *AT = Context.getArrayType(SBP, AUGs.size());
> +        ArrayType *AT = ArrayType::get(SBP, AUGs.size());
>         Constant *Init = ConstantArray::get(AT, AUGs);
>         GlobalValue *gv = new GlobalVariable(M, AT, false,
>                                               
> GlobalValue::AppendingLinkage,
>
> Modified: llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/GlobalOpt.cpp Wed Jul 29 17:17:13  
> 2009
> @@ -826,7 +826,7 @@
>   if (NElements->getZExtValue() != 1) {
>     // If we have an array allocation, transform it to a single  
> element
>     // allocation to make the code below simpler.
> -    Type *NewTy = Context.getArrayType(MI->getAllocatedType(),
> +    Type *NewTy = ArrayType::get(MI->getAllocatedType(),
>                                  NElements->getZExtValue());
>     MallocInst *NewMI =
>       new MallocInst(NewTy, Context.getNullValue(Type::Int32Ty),
> @@ -1161,7 +1161,7 @@
>       cast<StructType>(cast<PointerType>(PN->getType())- 
> >getElementType());
>
>     Result =
> -     PHINode::Create(Context.getPointerTypeUnqual(ST->getElementType 
> (FieldNo)),
> +     PHINode::Create(PointerType::getUnqual(ST->getElementType 
> (FieldNo)),
>                             PN->getName()+".f"+utostr(FieldNo), PN);
>     PHIsToRewrite.push_back(std::make_pair(PN, FieldNo));
>   } else {
> @@ -1282,7 +1282,7 @@
>
>   for (unsigned FieldNo = 0, e = STy->getNumElements(); FieldNo != e; 
> ++FieldNo){
>     const Type *FieldTy = STy->getElementType(FieldNo);
> -    const Type *PFieldTy = Context.getPointerTypeUnqual(FieldTy);
> +    const Type *PFieldTy = PointerType::getUnqual(FieldTy);
>
>     GlobalVariable *NGV =
>       new GlobalVariable(*GV->getParent(),
> @@ -1957,8 +1957,8 @@
>     if (Ctors[i]) {
>       CSVals[1] = Ctors[i];
>     } else {
> -      const Type *FTy = Context.getFunctionType(Type::VoidTy, false);
> -      const PointerType *PFTy = Context.getPointerTypeUnqual(FTy);
> +      const Type *FTy = FunctionType::get(Type::VoidTy, false);
> +      const PointerType *PFTy = PointerType::getUnqual(FTy);
>       CSVals[1] = Context.getNullValue(PFTy);
>       CSVals[0] = ConstantInt::get(Type::Int32Ty, 2147483647);
>     }
>
> Modified: llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/LowerSetJmp.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -201,9 +201,8 @@
> // This function is always successful, unless it isn't.
> bool LowerSetJmp::doInitialization(Module& M)
> {
> -  LLVMContext &Context = M.getContext();
> -  const Type *SBPTy = Context.getPointerTypeUnqual(Type::Int8Ty);
> -  const Type *SBPPTy = Context.getPointerTypeUnqual(SBPTy);
> +  const Type *SBPTy = PointerType::getUnqual(Type::Int8Ty);
> +  const Type *SBPPTy = PointerType::getUnqual(SBPTy);
>
>   // N.B. See llvm/runtime/GCCLibraries/libexception/SJLJ- 
> Exception.h for
>   // a description of the following library functions.
> @@ -259,7 +258,7 @@
> // throwing the exception for us.
> void LowerSetJmp::TransformLongJmpCall(CallInst* Inst)
> {
> -  const Type* SBPTy = Inst->getContext().getPointerTypeUnqual 
> (Type::Int8Ty);
> +  const Type* SBPTy = PointerType::getUnqual(Type::Int8Ty);
>
>   // Create the call to "__llvm_sjljeh_throw_longjmp". This takes the
>   // same parameters as "longjmp", except that the buffer is cast to a
> @@ -312,7 +311,7 @@
>   assert(Inst && "Couldn't find even ONE instruction in entry  
> block!");
>
>   // Fill in the alloca and call to initialize the SJ map.
> -  const Type *SBPTy = Func->getContext().getPointerTypeUnqual 
> (Type::Int8Ty);
> +  const Type *SBPTy = PointerType::getUnqual(Type::Int8Ty);
>   AllocaInst* Map = new AllocaInst(SBPTy, 0, "SJMap", Inst);
>   CallInst::Create(InitSJMap, Map, "", Inst);
>   return SJMap[Func] = Map;
> @@ -378,7 +377,7 @@
>   Function* Func = ABlock->getParent();
>
>   // Add this setjmp to the setjmp map.
> -  const Type* SBPTy = Inst->getContext().getPointerTypeUnqual 
> (Type::Int8Ty);
> +  const Type* SBPTy = PointerType::getUnqual(Type::Int8Ty);
>   CastInst* BufPtr =
>     new BitCastInst(Inst->getOperand(1), SBPTy, "SBJmpBuf", Inst);
>   std::vector<Value*> Args =
>
> Modified: llvm/trunk/lib/Transforms/IPO/RaiseAllocations.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/RaiseAllocations.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/RaiseAllocations.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/RaiseAllocations.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -70,8 +70,6 @@
> // function into the appropriate instruction.
> //
> void RaiseAllocations::doInitialization(Module &M) {
> -  LLVMContext &Context = M.getContext();
> -
>   // Get Malloc and free prototypes if they exist!
>   MallocFunc = M.getFunction("malloc");
>   if (MallocFunc) {
> @@ -79,7 +77,7 @@
>
>     // Get the expected prototype for malloc
>     const FunctionType *Malloc1Type =
> -      Context.getFunctionType(Context.getPointerTypeUnqual 
> (Type::Int8Ty),
> +      FunctionType::get(PointerType::getUnqual(Type::Int8Ty),
>                       std::vector<const Type*>(1, Type::Int64Ty),  
> false);
>
>     // Chck to see if we got the expected malloc
> @@ -87,14 +85,14 @@
>       // Check to see if the prototype is wrong, giving us i8*(i32)  
> * malloc
>       // This handles the common declaration of: 'void *malloc 
> (unsigned);'
>       const FunctionType *Malloc2Type =
> -        Context.getFunctionType(Context.getPointerTypeUnqual 
> (Type::Int8Ty),
> +        FunctionType::get(PointerType::getUnqual(Type::Int8Ty),
>                           std::vector<const Type*>(1,  
> Type::Int32Ty), false);
>       if (TyWeHave != Malloc2Type) {
>         // Check to see if the prototype is missing, giving us
>         // i8*(...) * malloc
>         // This handles the common declaration of: 'void *malloc();'
>         const FunctionType *Malloc3Type =
> -          Context.getFunctionType(Context.getPointerTypeUnqual 
> (Type::Int8Ty),
> +          FunctionType::get(PointerType::getUnqual(Type::Int8Ty),
>                                     true);
>         if (TyWeHave != Malloc3Type)
>           // Give up
> @@ -108,21 +106,21 @@
>     const FunctionType* TyWeHave = FreeFunc->getFunctionType();
>
>     // Get the expected prototype for void free(i8*)
> -    const FunctionType *Free1Type = Context.getFunctionType 
> (Type::VoidTy,
> -      std::vector<const Type*>(1, Context.getPointerTypeUnqual 
> (Type::Int8Ty)),
> +    const FunctionType *Free1Type = FunctionType::get(Type::VoidTy,
> +      std::vector<const Type*>(1, PointerType::getUnqual 
> (Type::Int8Ty)),
>                                false);
>
>     if (TyWeHave != Free1Type) {
>       // Check to see if the prototype was forgotten, giving us
>       // void (...) * free
>       // This handles the common forward declaration of: 'void free 
> ();'
> -      const FunctionType* Free2Type = Context.getFunctionType 
> (Type::VoidTy,
> +      const FunctionType* Free2Type = FunctionType::get(Type::VoidTy,
>                                                                true);
>
>       if (TyWeHave != Free2Type) {
>         // One last try, check to see if we can find free as
>         // int (...)* free.  This handles the case where NOTHING was  
> declared.
> -        const FunctionType* Free3Type = Context.getFunctionType 
> (Type::Int32Ty,
> +        const FunctionType* Free3Type = FunctionType::get 
> (Type::Int32Ty,
>                                                                   
> true);
>
>         if (TyWeHave != Free3Type) {
> @@ -224,7 +222,7 @@
>           Value *Source = *CS.arg_begin();
>           if (!isa<PointerType>(Source->getType()))
>             Source = new IntToPtrInst(Source,
> -                                   Context.getPointerTypeUnqual 
> (Type::Int8Ty),
> +                                   PointerType::getUnqual 
> (Type::Int8Ty),
>                                       "FreePtrCast", I);
>           new FreeInst(Source, I);
>
>
> Modified: llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp (original)
> +++ llvm/trunk/lib/Transforms/IPO/StructRetPromotion.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -232,8 +232,7 @@
>     AttributesVec.push_back(AttributeWithIndex::get(~0, attrs));
>
>
> -  FunctionType *NFTy =
> -    F->getContext().getFunctionType(STy, Params, FTy->isVarArg());
> +  FunctionType *NFTy = FunctionType::get(STy, Params, FTy->isVarArg 
> ());
>   Function *NF = Function::Create(NFTy, F->getLinkage());
>   NF->takeName(F);
>   NF->copyAttributesFrom(F);
>
> Modified: llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp  
> (original)
> +++ llvm/trunk/lib/Transforms/Instrumentation/BlockProfiling.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -63,7 +63,7 @@
>     if (!I->isDeclaration())
>       ++NumFunctions;
>
> -  const Type *ATy = M.getContext().getArrayType(Type::Int32Ty,  
> NumFunctions);
> +  const Type *ATy = ArrayType::get(Type::Int32Ty, NumFunctions);
>   GlobalVariable *Counters =
>     new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage,
>                        M.getContext().getNullValue(ATy),  
> "FuncProfCounters");
> @@ -108,7 +108,7 @@
>   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
>     NumBlocks += I->size();
>
> -  const Type *ATy = M.getContext().getArrayType(Type::Int32Ty,  
> NumBlocks);
> +  const Type *ATy = ArrayType::get(Type::Int32Ty, NumBlocks);
>   GlobalVariable *Counters =
>     new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage,
>                        M.getContext().getNullValue(ATy),  
> "BlockProfCounters");
>
> Modified: llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp  
> (original)
> +++ llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -64,7 +64,7 @@
>       NumEdges += BB->getTerminator()->getNumSuccessors();
>     }
>
> -  const Type *ATy = M.getContext().getArrayType(Type::Int32Ty,  
> NumEdges);
> +  const Type *ATy = ArrayType::get(Type::Int32Ty, NumEdges);
>   GlobalVariable *Counters =
>     new GlobalVariable(M, ATy, false, GlobalValue::InternalLinkage,
>                        M.getContext().getNullValue(ATy),  
> "EdgeProfCounters");
>
> Modified: llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp  
> (original)
> +++ llvm/trunk/lib/Transforms/Instrumentation/ProfilingUtils.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -25,8 +25,8 @@
>                                    GlobalValue *Array) {
>   LLVMContext &Context = MainFn->getContext();
>   const Type *ArgVTy =
> -    Context.getPointerTypeUnqual(Context.getPointerTypeUnqual 
> (Type::Int8Ty));
> -  const PointerType *UIntPtr = Context.getPointerTypeUnqual 
> (Type::Int32Ty);
> +    PointerType::getUnqual(PointerType::getUnqual(Type::Int8Ty));
> +  const PointerType *UIntPtr = PointerType::getUnqual(Type::Int32Ty);
>   Module &M = *MainFn->getParent();
>   Constant *InitFn = M.getOrInsertFunction(FnName, Type::Int32Ty,  
> Type::Int32Ty,
>                                            ArgVTy, UIntPtr,  
> Type::Int32Ty,
>
> Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp  
> (original)
> +++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -7681,7 +7681,7 @@
>       case 32 :
>       case 64 :
>       case 128:
> -        SExtType = Context->getIntegerType(Ty->getBitWidth() -  
> ShiftAmt1);
> +        SExtType = IntegerType::get(Ty->getBitWidth() - ShiftAmt1);
>         break;
>       default: break;
>       }
> @@ -9697,7 +9697,7 @@
>
>   // Use an integer load+store unless we can find something better.
>   Type *NewPtrTy =
> -                Context->getPointerTypeUnqual(Context- 
> >getIntegerType(Size<<3));
> +                PointerType::getUnqual(IntegerType::get(Size<<3));
>
>   // Memcpy forces the use of i8* for the source and destination.   
> That means
>   // that if you're using memcpy to move one double around, you'll  
> get a cast
> @@ -9726,7 +9726,7 @@
>       }
>
>       if (SrcETy->isSingleValueType())
> -        NewPtrTy = Context->getPointerTypeUnqual(SrcETy);
> +        NewPtrTy = PointerType::getUnqual(SrcETy);
>     }
>   }
>
> @@ -9768,10 +9768,10 @@
>
>   // memset(s,c,n) -> store s, c (for n=1,2,4,8)
>   if (Len <= 8 && isPowerOf2_32((uint32_t)Len)) {
> -    const Type *ITy = Context->getIntegerType(Len*8);  // n=1 -> i8.
> +    const Type *ITy = IntegerType::get(Len*8);  // n=1 -> i8.
>
>     Value *Dest = MI->getDest();
> -    Dest = InsertBitCastBefore(Dest, Context->getPointerTypeUnqual 
> (ITy), *MI);
> +    Dest = InsertBitCastBefore(Dest, PointerType::getUnqual(ITy),  
> *MI);
>
>     // Alignment 0 is identity for alignment 1 for memset, but not  
> store.
>     if (Alignment == 0) Alignment = 1;
> @@ -9875,7 +9875,7 @@
>     // Turn X86 loadups -> load if the pointer is known aligned.
>     if (GetOrEnforceKnownAlignment(II->getOperand(1), 16) >= 16) {
>       Value *Ptr = InsertBitCastBefore(II->getOperand(1),
> -                                   Context->getPointerTypeUnqual(II- 
> >getType()),
> +                                   PointerType::getUnqual(II- 
> >getType()),
>                                        CI);
>       return new LoadInst(Ptr);
>     }
> @@ -9885,7 +9885,7 @@
>     // Turn stvx -> store if the pointer is known aligned.
>     if (GetOrEnforceKnownAlignment(II->getOperand(2), 16) >= 16) {
>       const Type *OpPtrTy =
> -        Context->getPointerTypeUnqual(II->getOperand(1)->getType());
> +        PointerType::getUnqual(II->getOperand(1)->getType());
>       Value *Ptr = InsertBitCastBefore(II->getOperand(2), OpPtrTy,  
> CI);
>       return new StoreInst(II->getOperand(1), Ptr);
>     }
> @@ -9896,7 +9896,7 @@
>     // Turn X86 storeu -> store if the pointer is known aligned.
>     if (GetOrEnforceKnownAlignment(II->getOperand(1), 16) >= 16) {
>       const Type *OpPtrTy =
> -        Context->getPointerTypeUnqual(II->getOperand(2)->getType());
> +        PointerType::getUnqual(II->getOperand(2)->getType());
>       Value *Ptr = InsertBitCastBefore(II->getOperand(1), OpPtrTy,  
> CI);
>       return new StoreInst(II->getOperand(2), Ptr);
>     }
> @@ -10062,7 +10062,7 @@
>       // If the call and callee calling conventions don't match,  
> this call must
>       // be unreachable, as the call is undefined.
>       new StoreInst(Context->getTrue(),
> -                Context->getUndef(Context->getPointerTypeUnqual 
> (Type::Int1Ty)),
> +                Context->getUndef(PointerType::getUnqual 
> (Type::Int1Ty)),
>                                   OldCall);
>       if (!OldCall->use_empty())
>         OldCall->replaceAllUsesWith(Context->getUndef(OldCall- 
> >getType()));
> @@ -10076,7 +10076,7 @@
>     // undef so that we know that this code is not reachable,  
> despite the fact
>     // that we can't modify the CFG here.
>     new StoreInst(Context->getTrue(),
> -               Context->getUndef(Context->getPointerTypeUnqual 
> (Type::Int1Ty)),
> +               Context->getUndef(PointerType::getUnqual 
> (Type::Int1Ty)),
>                   CS.getInstruction());
>
>     if (!CS.getInstruction()->use_empty())
> @@ -10457,13 +10457,12 @@
>
>       // Replace the trampoline call with a direct call.  Let the  
> generic
>       // code sort out any function type mismatches.
> -      FunctionType *NewFTy =
> -                       Context->getFunctionType(FTy->getReturnType 
> (), NewTypes,
> +      FunctionType *NewFTy = FunctionType::get(FTy->getReturnType 
> (), NewTypes,
>                                                 FTy->isVarArg());
>       Constant *NewCallee =
> -        NestF->getType() == Context->getPointerTypeUnqual(NewFTy) ?
> +        NestF->getType() == PointerType::getUnqual(NewFTy) ?
>         NestF : ConstantExpr::getBitCast(NestF,
> -                                         Context- 
> >getPointerTypeUnqual(NewFTy));
> +                                         PointerType::getUnqual 
> (NewFTy));
>       const AttrListPtr &NewPAL = AttrListPtr::get(NewAttrs.begin(),
>                                                    NewAttrs.end());
>
> @@ -11367,7 +11366,7 @@
>   if (AI.isArrayAllocation()) {  // Check C != 1
>     if (const ConstantInt *C = dyn_cast<ConstantInt>(AI.getArraySize 
> ())) {
>       const Type *NewTy =
> -        Context->getArrayType(AI.getAllocatedType(), C->getZExtValue 
> ());
> +        ArrayType::get(AI.getAllocatedType(), C->getZExtValue());
>       AllocationInst *New = 0;
>
>       // Create and insert the replacement instruction...
> @@ -11427,7 +11426,7 @@
>   if (isa<UndefValue>(Op)) {
>     // Insert a new store to null because we cannot modify the CFG  
> here.
>     new StoreInst(Context->getTrue(),
> -           Context->getUndef(Context->getPointerTypeUnqual 
> (Type::Int1Ty)), &FI);
> +           Context->getUndef(PointerType::getUnqual(Type::Int1Ty)),  
> &FI);
>     return EraseInstFromFunction(FI);
>   }
>
> @@ -11734,7 +11733,7 @@
>       }
>     }
>
> -    SrcTy = Context->getPointerType(SrcPTy, SrcTy->getAddressSpace 
> ());
> +    SrcTy = PointerType::get(SrcPTy, SrcTy->getAddressSpace());
>   }
>
>   if (!SrcPTy->isInteger() && !isa<PointerType>(SrcPTy))
> @@ -12456,7 +12455,7 @@
>         unsigned AS =
>           cast<PointerType>(I->getOperand(0)->getType())- 
> >getAddressSpace();
>         Value *Ptr = InsertBitCastBefore(I->getOperand(0),
> -                                  Context->getPointerType(EI.getType 
> (), AS),EI);
> +                                  PointerType::get(EI.getType(),  
> AS),EI);
>         GetElementPtrInst *GEP =
>           GetElementPtrInst::Create(Ptr, EI.getOperand(1), I->getName 
> ()+".gep");
>         cast<GEPOperator>(GEP)->setIsInBounds(true);
>
> Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Jul  
> 29 17:17:13 2009
> @@ -1947,7 +1947,7 @@
>
>       NewCmpTy = NewCmpLHS->getType();
>       NewTyBits = SE->getTypeSizeInBits(NewCmpTy);
> -      const Type *NewCmpIntTy = Context.getIntegerType(NewTyBits);
> +      const Type *NewCmpIntTy = IntegerType::get(NewTyBits);
>       if (RequiresTypeConversion(NewCmpTy, CmpTy)) {
>         // Check if it is possible to rewrite it using
>         // an iv / stride of a smaller integer type.
>
> Modified: llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/MemCpyOptimizer.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -352,7 +352,6 @@
>
>   TargetData &TD = getAnalysis<TargetData>();
>   AliasAnalysis &AA = getAnalysis<AliasAnalysis>();
> -  LLVMContext &Context = SI->getContext();
>   Module *M = SI->getParent()->getParent()->getParent();
>
>   // Okay, so we now have a single store that can be splatable.   
> Scan to find
> @@ -441,7 +440,7 @@
>     StartPtr = Range.StartPtr;
>
>     // Cast the start ptr to be i8* as memset requires.
> -    const Type *i8Ptr = Context.getPointerTypeUnqual(Type::Int8Ty);
> +    const Type *i8Ptr = PointerType::getUnqual(Type::Int8Ty);
>     if (StartPtr->getType() != i8Ptr)
>       StartPtr = new BitCastInst(StartPtr, i8Ptr, StartPtr->getName(),
>                                  InsertPt);
>
> Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp  
> (original)
> +++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Wed  
> Jul 29 17:17:13 2009
> @@ -307,7 +307,7 @@
>         DOUT << "CONVERT TO SCALAR INTEGER: " << *AI << "\n";
>
>         // Create and insert the integer alloca.
> -        const Type *NewTy = F.getContext().getIntegerType 
> (AllocaSize*8);
> +        const Type *NewTy = IntegerType::get(AllocaSize*8);
>         NewAI = new AllocaInst(NewTy, 0, "", AI->getParent()->begin 
> ());
>         ConvertUsesToScalar(AI, NewAI, 0);
>       }
> @@ -900,7 +900,6 @@
>                                          SmallVector<AllocaInst*,  
> 32> &NewElts){
>   // Extract each element out of the integer according to its  
> structure offset
>   // and store the element value to the individual alloca.
> -  LLVMContext &Context = SI->getContext();
>   Value *SrcVal = SI->getOperand(0);
>   const Type *AllocaEltTy = AI->getType()->getElementType();
>   uint64_t AllocaSizeBits = TD->getTypeAllocSizeInBits(AllocaEltTy);
> @@ -914,7 +913,7 @@
>   // Handle tail padding by extending the operand
>   if (TD->getTypeSizeInBits(SrcVal->getType()) != AllocaSizeBits)
>     SrcVal = new ZExtInst(SrcVal,
> -                          Context.getIntegerType(AllocaSizeBits),  
> "", SI);
> +                          IntegerType::get(AllocaSizeBits), "", SI);
>
>   DOUT << "PROMOTING STORE TO WHOLE ALLOCA: " << *AI << *SI;
>
> @@ -946,7 +945,7 @@
>
>       if (FieldSizeBits != AllocaSizeBits)
>         EltVal = new TruncInst(EltVal,
> -                               Context.getIntegerType 
> (FieldSizeBits), "", SI);
> +                               IntegerType::get(FieldSizeBits), "",  
> SI);
>       Value *DestField = NewElts[i];
>       if (EltVal->getType() == FieldTy) {
>         // Storing to an integer field of this size, just do it.
> @@ -956,7 +955,7 @@
>       } else {
>         // Otherwise, bitcast the dest pointer (for aggregates).
>         DestField = new BitCastInst(DestField,
> -                              Context.getPointerTypeUnqual(EltVal- 
> >getType()),
> +                              PointerType::getUnqual(EltVal->getType 
> ()),
>                                     "", SI);
>       }
>       new StoreInst(EltVal, DestField, SI);
> @@ -989,7 +988,7 @@
>       // Truncate down to an integer of the right size.
>       if (ElementSizeBits != AllocaSizeBits)
>         EltVal = new TruncInst(EltVal,
> -                               Context.getIntegerType 
> (ElementSizeBits),"",SI);
> +                               IntegerType::get 
> (ElementSizeBits),"",SI);
>       Value *DestField = NewElts[i];
>       if (EltVal->getType() == ArrayEltTy) {
>         // Storing to an integer field of this size, just do it.
> @@ -999,7 +998,7 @@
>       } else {
>         // Otherwise, bitcast the dest pointer (for aggregates).
>         DestField = new BitCastInst(DestField,
> -                              Context.getPointerTypeUnqual(EltVal- 
> >getType()),
> +                              PointerType::getUnqual(EltVal->getType 
> ()),
>                                     "", SI);
>       }
>       new StoreInst(EltVal, DestField, SI);
> @@ -1046,7 +1045,7 @@
>   LLVMContext &Context = LI->getContext();
>
>   Value *ResultVal =
> -    Context.getNullValue(Context.getIntegerType(AllocaSizeBits));
> +    Context.getNullValue(IntegerType::get(AllocaSizeBits));
>
>   for (unsigned i = 0, e = NewElts.size(); i != e; ++i) {
>     // Load the value from the alloca.  If the NewElt is an  
> aggregate, cast
> @@ -1059,11 +1058,11 @@
>     // Ignore zero sized fields like {}, they obviously contain no  
> data.
>     if (FieldSizeBits == 0) continue;
>
> -    const IntegerType *FieldIntTy = Context.getIntegerType 
> (FieldSizeBits);
> +    const IntegerType *FieldIntTy = IntegerType::get(FieldSizeBits);
>     if (!isa<IntegerType>(FieldTy) && !FieldTy->isFloatingPoint() &&
>         !isa<VectorType>(FieldTy))
>       SrcField = new BitCastInst(SrcField,
> -                                 Context.getPointerTypeUnqual 
> (FieldIntTy),
> +                                 PointerType::getUnqual(FieldIntTy),
>                                  "", LI);
>     SrcField = new LoadInst(SrcField, "sroa.load.elt", LI);
>
> @@ -1297,7 +1296,7 @@
>            cast<VectorType>(VecTy)->getElementType()
>                  ->getPrimitiveSizeInBits()/8 == EltSize)) {
>         if (VecTy == 0)
> -          VecTy = In->getContext().getVectorType(In, AllocaSize/ 
> EltSize);
> +          VecTy = VectorType::get(In, AllocaSize/EltSize);
>         return;
>       }
>     }
> @@ -1623,10 +1622,10 @@
>   unsigned LIBitWidth = TD->getTypeSizeInBits(ToType);
>   if (LIBitWidth < NTy->getBitWidth())
>     FromVal =
> -      Builder.CreateTrunc(FromVal, Context.getIntegerType 
> (LIBitWidth), "tmp");
> +      Builder.CreateTrunc(FromVal, IntegerType::get(LIBitWidth),  
> "tmp");
>   else if (LIBitWidth > NTy->getBitWidth())
>     FromVal =
> -       Builder.CreateZExt(FromVal, Context.getIntegerType 
> (LIBitWidth), "tmp");
> +       Builder.CreateZExt(FromVal, IntegerType::get(LIBitWidth),  
> "tmp");
>
>   // If the result is an integer, this is a trunc or bitcast.
>   if (isa<IntegerType>(ToType)) {
> @@ -1711,7 +1710,7 @@
>   unsigned SrcStoreWidth = TD->getTypeStoreSizeInBits(SV->getType());
>   unsigned DestStoreWidth = TD->getTypeStoreSizeInBits(AllocaType);
>   if (SV->getType()->isFloatingPoint() || isa<VectorType>(SV->getType 
> ()))
> -    SV = Builder.CreateBitCast(SV, Context.getIntegerType 
> (SrcWidth), "tmp");
> +    SV = Builder.CreateBitCast(SV, IntegerType::get(SrcWidth),  
> "tmp");
>   else if (isa<PointerType>(SV->getType()))
>     SV = Builder.CreatePtrToInt(SV, TD->getIntPtrType(), "tmp");
>
>
> Modified: llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp (original)
> +++ llvm/trunk/lib/Transforms/Scalar/SimplifyLibCalls.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -126,7 +126,7 @@
> /// CastToCStr - Return V if it is an i8*, otherwise cast it to i8*.
> Value *LibCallOptimization::CastToCStr(Value *V, IRBuilder<> &B) {
>   return
> -        B.CreateBitCast(V, Context->getPointerTypeUnqual 
> (Type::Int8Ty), "cstr");
> +        B.CreateBitCast(V, PointerType::getUnqual(Type::Int8Ty),  
> "cstr");
> }
>
> /// EmitStrLen - Emit a call to the strlen function to the builder,  
> for the
> @@ -140,7 +140,7 @@
>
>   Constant *StrLen =M->getOrInsertFunction("strlen", AttrListPtr::get 
> (AWI, 2),
>                                            TD->getIntPtrType(),
> -                                    Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                                    PointerType::getUnqual 
> (Type::Int8Ty),
>                                            NULL);
>   CallInst *CI = B.CreateCall(StrLen, CastToCStr(Ptr, B), "strlen");
>   if (const Function *F = dyn_cast<Function>(StrLen- 
> >stripPointerCasts()))
> @@ -171,8 +171,8 @@
>   AWI = AttributeWithIndex::get(~0u, Attribute::ReadOnly |  
> Attribute::NoUnwind);
>
>   Value *MemChr = M->getOrInsertFunction("memchr", AttrListPtr::get 
> (&AWI, 1),
> -                                    Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> -                                    Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                                    PointerType::getUnqual 
> (Type::Int8Ty),
> +                                    PointerType::getUnqual 
> (Type::Int8Ty),
>                                          Type::Int32Ty, TD- 
> >getIntPtrType(),
>                                          NULL);
>   CallInst *CI = B.CreateCall3(MemChr, CastToCStr(Ptr, B), Val, Len,  
> "memchr");
> @@ -195,8 +195,8 @@
>
>   Value *MemCmp = M->getOrInsertFunction("memcmp", AttrListPtr::get 
> (AWI, 3),
>                                          Type::Int32Ty,
> -                                    Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> -                                    Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                                    PointerType::getUnqual 
> (Type::Int8Ty),
> +                                    PointerType::getUnqual 
> (Type::Int8Ty),
>                                          TD->getIntPtrType(), NULL);
>   CallInst *CI = B.CreateCall3(MemCmp, CastToCStr(Ptr1, B),  
> CastToCStr(Ptr2, B),
>                                Len, "memcmp");
> @@ -274,7 +274,7 @@
>
>   Value *PutS = M->getOrInsertFunction("puts", AttrListPtr::get(AWI,  
> 2),
>                                        Type::Int32Ty,
> -                                    Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                                    PointerType::getUnqual 
> (Type::Int8Ty),
>                                        NULL);
>   CallInst *CI = B.CreateCall(PutS, CastToCStr(Str, B), "puts");
>   if (const Function *F = dyn_cast<Function>(PutS->stripPointerCasts 
> ()))
> @@ -314,11 +314,11 @@
>   Constant *F;
>   if (isa<PointerType>(File->getType()))
>     F = M->getOrInsertFunction("fputs", AttrListPtr::get(AWI, 3),  
> Type::Int32Ty,
> -                               Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                               PointerType::getUnqual(Type::Int8Ty),
>                                File->getType(), NULL);
>   else
>     F = M->getOrInsertFunction("fputs", Type::Int32Ty,
> -                               Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                               PointerType::getUnqual(Type::Int8Ty),
>                                File->getType(), NULL);
>   CallInst *CI = B.CreateCall2(F, CastToCStr(Str, B), File, "fputs");
>
> @@ -339,12 +339,12 @@
>   if (isa<PointerType>(File->getType()))
>     F = M->getOrInsertFunction("fwrite", AttrListPtr::get(AWI, 3),
>                                TD->getIntPtrType(),
> -                               Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                               PointerType::getUnqual(Type::Int8Ty),
>                                TD->getIntPtrType(), TD->getIntPtrType 
> (),
>                                File->getType(), NULL);
>   else
>     F = M->getOrInsertFunction("fwrite", TD->getIntPtrType(),
> -                               Context->getPointerTypeUnqual 
> (Type::Int8Ty),
> +                               PointerType::getUnqual(Type::Int8Ty),
>                                TD->getIntPtrType(), TD->getIntPtrType 
> (),
>                                File->getType(), NULL);
>   CallInst *CI = B.CreateCall4(F, CastToCStr(Ptr, B), Size,
> @@ -555,7 +555,7 @@
>     // Verify the "strcat" function prototype.
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 2 ||
> -        FT->getReturnType() != Context->getPointerTypeUnqual 
> (Type::Int8Ty) ||
> +        FT->getReturnType() != PointerType::getUnqual(Type::Int8Ty)  
> ||
>         FT->getParamType(0) != FT->getReturnType() ||
>         FT->getParamType(1) != FT->getReturnType())
>       return 0;
> @@ -602,7 +602,7 @@
>     // Verify the "strncat" function prototype.
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 3 ||
> -        FT->getReturnType() != Context->getPointerTypeUnqual 
> (Type::Int8Ty) ||
> +        FT->getReturnType() != PointerType::getUnqual(Type::Int8Ty)  
> ||
>         FT->getParamType(0) != FT->getReturnType() ||
>         FT->getParamType(1) != FT->getReturnType() ||
>         !isa<IntegerType>(FT->getParamType(2)))
> @@ -647,7 +647,7 @@
>     // Verify the "strchr" function prototype.
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 2 ||
> -        FT->getReturnType() != Context->getPointerTypeUnqual 
> (Type::Int8Ty) ||
> +        FT->getReturnType() != PointerType::getUnqual(Type::Int8Ty)  
> ||
>         FT->getParamType(0) != FT->getReturnType())
>       return 0;
>
> @@ -701,7 +701,7 @@
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 2 || FT->getReturnType() !=  
> Type::Int32Ty ||
>         FT->getParamType(0) != FT->getParamType(1) ||
> -        FT->getParamType(0) != Context->getPointerTypeUnqual 
> (Type::Int8Ty))
> +        FT->getParamType(0) != PointerType::getUnqual(Type::Int8Ty))
>       return 0;
>
>     Value *Str1P = CI->getOperand(1), *Str2P = CI->getOperand(2);
> @@ -745,7 +745,7 @@
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 3 || FT->getReturnType() !=  
> Type::Int32Ty ||
>         FT->getParamType(0) != FT->getParamType(1) ||
> -        FT->getParamType(0) != Context->getPointerTypeUnqual 
> (Type::Int8Ty) ||
> +        FT->getParamType(0) != PointerType::getUnqual(Type::Int8Ty)  
> ||
>         !isa<IntegerType>(FT->getParamType(2)))
>       return 0;
>
> @@ -791,7 +791,7 @@
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 2 || FT->getReturnType() != FT- 
> >getParamType(0) ||
>         FT->getParamType(0) != FT->getParamType(1) ||
> -        FT->getParamType(0) != Context->getPointerTypeUnqual 
> (Type::Int8Ty))
> +        FT->getParamType(0) != PointerType::getUnqual(Type::Int8Ty))
>       return 0;
>
>     Value *Dst = CI->getOperand(1), *Src = CI->getOperand(2);
> @@ -818,7 +818,7 @@
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 3 || FT->getReturnType() != FT- 
> >getParamType(0) ||
>         FT->getParamType(0) != FT->getParamType(1) ||
> -        FT->getParamType(0) != Context->getPointerTypeUnqual 
> (Type::Int8Ty) ||
> +        FT->getParamType(0) != PointerType::getUnqual(Type::Int8Ty)  
> ||
>         !isa<IntegerType>(FT->getParamType(2)))
>       return 0;
>
> @@ -863,7 +863,7 @@
>   virtual Value *CallOptimizer(Function *Callee, CallInst *CI,  
> IRBuilder<> &B) {
>     const FunctionType *FT = Callee->getFunctionType();
>     if (FT->getNumParams() != 1 ||
> -        FT->getParamType(0) != Context->getPointerTypeUnqual 
> (Type::Int8Ty) ||
> +        FT->getParamType(0) != PointerType::getUnqual(Type::Int8Ty)  
> ||
>         !isa<IntegerType>(FT->getReturnType()))
>       return 0;
>
> @@ -937,7 +937,7 @@
>     // memcmp(S1,S2,2) != 0 -> (*(short*)LHS ^ *(short*)RHS)  != 0
>     // memcmp(S1,S2,4) != 0 -> (*(int*)LHS ^ *(int*)RHS)  != 0
>     if ((Len == 2 || Len == 4) && IsOnlyUsedInZeroEqualityComparison 
> (CI)) {
> -      const Type *PTy = Context->getPointerTypeUnqual(Len == 2 ?
> +      const Type *PTy = PointerType::getUnqual(Len == 2 ?
>                                                Type::Int16Ty :  
> Type::Int32Ty);
>       LHS = B.CreateBitCast(LHS, PTy, "tmp");
>       RHS = B.CreateBitCast(RHS, PTy, "tmp");
>
> Modified: llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/CloneFunction.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -151,8 +151,7 @@
>       ArgTypes.push_back(I->getType());
>
>   // Create a new function type...
> -  FunctionType *FTy =
> -     F->getContext().getFunctionType(F->getFunctionType()- 
> >getReturnType(),
> +  FunctionType *FTy = FunctionType::get(F->getFunctionType()- 
> >getReturnType(),
>                                     ArgTypes, F->getFunctionType()- 
> >isVarArg());
>
>   // Create the new function...
>
> Modified: llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/CodeExtractor.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -266,8 +266,7 @@
>     if (AggregateArgs)
>       paramTy.push_back((*I)->getType());
>     else
> -      paramTy.push_back(
> -         header->getContext().getPointerTypeUnqual((*I)->getType()));
> +      paramTy.push_back(PointerType::getUnqual((*I)->getType()));
>   }
>
>   DOUT << "Function type: " << *RetTy << " f(";
> @@ -278,12 +277,12 @@
>
>   if (AggregateArgs && (inputs.size() + outputs.size() > 0)) {
>     PointerType *StructPtr =
> -           Context.getPointerTypeUnqual(Context.getStructType 
> (paramTy));
> +           PointerType::getUnqual(StructType::get(paramTy));
>     paramTy.clear();
>     paramTy.push_back(StructPtr);
>   }
>   const FunctionType *funcType =
> -                  Context.getFunctionType(RetTy, paramTy, false);
> +                  FunctionType::get(RetTy, paramTy, false);
>
>   // Create the new function
>   Function *newFunction = Function::Create(funcType,
> @@ -387,7 +386,7 @@
>       ArgTypes.push_back((*v)->getType());
>
>     // Allocate a struct at the beginning of this function
> -    Type *StructArgTy = Context.getStructType(ArgTypes);
> +    Type *StructArgTy = StructType::get(ArgTypes);
>     Struct =
>       new AllocaInst(StructArgTy, 0, "structArg",
>                      codeReplacer->getParent()->begin()->begin());
>
> Modified: llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/InlineFunction.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -304,7 +304,7 @@
>       if (CalledFunc->paramHasAttr(ArgNo+1, Attribute::ByVal) &&
>           !CalledFunc->onlyReadsMemory()) {
>         const Type *AggTy = cast<PointerType>(I->getType())- 
> >getElementType();
> -        const Type *VoidPtrTy = Context.getPointerTypeUnqual 
> (Type::Int8Ty);
> +        const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty);
>
>         // Create the alloca.  If we have TargetData, use nice  
> alignment.
>         unsigned Align = 1;
>
> Modified: llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -87,10 +87,10 @@
> // This function is always successful.
> //
> bool LowerAllocations::doInitialization(Module &M) {
> -  const Type *BPTy = M.getContext().getPointerTypeUnqual 
> (Type::Int8Ty);
> +  const Type *BPTy = PointerType::getUnqual(Type::Int8Ty);
>   // Prototype malloc as "char* malloc(...)", because we don't know in
>   // doInitialization whether size_t is int or long.
> -  FunctionType *FT = M.getContext().getFunctionType(BPTy, true);
> +  FunctionType *FT = FunctionType::get(BPTy, true);
>   MallocFunc = M.getOrInsertFunction("malloc", FT);
>   FreeFunc = M.getOrInsertFunction("free"  , Type::VoidTy, BPTy,  
> (Type *)0);
>   return true;
> @@ -166,7 +166,7 @@
>     } else if (FreeInst *FI = dyn_cast<FreeInst>(I)) {
>       Value *PtrCast =
>         new BitCastInst(FI->getOperand(0),
> -                        Context.getPointerTypeUnqual(Type::Int8Ty),  
> "", I);
> +                        PointerType::getUnqual(Type::Int8Ty), "", I);
>
>       // Insert a call to the free function...
>       CallInst::Create(FreeFunc, PtrCast, "", I)->setTailCall();
>
> Modified: llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp (original)
> +++ llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -117,26 +117,26 @@
> bool LowerInvoke::doInitialization(Module &M) {
>   LLVMContext &Context = M.getContext();
>
> -  const Type *VoidPtrTy = Context.getPointerTypeUnqual(Type::Int8Ty);
> +  const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty);
>   AbortMessage = 0;
>   if (ExpensiveEHSupport) {
>     // Insert a type for the linked list of jump buffers.
>     unsigned JBSize = TLI ? TLI->getJumpBufSize() : 0;
>     JBSize = JBSize ? JBSize : 200;
> -    const Type *JmpBufTy = Context.getArrayType(VoidPtrTy, JBSize);
> +    const Type *JmpBufTy = ArrayType::get(VoidPtrTy, JBSize);
>
>     { // The type is recursive, so use a type holder.
>       std::vector<const Type*> Elements;
>       Elements.push_back(JmpBufTy);
> -      OpaqueType *OT = Context.getOpaqueType();
> -      Elements.push_back(Context.getPointerTypeUnqual(OT));
> -      PATypeHolder JBLType(Context.getStructType(Elements));
> +      OpaqueType *OT = OpaqueType::get();
> +      Elements.push_back(PointerType::getUnqual(OT));
> +      PATypeHolder JBLType(StructType::get(Elements));
>       OT->refineAbstractTypeTo(JBLType.get());  // Complete the cycle.
>       JBLinkTy = JBLType.get();
>       M.addTypeName("llvm.sjljeh.jmpbufty", JBLinkTy);
>     }
>
> -    const Type *PtrJBList = Context.getPointerTypeUnqual(JBLinkTy);
> +    const Type *PtrJBList = PointerType::getUnqual(JBLinkTy);
>
>     // Now that we've done that, insert the jmpbuf list head global,  
> unless it
>     // already exists.
>
> Modified: llvm/trunk/lib/VMCore/AutoUpgrade.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AutoUpgrade.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/AutoUpgrade.cpp (original)
> +++ llvm/trunk/lib/VMCore/AutoUpgrade.cpp Wed Jul 29 17:17:13 2009
> @@ -27,8 +27,6 @@
> static bool UpgradeIntrinsicFunction1(Function *F, Function *&NewFn) {
>   assert(F && "Illegal to upgrade a non-existent Function.");
>
> -  LLVMContext &Context = F->getContext();
> -
>   // Get the Function's name.
>   const std::string& Name = F->getName();
>
> @@ -167,7 +165,7 @@
>          Name.compare(13,4,"psrl", 4) == 0) && Name[17] != 'i') {
>
>       const llvm::Type *VT =
> -                        Context.getVectorType(Context.getIntegerType 
> (64), 1);
> +                        VectorType::get(IntegerType::get(64), 1);
>
>       // We don't have to do anything if the parameter already has
>       // the correct type.
> @@ -268,7 +266,7 @@
>       if (isLoadH || isLoadL) {
>         Value *Op1 = Context.getUndef(Op0->getType());
>         Value *Addr = new BitCastInst(CI->getOperand(2),
> -                                  Context.getPointerTypeUnqual 
> (Type::DoubleTy),
> +                                  PointerType::getUnqual 
> (Type::DoubleTy),
>                                       "upgraded.", CI);
>         Value *Load = new LoadInst(Addr, "upgraded.", false, 8, CI);
>         Value *Idx = ConstantInt::get(Type::Int32Ty, 0);
>
> Modified: llvm/trunk/lib/VMCore/ConstantFold.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ConstantFold.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/ConstantFold.cpp (original)
> +++ llvm/trunk/lib/VMCore/ConstantFold.cpp Wed Jul 29 17:17:13 2009
> @@ -1373,7 +1373,7 @@
>                                                const Constant *C2) {
>   const Type *ResultTy;
>   if (const VectorType *VT = dyn_cast<VectorType>(C1->getType()))
> -    ResultTy = Context.getVectorType(Type::Int1Ty, VT- 
> >getNumElements());
> +    ResultTy = VectorType::get(Type::Int1Ty, VT->getNumElements());
>   else
>     ResultTy = Type::Int1Ty;
>
> @@ -1677,7 +1677,7 @@
>                                                        (Value **)Idxs,
>                                                        (Value **)Idxs 
> +NumIdx);
>     assert(Ty != 0 && "Invalid indices for GEP!");
> -    return Context.getUndef(Context.getPointerType(Ty, Ptr- 
> >getAddressSpace()));
> +    return Context.getUndef(PointerType::get(Ty, Ptr- 
> >getAddressSpace()));
>   }
>
>   Constant *Idx0 = Idxs[0];
> @@ -1695,7 +1695,7 @@
>                                                          (Value**) 
> Idxs+NumIdx);
>       assert(Ty != 0 && "Invalid indices for GEP!");
>       return  Context.getConstantPointerNull(
> -                            Context.getPointerType(Ty,Ptr- 
> >getAddressSpace()));
> +                            PointerType::get(Ty,Ptr->getAddressSpace 
> ()));
>     }
>   }
>
>
> Modified: llvm/trunk/lib/VMCore/Constants.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Constants.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/Constants.cpp (original)
> +++ llvm/trunk/lib/VMCore/Constants.cpp Wed Jul 29 17:17:13 2009
> @@ -178,7 +178,7 @@
> // invariant which generates an assertion.
> ConstantInt *ConstantInt::get(LLVMContext &Context, const APInt& V) {
>   // Get the corresponding integer type for the bit width of the  
> value.
> -  const IntegerType *ITy = Context.getIntegerType(V.getBitWidth());
> +  const IntegerType *ITy = IntegerType::get(V.getBitWidth());
>   // get an existing value or the insertion position
>   DenseMapAPIntKeyInfo::KeyTy Key(V, ITy);
>
>
> Modified: llvm/trunk/lib/VMCore/Core.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Core.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/Core.cpp (original)
> +++ llvm/trunk/lib/VMCore/Core.cpp Wed Jul 29 17:17:13 2009
> @@ -162,7 +162,7 @@
> LLVMTypeRef LLVMInt64Type(void) { return (LLVMTypeRef)  
> Type::Int64Ty; }
>
> LLVMTypeRef LLVMIntType(unsigned NumBits) {
> -  return wrap(getGlobalContext().getIntegerType(NumBits));
> +  return wrap(IntegerType::get(NumBits));
> }
>
> unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy) {
> @@ -186,8 +186,7 @@
>   for (LLVMTypeRef *I = ParamTypes, *E = ParamTypes + ParamCount; I ! 
> = E; ++I)
>     Tys.push_back(unwrap(*I));
>
> -  return wrap(getGlobalContext().getFunctionType(unwrap 
> (ReturnType), Tys,
> -                                                 IsVarArg != 0));
> +  return wrap(FunctionType::get(unwrap(ReturnType), Tys, IsVarArg ! 
> = 0));
> }
>
> int LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy) {
> @@ -218,7 +217,7 @@
>                    *E = ElementTypes + ElementCount; I != E; ++I)
>     Tys.push_back(unwrap(*I));
>
> -  return wrap(getGlobalContext().getStructType(Tys, Packed != 0));
> +  return wrap(StructType::get(Tys, Packed != 0));
> }
>
> unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy) {
> @@ -239,18 +238,15 @@
> /*--.. Operations on array, pointer, and vector types (sequence  
> types) .....--*/
>
> LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned  
> ElementCount) {
> -  return wrap(getGlobalContext().getArrayType(unwrap(ElementType),
> -                                               ElementCount));
> +  return wrap(ArrayType::get(unwrap(ElementType), ElementCount));
> }
>
> LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned  
> AddressSpace) {
> -  return wrap(getGlobalContext().getPointerType(unwrap(ElementType),
> -                                                 AddressSpace));
> +  return wrap(PointerType::get(unwrap(ElementType), AddressSpace));
> }
>
> LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned  
> ElementCount) {
> -  return wrap(getGlobalContext().getVectorType(unwrap(ElementType),
> -                                                ElementCount));
> +  return wrap(VectorType::get(unwrap(ElementType), ElementCount));
> }
>
> LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty) {
> @@ -275,7 +271,7 @@
> LLVMTypeRef LLVMLabelType(void) { return (LLVMTypeRef)  
> Type::LabelTy; }
>
> LLVMTypeRef LLVMOpaqueType(void) {
> -  return wrap(getGlobalContext().getOpaqueType());
> +  return wrap(OpaqueType::get());
> }
>
> /*--.. Operations on type  
> handles ..........................................--*/
> @@ -408,8 +404,7 @@
>
> LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy,
>                             LLVMValueRef *ConstantVals, unsigned  
> Length) {
> -  return wrap(ConstantArray::get(
> -                    getGlobalContext().getArrayType(unwrap 
> (ElementTy), Length),
> +  return wrap(ConstantArray::get(ArrayType::get(unwrap(ElementTy),  
> Length),
>                                  unwrap<Constant>(ConstantVals,  
> Length),
>                                  Length));
> }
>
> Modified: llvm/trunk/lib/VMCore/Function.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Function.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/Function.cpp (original)
> +++ llvm/trunk/lib/VMCore/Function.cpp Wed Jul 29 17:17:13 2009
> @@ -346,7 +346,7 @@
> #include "llvm/Intrinsics.gen"
> #undef GET_INTRINSIC_GENERATOR
>
> -  return Context.getFunctionType(ResultTy, ArgTys, IsVarArg);
> +  return FunctionType::get(ResultTy, ArgTys, IsVarArg);
> }
>
> bool Intrinsic::isOverloaded(ID id) {
>
> Modified: llvm/trunk/lib/VMCore/Globals.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Globals.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/Globals.cpp (original)
> +++ llvm/trunk/lib/VMCore/Globals.cpp Wed Jul 29 17:17:13 2009
> @@ -98,7 +98,7 @@
>                                bool constant, LinkageTypes Link,
>                                Constant *InitVal, const Twine &Name,
>                                bool ThreadLocal, unsigned  
> AddressSpace)
> -  : GlobalValue(Context.getPointerType(Ty, AddressSpace),
> +  : GlobalValue(PointerType::get(Ty, AddressSpace),
>                 Value::GlobalVariableVal,
>                 OperandTraits<GlobalVariable>::op_begin(this),
>                 InitVal != 0, Link, Name),
> @@ -117,7 +117,7 @@
>                                const Twine &Name,
>                                GlobalVariable *Before, bool  
> ThreadLocal,
>                                unsigned AddressSpace)
> -  : GlobalValue(M.getContext().getPointerType(Ty, AddressSpace),
> +  : GlobalValue(PointerType::get(Ty, AddressSpace),
>                 Value::GlobalVariableVal,
>                 OperandTraits<GlobalVariable>::op_begin(this),
>                 InitVal != 0, Link, Name),
>
> Modified: llvm/trunk/lib/VMCore/Instructions.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Instructions.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/Instructions.cpp (original)
> +++ llvm/trunk/lib/VMCore/Instructions.cpp Wed Jul 29 17:17:13 2009
> @@ -716,7 +716,7 @@
> AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize,  
> unsigned iTy,
>                                unsigned Align, const Twine &Name,
>                                Instruction *InsertBefore)
> -  : UnaryInstruction(Ty->getContext().getPointerTypeUnqual(Ty), iTy,
> +  : UnaryInstruction(PointerType::getUnqual(Ty), iTy,
>                      getAISize(Ty->getContext(), ArraySize),  
> InsertBefore) {
>   setAlignment(Align);
>   assert(Ty != Type::VoidTy && "Cannot allocate void!");
> @@ -726,7 +726,7 @@
> AllocationInst::AllocationInst(const Type *Ty, Value *ArraySize,  
> unsigned iTy,
>                                unsigned Align, const Twine &Name,
>                                BasicBlock *InsertAtEnd)
> -  : UnaryInstruction(Ty->getContext().getPointerTypeUnqual(Ty), iTy,
> +  : UnaryInstruction(PointerType::getUnqual(Ty), iTy,
>                      getAISize(Ty->getContext(), ArraySize),  
> InsertAtEnd) {
>   setAlignment(Align);
>   assert(Ty != Type::VoidTy && "Cannot allocate void!");
> @@ -1046,7 +1046,7 @@
>
> GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx,
>                                      const Twine &Name, Instruction  
> *InBe)
> -  : Instruction(Ptr->getType()->getContext().getPointerType(
> +  : Instruction(PointerType::get(
>       checkType(getIndexedType(Ptr->getType(),Idx)),  
> retrieveAddrSpace(Ptr)),
>                 GetElementPtr,
>                 OperandTraits<GetElementPtrInst>::op_end(this) - 2,
> @@ -1056,7 +1056,7 @@
>
> GetElementPtrInst::GetElementPtrInst(Value *Ptr, Value *Idx,
>                                      const Twine &Name, BasicBlock  
> *IAE)
> -  : Instruction(Ptr->getType()->getContext().getPointerType(
> +  : Instruction(PointerType::get(
>             checkType(getIndexedType(Ptr->getType(),Idx)),
>                 retrieveAddrSpace(Ptr)),
>                 GetElementPtr,
> @@ -1270,8 +1270,7 @@
> ShuffleVectorInst::ShuffleVectorInst(Value *V1, Value *V2, Value  
> *Mask,
>                                      const Twine &Name,
>                                      Instruction *InsertBefore)
> -: Instruction(V1->getType()->getContext().getVectorType(
> -                              cast<VectorType>(V1->getType())- 
> >getElementType(),
> +: Instruction(VectorType::get(cast<VectorType>(V1->getType())- 
> >getElementType(),
>                 cast<VectorType>(Mask->getType())->getNumElements()),
>               ShuffleVector,
>               OperandTraits<ShuffleVectorInst>::op_begin(this),
>
> Modified: llvm/trunk/lib/VMCore/LLVMContext.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LLVMContext.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/LLVMContext.cpp (original)
> +++ llvm/trunk/lib/VMCore/LLVMContext.cpp Wed Jul 29 17:17:13 2009
> @@ -113,89 +113,6 @@
>   return pImpl->getMDString(Str.data(), Str.size());
> }
>
> -// FunctionType accessors
> -FunctionType* LLVMContext::getFunctionType(const Type* Result, bool  
> isVarArg) {
> -  return FunctionType::get(Result, isVarArg);
> -}
> -
> -FunctionType* LLVMContext::getFunctionType(const Type* Result,
> -                                         const std::vector<const  
> Type*>& Params,
> -                                         bool isVarArg) {
> -  return FunctionType::get(Result, Params, isVarArg);
> -}
> -
> -// IntegerType accessors
> -const IntegerType* LLVMContext::getIntegerType(unsigned NumBits) {
> -  return IntegerType::get(NumBits);
> -}
> -
> -// OpaqueType accessors
> -OpaqueType* LLVMContext::getOpaqueType() {
> -  return OpaqueType::get();
> -}
> -
> -// StructType accessors
> -StructType* LLVMContext::getStructType(bool isPacked) {
> -  return StructType::get(isPacked);
> -}
> -
> -StructType* LLVMContext::getStructType(const std::vector<const  
> Type*>& Params,
> -                                       bool isPacked) {
> -  return StructType::get(Params, isPacked);
> -}
> -
> -StructType *LLVMContext::getStructType(const Type *type, ...) {
> -  va_list ap;
> -  std::vector<const llvm::Type*> StructFields;
> -  va_start(ap, type);
> -  while (type) {
> -    StructFields.push_back(type);
> -    type = va_arg(ap, llvm::Type*);
> -  }
> -  return StructType::get(StructFields);
> -}
> -
> -// ArrayType accessors
> -ArrayType* LLVMContext::getArrayType(const Type* ElementType,
> -                                     uint64_t NumElements) {
> -  return ArrayType::get(ElementType, NumElements);
> -}
> -
> -// PointerType accessors
> -PointerType* LLVMContext::getPointerType(const Type* ElementType,
> -                                         unsigned AddressSpace) {
> -  return PointerType::get(ElementType, AddressSpace);
> -}
> -
> -PointerType* LLVMContext::getPointerTypeUnqual(const Type*  
> ElementType) {
> -  return PointerType::getUnqual(ElementType);
> -}
> -
> -// VectorType accessors
> -VectorType* LLVMContext::getVectorType(const Type* ElementType,
> -                                       unsigned NumElements) {
> -  return VectorType::get(ElementType, NumElements);
> -}
> -
> -VectorType* LLVMContext::getVectorTypeInteger(const VectorType*  
> VTy) {
> -  return VectorType::getInteger(VTy);
> -}
> -
> -VectorType* LLVMContext::getVectorTypeExtendedElement(const  
> VectorType* VTy) {
> -  return VectorType::getExtendedElementVectorType(VTy);
> -}
> -
> -VectorType* LLVMContext::getVectorTypeTruncatedElement(const  
> VectorType* VTy) {
> -  return VectorType::getTruncatedElementVectorType(VTy);
> -}
> -
> -const Type* LLVMContext::makeCmpResultType(const Type* opnd_type) {
> -  if (const VectorType* vt = dyn_cast<const VectorType>(opnd_type)) {
> -    return getVectorType(Type::Int1Ty, vt->getNumElements());
> -  }
> -  return Type::Int1Ty;
> -}
> -
> void LLVMContext::erase(MDString *M) {
>   pImpl->erase(M);
> }
>
> Modified: llvm/trunk/lib/VMCore/Module.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Module.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/Module.cpp (original)
> +++ llvm/trunk/lib/VMCore/Module.cpp Wed Jul 29 17:17:13 2009
> @@ -153,8 +153,8 @@
>
>   // If the function exists but has the wrong type, return a bitcast  
> to the
>   // right type.
> -  if (F->getType() != Context.getPointerTypeUnqual(Ty))
> -    return ConstantExpr::getBitCast(F, Context.getPointerTypeUnqual 
> (Ty));
> +  if (F->getType() != PointerType::getUnqual(Ty))
> +    return ConstantExpr::getBitCast(F, PointerType::getUnqual(Ty));
>
>   // Otherwise, we just found the existing function or a prototype.
>   return F;
> @@ -203,7 +203,7 @@
>
>   // Build the function type and chain to the other  
> getOrInsertFunction...
>   return getOrInsertFunction(Name,
> -                             Context.getFunctionType(RetTy, ArgTys,  
> false),
> +                             FunctionType::get(RetTy, ArgTys, false),
>                              AttributeList);
> }
>
> @@ -221,7 +221,7 @@
>
>   // Build the function type and chain to the other  
> getOrInsertFunction...
>   return getOrInsertFunction(Name,
> -                             Context.getFunctionType(RetTy, ArgTys,  
> false),
> +                             FunctionType::get(RetTy, ArgTys, false),
>                              AttrListPtr::get((AttributeWithIndex *) 
> 0, 0));
> }
>
> @@ -271,8 +271,8 @@
>
>   // If the variable exists but has the wrong type, return a bitcast  
> to the
>   // right type.
> -  if (GV->getType() != Context.getPointerTypeUnqual(Ty))
> -    return ConstantExpr::getBitCast(GV, Context.getPointerTypeUnqual 
> (Ty));
> +  if (GV->getType() != PointerType::getUnqual(Ty))
> +    return ConstantExpr::getBitCast(GV, PointerType::getUnqual(Ty));
>
>   // Otherwise, we just found the existing function or a prototype.
>   return GV;
>
> Modified: llvm/trunk/lib/VMCore/ValueTypes.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/ValueTypes.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/ValueTypes.cpp (original)
> +++ llvm/trunk/lib/VMCore/ValueTypes.cpp Wed Jul 29 17:17:13 2009
> @@ -21,16 +21,14 @@
>
> MVT MVT::getExtendedIntegerVT(unsigned BitWidth) {
>   MVT VT;
> -  VT.LLVMTy = getGlobalContext().getIntegerType(BitWidth);
> +  VT.LLVMTy = IntegerType::get(BitWidth);
>   assert(VT.isExtended() && "Type is not extended!");
>   return VT;
> }
>
> MVT MVT::getExtendedVectorVT(MVT VT, unsigned NumElements) {
>   MVT ResultVT;
> -  ResultVT.LLVMTy = getGlobalContext().getVectorType(
> -                                           VT.getTypeForMVT 
> (getGlobalContext()),
> -                                                     NumElements);
> +  ResultVT.LLVMTy = VectorType::get(VT.getTypeForMVT(), NumElements);
>   assert(ResultVT.isExtended() && "Type is not extended!");
>   return ResultVT;
> }
> @@ -133,7 +131,7 @@
> /// getTypeForMVT - This method returns an LLVM type corresponding  
> to the
> /// specified MVT.  For integer types, this returns an unsigned  
> type.  Note
> /// that this will abort for types that cannot be represented.
> -const Type *MVT::getTypeForMVT(LLVMContext &Context) const {
> +const Type *MVT::getTypeForMVT() const {
>   switch (V) {
>   default:
>     assert(isExtended() && "Type is not extended!");
> @@ -144,32 +142,32 @@
>   case MVT::i16:     return Type::Int16Ty;
>   case MVT::i32:     return Type::Int32Ty;
>   case MVT::i64:     return Type::Int64Ty;
> -  case MVT::i128:    return Context.getIntegerType(128);
> +  case MVT::i128:    return IntegerType::get(128);
>   case MVT::f32:     return Type::FloatTy;
>   case MVT::f64:     return Type::DoubleTy;
>   case MVT::f80:     return Type::X86_FP80Ty;
>   case MVT::f128:    return Type::FP128Ty;
>   case MVT::ppcf128: return Type::PPC_FP128Ty;
> -  case MVT::v2i8:    return Context.getVectorType(Type::Int8Ty, 2);
> -  case MVT::v4i8:    return Context.getVectorType(Type::Int8Ty, 4);
> -  case MVT::v8i8:    return Context.getVectorType(Type::Int8Ty, 8);
> -  case MVT::v16i8:   return Context.getVectorType(Type::Int8Ty, 16);
> -  case MVT::v32i8:   return Context.getVectorType(Type::Int8Ty, 32);
> -  case MVT::v2i16:   return Context.getVectorType(Type::Int16Ty, 2);
> -  case MVT::v4i16:   return Context.getVectorType(Type::Int16Ty, 4);
> -  case MVT::v8i16:   return Context.getVectorType(Type::Int16Ty, 8);
> -  case MVT::v16i16:  return Context.getVectorType(Type::Int16Ty, 16);
> -  case MVT::v2i32:   return Context.getVectorType(Type::Int32Ty, 2);
> -  case MVT::v4i32:   return Context.getVectorType(Type::Int32Ty, 4);
> -  case MVT::v8i32:   return Context.getVectorType(Type::Int32Ty, 8);
> -  case MVT::v1i64:   return Context.getVectorType(Type::Int64Ty, 1);
> -  case MVT::v2i64:   return Context.getVectorType(Type::Int64Ty, 2);
> -  case MVT::v4i64:   return Context.getVectorType(Type::Int64Ty, 4);
> -  case MVT::v2f32:   return Context.getVectorType(Type::FloatTy, 2);
> -  case MVT::v4f32:   return Context.getVectorType(Type::FloatTy, 4);
> -  case MVT::v8f32:   return Context.getVectorType(Type::FloatTy, 8);
> -  case MVT::v2f64:   return Context.getVectorType(Type::DoubleTy, 2);
> -  case MVT::v4f64:   return Context.getVectorType(Type::DoubleTy, 4);
> +  case MVT::v2i8:    return VectorType::get(Type::Int8Ty, 2);
> +  case MVT::v4i8:    return VectorType::get(Type::Int8Ty, 4);
> +  case MVT::v8i8:    return VectorType::get(Type::Int8Ty, 8);
> +  case MVT::v16i8:   return VectorType::get(Type::Int8Ty, 16);
> +  case MVT::v32i8:   return VectorType::get(Type::Int8Ty, 32);
> +  case MVT::v2i16:   return VectorType::get(Type::Int16Ty, 2);
> +  case MVT::v4i16:   return VectorType::get(Type::Int16Ty, 4);
> +  case MVT::v8i16:   return VectorType::get(Type::Int16Ty, 8);
> +  case MVT::v16i16:  return VectorType::get(Type::Int16Ty, 16);
> +  case MVT::v2i32:   return VectorType::get(Type::Int32Ty, 2);
> +  case MVT::v4i32:   return VectorType::get(Type::Int32Ty, 4);
> +  case MVT::v8i32:   return VectorType::get(Type::Int32Ty, 8);
> +  case MVT::v1i64:   return VectorType::get(Type::Int64Ty, 1);
> +  case MVT::v2i64:   return VectorType::get(Type::Int64Ty, 2);
> +  case MVT::v4i64:   return VectorType::get(Type::Int64Ty, 4);
> +  case MVT::v2f32:   return VectorType::get(Type::FloatTy, 2);
> +  case MVT::v4f32:   return VectorType::get(Type::FloatTy, 4);
> +  case MVT::v8f32:   return VectorType::get(Type::FloatTy, 8);
> +  case MVT::v2f64:   return VectorType::get(Type::DoubleTy, 2);
> +  case MVT::v4f64:   return VectorType::get(Type::DoubleTy, 4);
>  }
> }
>
>
> Modified: llvm/trunk/lib/VMCore/Verifier.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/lib/VMCore/Verifier.cpp (original)
> +++ llvm/trunk/lib/VMCore/Verifier.cpp Wed Jul 29 17:17:13 2009
> @@ -1490,7 +1490,6 @@
> bool Verifier::PerformTypeCheck(Intrinsic::ID ID, Function *F, const  
> Type *Ty,
>                                 int VT, unsigned ArgNo, std::string  
> &Suffix) {
>   const FunctionType *FTy = F->getFunctionType();
> -  LLVMContext &Context = FTy->getContext();
>
>   unsigned NumElts = 0;
>   const Type *EltTy = Ty;
> @@ -1620,7 +1619,7 @@
>                   "vector elements!", F);
>       return false;
>     }
> -  } else if (MVT((MVT::SimpleValueType)VT).getTypeForMVT(Context) ! 
> = EltTy) {
> +  } else if (MVT((MVT::SimpleValueType)VT).getTypeForMVT() !=  
> EltTy) {
>     CheckFailed(IntrinsicParam(ArgNo, NumRets) + " is wrong!", F);
>     return false;
>   } else if (EltTy != Ty) {
>
> Modified: llvm/trunk/tools/bugpoint/ExtractFunction.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/ExtractFunction.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/tools/bugpoint/ExtractFunction.cpp (original)
> +++ llvm/trunk/tools/bugpoint/ExtractFunction.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -181,7 +181,6 @@
> /// as a constant array.
> static Constant *GetTorInit(std::vector<std::pair<Function*, int> >  
> &TorList) {
>   assert(!TorList.empty() && "Don't create empty tor list!");
> -  LLVMContext &Context = TorList[0].first->getContext();
>   std::vector<Constant*> ArrayElts;
>   for (unsigned i = 0, e = TorList.size(); i != e; ++i) {
>     std::vector<Constant*> Elts;
> @@ -189,7 +188,7 @@
>     Elts.push_back(TorList[i].first);
>     ArrayElts.push_back(ConstantStruct::get(Elts));
>   }
> -  return ConstantArray::get(Context.getArrayType(ArrayElts[0]- 
> >getType(),
> +  return ConstantArray::get(ArrayType::get(ArrayElts[0]->getType(),
>                                            ArrayElts.size()),
>                             ArrayElts);
> }
>
> Modified: llvm/trunk/tools/bugpoint/Miscompilation.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/Miscompilation.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/tools/bugpoint/Miscompilation.cpp (original)
> +++ llvm/trunk/tools/bugpoint/Miscompilation.cpp Wed Jul 29 17:17:13  
> 2009
> @@ -701,8 +701,8 @@
>   // Prototype: void *getPointerToNamedFunction(const char* Name)
>   Constant *resolverFunc =
>     Safe->getOrInsertFunction("getPointerToNamedFunction",
> -                        Context.getPointerTypeUnqual(Type::Int8Ty),
> -                        Context.getPointerTypeUnqual(Type::Int8Ty),  
> (Type *)0);
> +                        PointerType::getUnqual(Type::Int8Ty),
> +                        PointerType::getUnqual(Type::Int8Ty), (Type  
> *)0);
>
>   // Use the function we just added to get addresses of functions we  
> need.
>   for (Module::iterator F = Safe->begin(), E = Safe->end(); F != E; + 
> +F) {
> @@ -765,7 +765,7 @@
>           // Cast the result from the resolver to correctly-typed  
> function.
>           CastInst *CastedResolver =
>             new BitCastInst(Resolver,
> -                            Context.getPointerTypeUnqual(F- 
> >getFunctionType()),
> +                            PointerType::getUnqual(F- 
> >getFunctionType()),
>                             "resolverCast", LookupBB);
>
>           // Save the value in our cache.
>
> Modified: llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp (original)
> +++ llvm/trunk/unittests/ExecutionEngine/JIT/JITTest.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -31,8 +31,7 @@
>
> Function *makeReturnGlobal(std::string Name, GlobalVariable *G,  
> Module *M) {
>   std::vector<const Type*> params;
> -  const FunctionType *FTy =
> -    getGlobalContext().getFunctionType(G->getType()->getElementType 
> (),
> +  const FunctionType *FTy = FunctionType::get(G->getType()- 
> >getElementType(),
>                                               params, false);
>   Function *F = Function::Create(FTy, GlobalValue::ExternalLinkage,  
> Name, M);
>   BasicBlock *Entry = BasicBlock::Create("entry", F);
>
> Modified: llvm/trunk/unittests/Support/TypeBuilderTest.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/TypeBuilderTest.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/unittests/Support/TypeBuilderTest.cpp (original)
> +++ llvm/trunk/unittests/Support/TypeBuilderTest.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -171,7 +171,7 @@
>     st.push_back(TypeBuilder<int, cross>::get(Context));
>     st.push_back(TypeBuilder<int*, cross>::get(Context));
>     st.push_back(TypeBuilder<void*[], cross>::get(Context));
> -    static const StructType *const result = Context.getStructType 
> (st);
> +    static const StructType *const result = StructType::get(st);
>     return result;
>   }
>
> @@ -194,7 +194,7 @@
>     st.push_back(TypeBuilder<types::i<32>, cross>::get(Context));
>     st.push_back(TypeBuilder<types::i<32>*, cross>::get(Context));
>     st.push_back(TypeBuilder<types::i<8>*[], cross>::get(Context));
> -    static const StructType *const result = Context.getStructType 
> (st);
> +    static const StructType *const result = StructType::get(st);
>     return result;
>   }
>
>
> Modified: llvm/trunk/utils/TableGen/CallingConvEmitter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CallingConvEmitter.cpp?rev=77516&r1=77515&r2=77516&view=diff
>
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- llvm/trunk/utils/TableGen/CallingConvEmitter.cpp (original)
> +++ llvm/trunk/utils/TableGen/CallingConvEmitter.cpp Wed Jul 29  
> 17:17:13 2009
> @@ -163,12 +163,12 @@
>         O << Size << ", ";
>       else
>         O << "\n" << IndentStr << "  State.getTarget().getTargetData 
> ()"
> -          "->getTypeAllocSize(LocVT.getTypeForMVT(State.getContext 
> ())), ";
> +          "->getTypeAllocSize(LocVT.getTypeForMVT()), ";
>       if (Align)
>         O << Align;
>       else
>         O << "\n" << IndentStr << "  State.getTarget().getTargetData 
> ()"
> -          "->getABITypeAlignment(LocVT.getTypeForMVT 
> (State.getContext()))";
> +          "->getABITypeAlignment(LocVT.getTypeForMVT())";
>       O << ");\n" << IndentStr
>         << "State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset"
>         << Counter << ", LocVT, LocInfo));\n";
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits





More information about the llvm-commits mailing list