From 91db58298aa4b717289aa25ad8d0709b1a72a70b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 29 Mar 2002 03:44:36 +0000 Subject: s/Method/Function llvm-svn: 2034 --- llvm/lib/VMCore/Function.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'llvm/lib/VMCore/Function.cpp') diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp index 1ff87aabd9d..c5e9e218192 100644 --- a/llvm/lib/VMCore/Function.cpp +++ b/llvm/lib/VMCore/Function.cpp @@ -25,11 +25,10 @@ template class ValueHolder; template class ValueHolder; -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(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(cast(getType())->getElementType()); +const FunctionType *Function::getFunctionType() const { + return cast(getType()->getElementType()); } const Type *Function::getReturnType() const { - return getMethodType()->getReturnType(); + return getFunctionType()->getReturnType(); } // dropAllReferences() - This function causes all the subinstructions to "let -- cgit v1.2.3