summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-04-04 22:19:18 +0000
committerChris Lattner <sabre@nondot.org>2002-04-04 22:19:18 +0000
commite2f2f54f0c3fc0ce063f2d3a181a7a3b4ddbedb0 (patch)
tree2974769e972954dcb30707d7c7aab0ea1d6c661d /llvm/lib/Transforms
parente17c1fde8382a37d86ba9b234dca8c639f06f1c3 (diff)
downloadbcm5719-llvm-e2f2f54f0c3fc0ce063f2d3a181a7a3b4ddbedb0.tar.gz
bcm5719-llvm-e2f2f54f0c3fc0ce063f2d3a181a7a3b4ddbedb0.zip
s/MethodType/FunctionType
llvm-svn: 2115
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/ExprTypeConvert.cpp10
-rw-r--r--llvm/lib/Transforms/Instrumentation/TraceValues.cpp4
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/ExprTypeConvert.cpp b/llvm/lib/Transforms/ExprTypeConvert.cpp
index cd76bdbf1f3..790f68f7a37 100644
--- a/llvm/lib/Transforms/ExprTypeConvert.cpp
+++ b/llvm/lib/Transforms/ExprTypeConvert.cpp
@@ -832,7 +832,7 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty,
if (OpNum == 0) {
PointerType *PTy = dyn_cast<PointerType>(Ty);
if (PTy == 0) return false; // Can't convert to a non-pointer type...
- MethodType *MTy = dyn_cast<MethodType>(PTy->getElementType());
+ FunctionType *MTy = dyn_cast<FunctionType>(PTy->getElementType());
if (MTy == 0) return false; // Can't convert to a non ptr to method...
// Perform sanity checks to make sure that new method type has the
@@ -858,7 +858,7 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty,
// reason for this is that we prefer to have resolved methods but casted
// arguments if possible.
//
- const MethodType::ParamTypes &PTs = MTy->getParamTypes();
+ const FunctionType::ParamTypes &PTs = MTy->getParamTypes();
for (unsigned i = 0, NA = PTs.size(); i < NA; ++i)
if (!PTs[i]->isLosslesslyConvertableTo(I->getOperand(i+1)->getType()))
return false; // Operands must have compatible types!
@@ -871,7 +871,7 @@ static bool OperandConvertableToType(User *U, Value *V, const Type *Ty,
}
const PointerType *MPtr = cast<PointerType>(I->getOperand(0)->getType());
- const MethodType *MTy = cast<MethodType>(MPtr->getElementType());
+ const FunctionType *MTy = cast<FunctionType>(MPtr->getElementType());
if (!MTy->isVarArg()) return false;
if ((OpNum-1) < MTy->getParamTypes().size())
@@ -1100,8 +1100,8 @@ static void ConvertOperandToType(User *U, Value *OldVal, Value *NewVal,
if (Meth == OldVal) { // Changing the method pointer?
PointerType *NewPTy = cast<PointerType>(NewVal->getType());
- MethodType *NewTy = cast<MethodType>(NewPTy->getElementType());
- const MethodType::ParamTypes &PTs = NewTy->getParamTypes();
+ FunctionType *NewTy = cast<FunctionType>(NewPTy->getElementType());
+ const FunctionType::ParamTypes &PTs = NewTy->getParamTypes();
// Get an iterator to the call instruction so that we can insert casts for
// operands if needbe. Note that we do not require operands to be
diff --git a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
index e064caa8176..e31aeb8185b 100644
--- a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -67,8 +67,8 @@ Pass *createTraceValuesPassForBasicBlocks() { // Trace BB's and methods
//
bool InsertTraceCode::doInitialization(Module *M) {
const Type *SBP = PointerType::get(Type::SByteTy);
- const MethodType *MTy =
- MethodType::get(Type::IntTy, vector<const Type*>(1, SBP), true);
+ const FunctionType *MTy =
+ FunctionType::get(Type::IntTy, vector<const Type*>(1, SBP), true);
PrintfFunc = M->getOrInsertFunction("printf", MTy);
return false;
OpenPOWER on IntegriCloud