mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 00:37:09 +00:00
Add convenience method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19321 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60766f7d41
commit
fe59d36c45
@ -90,6 +90,10 @@ public:
|
||||
const Type *getReturnType() const; // Return the type of the ret val
|
||||
const FunctionType *getFunctionType() const; // Return the FunctionType for me
|
||||
|
||||
/// isVarArg - Return true if this function takes a variable number of
|
||||
/// arguments.
|
||||
bool isVarArg() const;
|
||||
|
||||
/// isExternal - Is the body of this function unknown? (The basic block list
|
||||
/// is empty if so.) This is true for external functions, defined as forward
|
||||
/// "declare"ations
|
||||
|
@ -142,6 +142,10 @@ const FunctionType *Function::getFunctionType() const {
|
||||
return cast<FunctionType>(getType()->getElementType());
|
||||
}
|
||||
|
||||
bool Function::isVarArg() const {
|
||||
return getFunctionType()->isVarArg();
|
||||
}
|
||||
|
||||
const Type *Function::getReturnType() const {
|
||||
return getFunctionType()->getReturnType();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user