aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Module.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 22:17:13 +0000
commitdebcb01b0f0a15f568ca69e8f288fade4bfc7297 (patch)
tree22a274838cf6c55205a8a3f0a80262b09b63b069 /lib/VMCore/Module.cpp
parent37c4a2d6f15ff32c9ae91e333d655a349e195993 (diff)
Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Module.cpp')
-rw-r--r--lib/VMCore/Module.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp
index 2ef16d01f6..87d4b05cf1 100644
--- a/lib/VMCore/Module.cpp
+++ b/lib/VMCore/Module.cpp
@@ -153,8 +153,8 @@ Constant *Module::getOrInsertFunction(const StringRef &Name,
// If the function exists but has the wrong type, return a bitcast to the
// right type.
- if (F->getType() != Context.getPointerTypeUnqual(Ty))
- return ConstantExpr::getBitCast(F, Context.getPointerTypeUnqual(Ty));
+ if (F->getType() != PointerType::getUnqual(Ty))
+ return ConstantExpr::getBitCast(F, PointerType::getUnqual(Ty));
// Otherwise, we just found the existing function or a prototype.
return F;
@@ -203,7 +203,7 @@ Constant *Module::getOrInsertFunction(const StringRef &Name,
// Build the function type and chain to the other getOrInsertFunction...
return getOrInsertFunction(Name,
- Context.getFunctionType(RetTy, ArgTys, false),
+ FunctionType::get(RetTy, ArgTys, false),
AttributeList);
}
@@ -221,7 +221,7 @@ Constant *Module::getOrInsertFunction(const StringRef &Name,
// Build the function type and chain to the other getOrInsertFunction...
return getOrInsertFunction(Name,
- Context.getFunctionType(RetTy, ArgTys, false),
+ FunctionType::get(RetTy, ArgTys, false),
AttrListPtr::get((AttributeWithIndex *)0, 0));
}
@@ -271,8 +271,8 @@ Constant *Module::getOrInsertGlobal(const StringRef &Name, const Type *Ty) {
// If the variable exists but has the wrong type, return a bitcast to the
// right type.
- if (GV->getType() != Context.getPointerTypeUnqual(Ty))
- return ConstantExpr::getBitCast(GV, Context.getPointerTypeUnqual(Ty));
+ if (GV->getType() != PointerType::getUnqual(Ty))
+ return ConstantExpr::getBitCast(GV, PointerType::getUnqual(Ty));
// Otherwise, we just found the existing function or a prototype.
return GV;