aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-03-29 03:44:36 +0000
committerChris Lattner <sabre@nondot.org>2002-03-29 03:44:36 +0000
commit6bfd6a578a3a4fa95c585c988ee712ba880f9923 (patch)
tree6aa26e909e914bc209fe22afbd7c45df787ac61c /lib/VMCore/Function.cpp
parent6056c49ca0e86e222b4bd7184a4b23c9277ab065 (diff)
s/Method/Function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 1ff87aabd9..c5e9e21819 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -25,11 +25,10 @@
template class ValueHolder<FunctionArgument, Function, Function>;
template class ValueHolder<BasicBlock , Function, Function>;
-Function::Function(const MethodType *Ty, bool isInternal,
+Function::Function(const FunctionType *Ty, bool isInternal,
const std::string &name)
: GlobalValue(PointerType::get(Ty), Value::FunctionVal, isInternal, name),
SymTabValue(this), BasicBlocks(this), ArgumentList(this, this) {
- assert(::isa<MethodType>(Ty) && "Function signature must be of method type!");
}
Function::~Function() {
@@ -62,12 +61,12 @@ void Function::setParent(Module *parent) {
setParentSymTab(Parent ? Parent->getSymbolTableSure() : 0);
}
-const MethodType *Function::getMethodType() const {
- return cast<MethodType>(cast<PointerType>(getType())->getElementType());
+const FunctionType *Function::getFunctionType() const {
+ return cast<FunctionType>(getType()->getElementType());
}
const Type *Function::getReturnType() const {
- return getMethodType()->getReturnType();
+ return getFunctionType()->getReturnType();
}
// dropAllReferences() - This function causes all the subinstructions to "let