[llvm-commits] CVS: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 9 00:04:01 PST 2004
Changes in directory llvm/lib/Transforms/IPO:
MutateStructTypes.cpp updated: 1.43 -> 1.44
---
Log message:
Remove dependence on structure index type. s/MT/FT
---
Diffs of the changes: (+6 -6)
Index: llvm/lib/Transforms/IPO/MutateStructTypes.cpp
diff -u llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.43 llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.44
--- llvm/lib/Transforms/IPO/MutateStructTypes.cpp:1.43 Tue Nov 11 16:41:33 2003
+++ llvm/lib/Transforms/IPO/MutateStructTypes.cpp Fri Jan 9 00:02:51 2004
@@ -56,15 +56,15 @@
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 @@
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);
}
}
More information about the llvm-commits
mailing list