diff options
author | Chris Lattner <sabre@nondot.org> | 2001-12-04 00:03:30 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-12-04 00:03:30 +0000 |
commit | 7a1767520611d9ff6face702068de858e1cadf2c (patch) | |
tree | 84849800c5f0e86af2757f911bc65010e016259e /lib/VMCore | |
parent | e9bb2df410f7a22decad9a883f7139d5857c1520 (diff) |
Renamed inst_const_iterator -> const_inst_iterator
Renamed op_const_iterator -> const_op_iterator
Renamed PointerType::getValueType() -> PointerType::getElementType()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1408 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 10 | ||||
-rw-r--r-- | lib/VMCore/Function.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/Linker.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/SlotCalculator.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/Type.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/iCall.cpp | 8 | ||||
-rw-r--r-- | lib/VMCore/iMemory.cpp | 6 |
7 files changed, 16 insertions, 16 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index dcf8cf3f35..d853fb9bbc 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -111,7 +111,7 @@ static void fillTypeNameTable(const Module *M, // const Type *Ty = cast<const Type>(I->second); if (!isa<PointerType>(Ty) || - !cast<PointerType>(Ty)->getValueType()->isPrimitiveType()) + !cast<PointerType>(Ty)->getElementType()->isPrimitiveType()) TypeNames.insert(make_pair(Ty, "%"+I->first)); } } @@ -174,7 +174,7 @@ static string calcTypeName(const Type *Ty, vector<const Type *> &TypeStack, break; } case Type::PointerTyID: - Result = calcTypeName(cast<const PointerType>(Ty)->getValueType(), + Result = calcTypeName(cast<const PointerType>(Ty)->getElementType(), TypeStack, TypeNames) + " *"; break; case Type::ArrayTyID: { @@ -325,7 +325,7 @@ void AssemblyWriter::printGlobal(const GlobalVariable *GV) { if (!GV->hasInitializer()) Out << "uninitialized "; Out << (GV->isConstant() ? "constant " : "global "); - printType(GV->getType()->getValueType()); + printType(GV->getType()->getElementType()); if (GV->hasInitializer()) writeOperand(GV->getInitializer(), false, false); @@ -534,7 +534,7 @@ void AssemblyWriter::printInstruction(const Instruction *I) { Out << " void"; } else if (isa<CallInst>(I)) { const PointerType *PTy = dyn_cast<PointerType>(Operand->getType()); - const MethodType *MTy = PTy ? dyn_cast<MethodType>(PTy->getValueType()) :0; + const MethodType *MTy = PTy ?dyn_cast<MethodType>(PTy->getElementType()):0; const Type *RetTy = MTy ? MTy->getReturnType() : 0; // If possible, print out the short form of the call instruction, but we can @@ -574,7 +574,7 @@ void AssemblyWriter::printInstruction(const Instruction *I) { } else if (I->getOpcode() == Instruction::Malloc || I->getOpcode() == Instruction::Alloca) { Out << " "; - printType(cast<const PointerType>(I->getType())->getValueType()); + printType(cast<const PointerType>(I->getType())->getElementType()); if (I->getNumOperands()) { Out << ","; writeOperand(I->getOperand(0), true); diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index c3d8e87f8c..4b38ce1196 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -62,7 +62,7 @@ void Method::setParent(Module *parent) { } const MethodType *Method::getMethodType() const { - return cast<MethodType>(cast<PointerType>(getType())->getValueType()); + return cast<MethodType>(cast<PointerType>(getType())->getElementType()); } const Type *Method::getReturnType() const { diff --git a/lib/VMCore/Linker.cpp b/lib/VMCore/Linker.cpp index 8a0294660f..f04c8a46a3 100644 --- a/lib/VMCore/Linker.cpp +++ b/lib/VMCore/Linker.cpp @@ -179,7 +179,7 @@ static bool LinkGlobals(Module *Dest, const Module *Src, // later by LinkGlobalInits... // GlobalVariable *DGV = - new GlobalVariable(SGV->getType()->getValueType(), SGV->isConstant(), + new GlobalVariable(SGV->getType()->getElementType(), SGV->isConstant(), SGV->hasInternalLinkage(), 0, SGV->getName()); // Add the new global to the dest module diff --git a/lib/VMCore/SlotCalculator.cpp b/lib/VMCore/SlotCalculator.cpp index 9c5d97a588..ede822846d 100644 --- a/lib/VMCore/SlotCalculator.cpp +++ b/lib/VMCore/SlotCalculator.cpp @@ -237,7 +237,7 @@ int SlotCalculator::insertValue(const Value *D) { // of const ints), that they are inserted also. Same for global variable // initializers. // - for(User::op_const_iterator I = U->op_begin(), E = U->op_end(); I != E; ++I) + for(User::const_op_iterator I = U->op_begin(), E = U->op_end(); I != E; ++I) if (!isa<GlobalValue>(*I)) // Don't chain insert global values insertValue(*I); } diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 00e86e453c..e0af0cbc45 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -297,7 +297,7 @@ static string getTypeProps(const Type *Ty, vector<const Type *> &TypeStack, } case Type::PointerTyID: { const PointerType *PTy = cast<const PointerType>(Ty); - Result = getTypeProps(PTy->getValueType(), TypeStack, + Result = getTypeProps(PTy->getElementType(), TypeStack, isAbstract, isRecursive) + " *"; break; } diff --git a/lib/VMCore/iCall.cpp b/lib/VMCore/iCall.cpp index 3f73933690..7f4efaf7b2 100644 --- a/lib/VMCore/iCall.cpp +++ b/lib/VMCore/iCall.cpp @@ -16,13 +16,13 @@ CallInst::CallInst(Value *Meth, const vector<Value*> ¶ms, const string &Name) : Instruction(cast<MethodType>(cast<PointerType>(Meth->getType()) - ->getValueType())->getReturnType(), + ->getElementType())->getReturnType(), Instruction::Call, Name) { Operands.reserve(1+params.size()); Operands.push_back(Use(Meth, this)); const MethodType *MTy = - cast<MethodType>(cast<PointerType>(Meth->getType())->getValueType()); + cast<MethodType>(cast<PointerType>(Meth->getType())->getElementType()); const MethodType::ParamTypes &PL = MTy->getParamTypes(); assert((params.size() == PL.size()) || @@ -47,14 +47,14 @@ InvokeInst::InvokeInst(Value *Meth, BasicBlock *IfNormal, \ BasicBlock *IfException, const vector<Value*>¶ms, const string &Name) : TerminatorInst(cast<MethodType>(cast<PointerType>(Meth->getType()) - ->getValueType())->getReturnType(), + ->getElementType())->getReturnType(), Instruction::Invoke, Name) { Operands.reserve(3+params.size()); Operands.push_back(Use(Meth, this)); Operands.push_back(Use(IfNormal, this)); Operands.push_back(Use(IfException, this)); const MethodType *MTy = - cast<MethodType>(cast<PointerType>(Meth->getType())->getValueType()); + cast<MethodType>(cast<PointerType>(Meth->getType())->getElementType()); const MethodType::ParamTypes &PL = MTy->getParamTypes(); assert((params.size() == PL.size()) || diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp index a0a7b0f979..c61961b58e 100644 --- a/lib/VMCore/iMemory.cpp +++ b/lib/VMCore/iMemory.cpp @@ -22,7 +22,7 @@ const Type* MemAccessInst::getIndexedType(const Type *Ptr, if (!Ptr->isPointerType()) return 0; // Type isn't a pointer type! // Get the type pointed to... - Ptr = cast<PointerType>(Ptr)->getValueType(); + Ptr = cast<PointerType>(Ptr)->getElementType(); unsigned CurIDX = 0; while (const CompositeType *ST = dyn_cast<CompositeType>(Ptr)) { @@ -71,7 +71,7 @@ LoadInst::LoadInst(Value *Ptr, const vector<Value*> &Idx, } LoadInst::LoadInst(Value *Ptr, const string &Name = "") - : MemAccessInst(cast<PointerType>(Ptr->getType())->getValueType(), + : MemAccessInst(cast<PointerType>(Ptr->getType())->getElementType(), Load, Name) { Operands.reserve(1); Operands.push_back(Use(Ptr, this)); @@ -121,5 +121,5 @@ GetElementPtrInst::GetElementPtrInst(Value *Ptr, const vector<Value*> &Idx, } bool GetElementPtrInst::isStructSelector() const { - return ((PointerType*)Operands[0]->getType())->getValueType()->isStructType(); + return ((PointerType*)Operands[0]->getType())->getElementType()->isStructType(); } |