15#ifndef LLVM_CLANG_CIR_CIRGENFUNCTIONINFO_H
16#define LLVM_CLANG_CIR_CIRGENFUNCTIONINFO_H
20#include "llvm/ADT/FoldingSet.h"
21#include "llvm/Support/TrailingObjects.h"
36 explicit RequiredArgs(
unsigned n) : numRequired(n) { assert(n != ~0
U); }
48 unsigned additional) {
53 llvm_unreachable(
"NYI");
60 unsigned additional) {
73 :
public llvm::FoldingSetNode,
74 private llvm::TrailingObjects<CIRGenFunctionInfo, CanQualType> {
79 CanQualType *getArgTypes() {
return getTrailingObjects(); }
80 const CanQualType *getArgTypes()
const {
return getTrailingObjects(); }
89 void operator delete(
void *p) { ::operator
delete(p); }
141 bool isVariadic()
const {
return required.allowsOptionalArgs(); }
arg_iterator argTypesEnd()
CanQualType getReturnType() const
const_arg_iterator argTypesEnd() const
llvm::ArrayRef< CanQualType > argTypes() const
unsigned getNumRequiredArgs() const
void Profile(llvm::FoldingSetNodeID &id)
RequiredArgs getRequiredArgs() const
llvm::MutableArrayRef< CanQualType > argTypes()
llvm::ArrayRef< CanQualType > requiredArguments() const
arg_iterator argTypesBegin()
friend class TrailingObjects
static void Profile(llvm::FoldingSetNodeID &id, RequiredArgs required, CanQualType resultType, llvm::ArrayRef< CanQualType > argTypes)
llvm::ArrayRef< CanQualType > arguments() const
const_arg_iterator argTypesBegin() const
static CIRGenFunctionInfo * create(CanQualType resultType, llvm::ArrayRef< CanQualType > argTypes, RequiredArgs required)
unsigned argTypeSize() const
A class for recording the number of arguments that a function signature requires.
unsigned getNumRequiredArgs() const
unsigned getOpaqueData() const
static RequiredArgs getFromProtoWithExtraSlots(clang::CanQual< clang::FunctionProtoType > prototype, unsigned additional)
static RequiredArgs getFromProtoWithExtraSlots(const clang::FunctionProtoType *prototype, unsigned additional)
Compute the arguments required by the given formal prototype, given that there may be some additional...
bool allowsOptionalArgs() const
Represents a canonical, potentially-qualified type.
void Profile(llvm::FoldingSetNodeID &ID) const
const T * getTypePtr() const
Retrieve the underlying type pointer, which refers to a canonical type.
Represents a prototype with parameter type info, e.g.
unsigned getNumParams() const
bool isVariadic() const
Whether this function prototype is variadic.
bool hasExtParameterInfos() const
Is there any interesting extra information for any of the parameters of this function type?