summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-09 06:02:51 +0000
committerChris Lattner <sabre@nondot.org>2004-01-09 06:02:51 +0000
commitfdf788eebdd1545969aa1b61ac95f79511cb0086 (patch)
tree025f2c04ab58c0fe73d39fecb64d2193a6bfa269 /llvm/lib/Transforms
parent49525f8cf478d1f49f5c23c094e625bbe9cd82f8 (diff)
downloadbcm5719-llvm-fdf788eebdd1545969aa1b61ac95f79511cb0086.tar.gz
bcm5719-llvm-fdf788eebdd1545969aa1b61ac95f79511cb0086.zip
Remove dependence on structure index type. s/MT/FT
llvm-svn: 10726
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/IPO/MutateStructTypes.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/IPO/MutateStructTypes.cpp b/llvm/lib/Transforms/IPO/MutateStructTypes.cpp
index 41835adb487..e2c362f3ab2 100644
--- a/llvm/lib/Transforms/IPO/MutateStructTypes.cpp
+++ b/llvm/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);
}
}
OpenPOWER on IntegriCloud