diff options
author | Chris Lattner <sabre@nondot.org> | 2004-01-09 06:02:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-01-09 06:02:51 +0000 |
commit | 21949d90881e89ab9c7b752f82f51577a1f0c095 (patch) | |
tree | 804feeb1ba6fb0cd7bf9ef36e7912091416aa8ac /lib | |
parent | d7456026629fc1760a45e6e955e9834246493147 (diff) | |
download | external_llvm-21949d90881e89ab9c7b752f82f51577a1f0c095.zip external_llvm-21949d90881e89ab9c7b752f82f51577a1f0c095.tar.gz external_llvm-21949d90881e89ab9c7b752f82f51577a1f0c095.tar.bz2 |
Remove dependence on structure index type. s/MT/FT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10726 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/MutateStructTypes.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Transforms/IPO/MutateStructTypes.cpp b/lib/Transforms/IPO/MutateStructTypes.cpp index 41835ad..e2c362f 100644 --- a/lib/Transforms/IPO/MutateStructTypes.cpp +++ b/lib/Transforms/IPO/MutateStructTypes.cpp @@ -56,15 +56,15 @@ const Type *MutateStructTypes::ConvertType(const Type *Ty) { switch (Ty->getPrimitiveID()) { case Type::FunctionTyID: { - const FunctionType *MT = cast<FunctionType>(Ty); - const Type *RetTy = ConvertType(MT->getReturnType()); + const FunctionType *FT = cast<FunctionType>(Ty); + const Type *RetTy = ConvertType(FT->getReturnType()); std::vector<const Type*> ArgTypes; - for (FunctionType::ParamTypes::const_iterator I = MT->getParamTypes().begin(), - E = MT->getParamTypes().end(); I != E; ++I) + for (FunctionType::ParamTypes::const_iterator I = FT->getParamTypes().begin(), + E = FT->getParamTypes().end(); I != E; ++I) ArgTypes.push_back(ConvertType(*I)); - DestTy = FunctionType::get(RetTy, ArgTypes, MT->isVarArg()); + DestTy = FunctionType::get(RetTy, ArgTypes, FT->isVarArg()); break; } case Type::StructTyID: { @@ -123,7 +123,7 @@ void MutateStructTypes::AdjustIndices(const CompositeType *OldTy, assert(ElNum < I->second.second.size()); // Apply the XForm specified by Transforms map... unsigned NewElNum = I->second.second[ElNum]; - Idx[i] = ConstantUInt::get(Type::UByteTy, NewElNum); + Idx[i] = ConstantUInt::get(Idx[i]->getType(), NewElNum); } } |