diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-29 03:44:36 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-29 03:44:36 +0000 |
commit | 91db58298aa4b717289aa25ad8d0709b1a72a70b (patch) | |
tree | 28cc8a53c41bb3e41dc813d90decb1a2ff88f8b4 /llvm/lib/VMCore/Function.cpp | |
parent | a483b0616a2605863f371cb63f5d4ffd03ef0460 (diff) | |
download | bcm5719-llvm-91db58298aa4b717289aa25ad8d0709b1a72a70b.tar.gz bcm5719-llvm-91db58298aa4b717289aa25ad8d0709b1a72a70b.zip |
s/Method/Function
llvm-svn: 2034
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r-- | llvm/lib/VMCore/Function.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
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<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 |