28 void *buffer =
operator new(
29 totalSizeToAlloc<CanQualType>(
argTypes.size() + 1));
33 CIRGenFunctionInfo *fi =
new (buffer) CIRGenFunctionInfo();
37 fi->required = required;
40 fi->getArgTypes()[0] = resultType;
60 return cir::FuncType::get(argTypes,
61 (resultType ? resultType : builder.getVoidTy()),
70 cgm.errorNYI(
"getFunctionTypeForVTable: non-convertible function type");
97 mlir::OpBuilder::InsertionGuard guard(builder);
98 builder.setInsertionPointAfter(value.getDefiningOp());
103 mlir::NamedAttrList &attrs,
110 attrs.set(cir::CIRDialect::getNoThrowAttrName(),
111 mlir::UnitAttr::get(builder.getContext()));
118 mlir::NamedAttrList &attrs,
119 cir::CallingConv &callingConv,
120 cir::SideEffect &sideEffect,
121 bool attrOnCallSite,
bool isThunk) {
123 sideEffect = cir::SideEffect::All;
125 auto addUnitAttr = [&](llvm::StringRef name) {
130 addUnitAttr(cir::CIRDialect::getNoReturnAttrName());
141 if (targetDecl->
hasAttr<NoThrowAttr>())
142 addUnitAttr(cir::CIRDialect::getNoThrowAttrName());
147 if (targetDecl->
hasAttr<NoReturnAttr>())
148 addUnitAttr(cir::CIRDialect::getNoReturnAttrName());
149 if (targetDecl->
hasAttr<ReturnsTwiceAttr>())
150 addUnitAttr(cir::CIRDialect::getReturnsTwiceAttrName());
151 if (targetDecl->
hasAttr<ColdAttr>())
152 addUnitAttr(cir::CIRDialect::getColdAttrName());
153 if (targetDecl->
hasAttr<HotAttr>())
154 addUnitAttr(cir::CIRDialect::getHotAttrName());
155 if (targetDecl->
hasAttr<NoDuplicateAttr>())
156 addUnitAttr(cir::CIRDialect::getNoDuplicatesAttrName());
157 if (targetDecl->
hasAttr<ConvergentAttr>())
158 addUnitAttr(cir::CIRDialect::getConvergentAttrName());
160 if (
const FunctionDecl *func = dyn_cast<FunctionDecl>(targetDecl)) {
174 if (func->isNoReturn())
175 addUnitAttr(cir::CIRDialect::getNoReturnAttrName());
183 if (targetDecl->
hasAttr<ConstAttr>()) {
186 sideEffect = cir::SideEffect::Const;
187 }
else if (targetDecl->
hasAttr<PureAttr>()) {
189 sideEffect = cir::SideEffect::Pure;
192 attrs.set(cir::CIRDialect::getSideEffectAttrName(),
197 if (targetDecl->
hasAttr<AnyX86NoCallerSavedRegistersAttr>())
198 addUnitAttr(cir::CIRDialect::getNoCallerSavedRegsAttrName());
201 if (targetDecl->
hasAttr<LeafAttr>())
202 addUnitAttr(cir::CIRDialect::getNoCallbackAttrName());
219 if (
auto *modularFormat = targetDecl->
getAttr<ModularFormatAttr>()) {
221 StringRef
type =
format->getType()->getName();
222 std::string formatIdx = std::to_string(
format->getFormatIdx());
223 std::string firstArg = std::to_string(
format->getFirstArg());
225 type, formatIdx, firstArg,
226 modularFormat->getModularImplFn()->getName(),
227 modularFormat->getImplName()};
228 llvm::append_range(args, modularFormat->aspects());
229 attrs.set(cir::CIRDialect::getModularFormatAttrName(),
230 builder.getStringAttr(llvm::join(args,
",")));
257 if (!fpt->hasExtParameterInfos()) {
258 prefix.append(fpt->param_type_begin(), fpt->param_type_end());
272 bool passParams =
true;
274 if (
auto *cd = dyn_cast<CXXConstructorDecl>(md)) {
277 if (cd->getInheritedConstructor())
278 cgm.errorNYI(cd->getSourceRange(),
279 "arrangeCXXStructorDeclaration: inheriting constructor");
289 theCXXABI.buildStructorSignature(gd, argTypes);
293 (passParams && md->isVariadic() ?
RequiredArgs(argTypes.size())
296 CanQualType resultType = theCXXABI.hasThisReturn(gd) ? argTypes.front()
297 : theCXXABI.hasMostDerivedReturn(gd)
298 ? astContext.VoidPtrTy
301 assert(!theCXXABI.hasThisReturn(gd) &&
302 "Please send PR with a test and remove this");
324 cgm.errorNYI(
"deriveThisType: no record decl");
358 if (
type->getAsCXXRecordDecl()) {
360 "emitDelegateCallArg: record argument");
366 if (
type->isReferenceType()) {
372 "emitDelegateCallArg: ObjCAutoRefCount");
381 if (
type->isRecordType() &&
382 type->castAsRecordDecl()->isParamDestroyedInCallee() &&
385 "emitDelegateCallArg: callee-destructed param");
396 if (
const auto *proto = dyn_cast<FunctionProtoType>(fnType)) {
397 if (proto->isVariadic())
399 if (proto->hasExtParameterInfos())
400 cgm.
errorNYI(
"call to functions with extra parameter info");
403 cgm.
errorNYI(
"call to function without a prototype");
406 for (
const CallArg &arg : args)
424 unsigned extraPrefixArgs,
unsigned extraSuffixArgs,
bool passProtoArgs) {
428 for (
const auto &arg : args)
429 argTypes.push_back(astContext.getCanonicalParamType(arg.ty));
432 unsigned totalPrefixArgs = 1 + extraPrefixArgs;
437 fpt, totalPrefixArgs + extraSuffixArgs)
441 if (theCXXABI.hasThisReturn(gd))
443 "arrangeCXXConstructorCall: hasThisReturn");
444 if (theCXXABI.hasMostDerivedReturn(gd))
446 "arrangeCXXConstructorCall: hasMostDerivedReturn");
464 assert(numPrefixArgs + 1 <= args.size() &&
465 "Emitting a call with less args than the required prefix?");
469 for (
const CallArg &arg : args)
470 argTypes.push_back(astContext.getCanonicalParamType(arg.ty));
498 auto *thisType = theCXXABI.getThisArgumentTypeForMethod(md);
520 return ::arrangeCIRFunctionInfo(
529 if (
const auto *md = dyn_cast<CXXMethodDecl>(fd))
530 if (md->isInstance())
552static cir::CIRCallOpInterface
554 cir::FuncType indirectFuncTy, mlir::Value indirectFuncVal,
555 cir::FuncOp directFuncOp,
557 const mlir::NamedAttrList &attrs) {
576 "emitCallLikeOp: call does not have an associated cir.try");
580 if (tryOp.getSynthetic()) {
581 cgf.
cgm.
errorNYI(
"emitCallLikeOp: tryOp synthetic");
585 cir::CallOp callOpWithExceptions;
586 if (indirectFuncTy) {
587 cgf.
cgm.
errorNYI(
"emitCallLikeOp: indirect function type");
591 callOpWithExceptions =
592 builder.
createCallOp(callLoc, directFuncOp, cirCallArgs);
595 return callOpWithExceptions;
598 assert(builder.getInsertionBlock() &&
"expected valid basic block");
601 if (indirectFuncTy) {
607 op = builder.
createCallOp(callLoc, directFuncOp, cirCallArgs, attrs);
617 return ::arrangeCIRFunctionInfo(*
this, argTypes, fpt);
632 cir::CIRCallOpInterface *callOp,
633 mlir::Location loc) {
642 for (
auto [argNo, arg, canQualArgType] :
643 llvm::enumerate(args, funcInfo.
argTypes())) {
649 if (!mlir::isa<cir::RecordType>(argType) &&
650 !mlir::isa<cir::ComplexType>(argType)) {
652 if (arg.isAggregate())
653 cgm.errorNYI(loc,
"emitCall: aggregate call argument");
654 v = arg.getKnownRValue().getValue();
657 if (argType != v.getType() && mlir::isa<cir::IntType>(v.getType()))
658 cgm.errorNYI(loc,
"emitCall: widening integer call argument");
665 cirCallArgs[argNo] = v;
668 if (!arg.isAggregate()) {
670 arg.copyInto(*
this, src, loc);
672 src = arg.hasLValue() ? arg.getKnownLValue().getAddress()
673 : arg.getKnownRValue().getAggregateAddress();
680 mlir::Location argLoc = loc;
693 if (srcTy != argType) {
694 cgm.errorNYI(loc,
"emitCall: source type does not match argument type");
710 cirCallArgs[argNo] = builder.createLoad(argLoc, src);
719 mlir::NamedAttrList attrs;
721 if (
auto calleeFuncOp = dyn_cast<cir::FuncOp>(calleePtr))
722 funcName = calleeFuncOp.getName();
726 cir::CallingConv callingConv;
727 cir::SideEffect sideEffect;
729 attrs, callingConv, sideEffect,
732 cir::FuncType indirectFuncTy;
733 mlir::Value indirectFuncVal;
734 cir::FuncOp directFuncOp;
735 if (
auto fnOp = dyn_cast<cir::FuncOp>(calleePtr)) {
737 }
else if (
auto getGlobalOp = mlir::dyn_cast<cir::GetGlobalOp>(calleePtr)) {
742 mlir::Operation *globalOp =
cgm.getGlobalValue(getGlobalOp.getName());
743 assert(globalOp &&
"undefined global function");
744 directFuncOp = mlir::cast<cir::FuncOp>(globalOp);
746 [[maybe_unused]] mlir::ValueTypeRange<mlir::ResultRange> resultTypes =
747 calleePtr->getResultTypes();
748 [[maybe_unused]]
auto funcPtrTy =
749 mlir::dyn_cast<cir::PointerType>(resultTypes.front());
750 assert(funcPtrTy && mlir::isa<cir::FuncType>(funcPtrTy.getPointee()) &&
751 "expected pointer to function");
753 indirectFuncTy = cirFuncTy;
754 indirectFuncVal = calleePtr->getResult(0);
761 bool cannotThrow = attrs.getNamed(
"nothrow").has_value();
764 mlir::Location callLoc = loc;
765 cir::CIRCallOpInterface theCall =
766 emitCallLikeOp(*
this, loc, indirectFuncTy, indirectFuncVal, directFuncOp,
767 cirCallArgs, isInvoke, attrs);
785 mlir::ResultRange results = theCall->getOpResults();
786 assert(results.size() <= 1 &&
"multiple returns from a call");
793 mlir::ResultRange results = theCall->getOpResults();
794 assert(results.size() == 1 &&
"unexpected number of returns");
798 if (results[0].
getType() != retCIRTy)
799 cgm.errorNYI(loc,
"bitcast on function return value");
801 mlir::Region *region = builder.getBlock()->getParent();
802 if (region != theCall->getParentRegion())
803 cgm.errorNYI(loc,
"function calls with cleanup");
808 mlir::ResultRange results = theCall->getOpResults();
809 assert(!results.empty() &&
810 "Expected at least one result for complex rvalue");
814 llvm_unreachable(
"Invalid evaluation kind");
818 mlir::Location loc)
const {
820 if (!hasLV &&
rv.isScalar())
822 else if (!hasLV &&
rv.isComplex())
835 cir::CallOp call = builder.createCallOp(loc, callee, args);
836 assert(call->getNumResults() <= 1 &&
837 "runtime functions have at most 1 result");
839 if (call->getNumResults() == 0)
842 return call->getResult(0);
848 "reference binding to unmaterialized r-value!");
877QualType CIRGenFunction::getVarArgType(
const Expr *arg) {
881 if (!
getTarget().getTriple().isOSWindows())
882 return arg->getType();
885 cgm.
errorNYI(arg->getSourceRange(),
"getVarArgType: NYI for Windows target");
886 return arg->getType();
903 llvm::iterator_range<clang::CallExpr::const_arg_iterator> argRange,
910 bool isVariadic =
false;
915 isVariadic = fpt->isVariadic();
917 argTypes.assign(fpt->param_type_begin() + paramsToSkip,
918 fpt->param_type_end());
922 for (
const clang::Expr *a : llvm::drop_begin(argRange, argTypes.size()))
923 argTypes.push_back(isVariadic ? getVarArgType(a) : a->getType());
924 assert(argTypes.size() == (
size_t)(argRange.end() - argRange.begin()));
931 auto leftToRight =
true;
934 auto maybeEmitImplicitObjectSize = [&](
size_t i,
const Expr *arg,
943 cgm.errorNYI(
"emit implicit object size for call arg");
947 size_t callArgsStart = args.size();
948 for (
size_t i = 0; i != argTypes.size(); ++i) {
949 size_t idx = leftToRight ? i : argTypes.size() - i - 1;
951 size_t initialArgSize = args.size();
957 assert(initialArgSize + 1 == args.size() &&
958 "The code below depends on only adding one arg per emitCallArg");
959 (void)initialArgSize;
963 if (!args.back().hasLValue()) {
964 RValue rvArg = args.back().getKnownRValue();
966 maybeEmitImplicitObjectSize(idx, *currentArg, rvArg);
970 std::reverse(args.begin() + callArgsStart, args.end());
static cir::CIRCallOpInterface emitCallLikeOp(CIRGenFunction &cgf, mlir::Location callLoc, cir::FuncType indirectFuncTy, mlir::Value indirectFuncVal, cir::FuncOp directFuncOp, const SmallVectorImpl< mlir::Value > &cirCallArgs, bool isInvoke, const mlir::NamedAttrList &attrs)
static const CIRGenFunctionInfo & arrangeCIRFunctionInfo(CIRGenTypes &cgt, SmallVectorImpl< CanQualType > &prefix, CanQual< FunctionProtoType > fpt)
Arrange the CIR function layout for a value of the given function type, on top of any implicit parame...
static void appendParameterTypes(const CIRGenTypes &cgt, SmallVectorImpl< CanQualType > &prefix, CanQual< FunctionProtoType > fpt)
Adds the formal parameters in FPT to the given prefix.
static void addAttributesFromFunctionProtoType(CIRGenBuilderTy &builder, mlir::NamedAttrList &attrs, const FunctionProtoType *fpt)
static CanQual< FunctionProtoType > getFormalType(const CXXMethodDecl *md)
Returns the canonical formal type of the given C++ method.
static const CIRGenFunctionInfo & arrangeFreeFunctionLikeCall(CIRGenTypes &cgt, CIRGenModule &cgm, const CallArgList &args, const FunctionType *fnType)
static bool isVirtualCall(const CallExpr *CE)
cir::CallOp createCallOp(mlir::Location loc, mlir::SymbolRefAttr callee, mlir::Type returnType, mlir::ValueRange operands, llvm::ArrayRef< mlir::NamedAttribute > attrs={})
cir::CallOp createIndirectCallOp(mlir::Location loc, mlir::Value indirectTarget, cir::FuncType funcType, mlir::ValueRange operands, llvm::ArrayRef< mlir::NamedAttribute > attrs={})
CanQualType getCanonicalParamType(QualType T) const
Return the canonical parameter type corresponding to the specific potentially non-canonical one.
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
CanQualType getCanonicalTagType(const TagDecl *TD) const
mlir::Type getElementType() const
static AggValueSlot ignored()
Returns an aggregate value slot indicating that the aggregate value is being ignored.
virtual CIRGenCallee getVirtualFunctionPointer(CIRGenFunction &cgf, clang::GlobalDecl gd, Address thisAddr, mlir::Type ty, SourceLocation loc)=0
Build a virtual function pointer in the ABI-specific way.
Abstract information about a function or function prototype.
clang::GlobalDecl getCalleeDecl() const
const clang::FunctionProtoType * getCalleeFunctionProtoType() const
CIRGenCalleeInfo getAbstractInfo() const
clang::GlobalDecl getVirtualMethodDecl() const
CIRGenCallee prepareConcreteCallee(CIRGenFunction &cgf) const
If this is a delayed callee computation of some sort, prepare a concrete callee.
Address getThisAddress() const
cir::FuncType getVirtualFunctionType() const
const clang::CallExpr * getVirtualCallExpr() const
mlir::Operation * getFunctionPointer() const
CanQualType getReturnType() const
unsigned getNumRequiredArgs() const
static CIRGenFunctionInfo * create(FunctionType::ExtInfo info, CanQualType resultType, llvm::ArrayRef< CanQualType > argTypes, RequiredArgs required)
llvm::MutableArrayRef< CanQualType > argTypes()
llvm::ArrayRef< CanQualType > requiredArguments() const
const_arg_iterator argTypesBegin() const
An abstract representation of regular/ObjC call/message targets.
bool hasFunctionDecl() const
unsigned getNumParams() const
const clang::ParmVarDecl * getParamDecl(unsigned I) const
void emitCallArgs(CallArgList &args, PrototypeWrapper prototype, llvm::iterator_range< clang::CallExpr::const_arg_iterator > argRange, AbstractCallee callee=AbstractCallee(), unsigned paramsToSkip=0)
mlir::Type convertType(clang::QualType t)
static cir::TypeEvaluationKind getEvaluationKind(clang::QualType type)
Return the cir::TypeEvaluationKind of QualType type.
RValue convertTempToRValue(Address addr, clang::QualType type, clang::SourceLocation loc)
Given the address of a temporary variable, produce an r-value of its type.
CIRGenTypes & getTypes() const
const clang::LangOptions & getLangOpts() const
const TargetInfo & getTarget() const
LValue emitLValue(const clang::Expr *e)
Emit code to compute a designator that specifies the location of the expression.
Address getAddrOfLocalVar(const clang::VarDecl *vd)
Return the address of a local variable.
mlir::Location getLoc(clang::SourceLocation srcLoc)
Helpers to convert Clang's SourceLocation to a MLIR Location.
void emitAggregateStore(mlir::Value value, Address dest)
RValue emitReferenceBindingToExpr(const Expr *e)
Emits a reference binding to the passed in expression.
AggValueSlot createAggTemp(QualType ty, mlir::Location loc, const Twine &name="tmp", Address *alloca=nullptr)
Create a temporary memory object for the given aggregate type.
void populateCatchHandlersIfRequired(cir::TryOp tryOp)
RValue getUndefRValue(clang::QualType ty)
Get an appropriate 'undef' rvalue for the given type.
Address returnValue
The temporary alloca to hold the return value.
static bool hasAggregateEvaluationKind(clang::QualType type)
RValue emitAnyExprToTemp(const clang::Expr *e)
Similarly to emitAnyExpr(), however, the result will always be accessible even if no aggregate locati...
void emitStoreOfComplex(mlir::Location loc, mlir::Value v, LValue dest, bool isInit)
EmitStoreOfComplex - Store a complex number into the specified l-value.
std::string getCounterAggTmpAsString()
RValue emitCall(const CIRGenFunctionInfo &funcInfo, const CIRGenCallee &callee, ReturnValueSlot returnValue, const CallArgList &args, cir::CIRCallOpInterface *callOp, mlir::Location loc)
void emitCallArg(CallArgList &args, const clang::Expr *e, clang::QualType argType)
CIRGenBuilderTy & getBuilder()
mlir::Value emitRuntimeCall(mlir::Location loc, cir::FuncOp callee, llvm::ArrayRef< mlir::Value > args={})
LValue makeAddrLValue(Address addr, QualType ty, AlignmentSource source=AlignmentSource::Type)
bool isCatchOrCleanupRequired()
RValue emitAnyExpr(const clang::Expr *e, AggValueSlot aggSlot=AggValueSlot::ignored(), bool ignoreResult=false)
Emit code to compute the specified expression which can have any type.
void emitDelegateCallArg(CallArgList &args, const clang::VarDecl *param, clang::SourceLocation loc)
We are performing a delegate call; that is, the current function is delegating to another one.
LexicalScope * curLexScope
std::optional< mlir::Location > currSrcLoc
Use to track source locations across nested visitor traversals.
clang::ASTContext & getContext() const
Address createMemTemp(QualType t, mlir::Location loc, const Twine &name="tmp", Address *alloca=nullptr, mlir::OpBuilder::InsertPoint ip={})
Create a temporary memory object of the given type, with appropriate alignmen and cast it to the defa...
This class organizes the cross-function state that is used while generating CIR code.
DiagnosticBuilder errorNYI(SourceLocation, llvm::StringRef)
Helpers to emit "not yet implemented" error diagnostics.
CIRGenBuilderTy & getBuilder()
const TargetCIRGenInfo & getTargetCIRGenInfo()
mlir::MLIRContext & getMLIRContext()
CIRGenCXXABI & getCXXABI() const
void constructAttributeList(llvm::StringRef name, const CIRGenFunctionInfo &info, CIRGenCalleeInfo calleeInfo, mlir::NamedAttrList &attrs, cir::CallingConv &callingConv, cir::SideEffect &sideEffect, bool attrOnCallSite, bool isThunk)
Get the CIR attributes and calling convention to use for a particular function type.
This class organizes the cross-module state that is used while lowering AST types to CIR types.
CIRGenModule & getCGModule() const
const CIRGenFunctionInfo & arrangeGlobalDeclaration(GlobalDecl gd)
const CIRGenFunctionInfo & arrangeCXXMethodDeclaration(const clang::CXXMethodDecl *md)
C++ methods have some special rules and also have implicit parameters.
const CIRGenFunctionInfo & arrangeCXXStructorDeclaration(clang::GlobalDecl gd)
const CIRGenFunctionInfo & arrangeFreeFunctionCall(const CallArgList &args, const FunctionType *fnType)
const CIRGenFunctionInfo & arrangeFreeFunctionType(CanQual< FunctionProtoType > fpt)
bool isFuncTypeConvertible(const clang::FunctionType *ft)
Utility to check whether a function type can be converted to a CIR type (i.e.
cir::FuncType getFunctionTypeForVTable(clang::GlobalDecl gd)
Get the CIR function type for use in a vtable, given a CXXMethodDecl.
const CIRGenFunctionInfo & arrangeCXXConstructorCall(const CallArgList &args, const clang::CXXConstructorDecl *d, clang::CXXCtorType ctorKind, unsigned extraPrefixArgs, unsigned extraSuffixArgs, bool passProtoArgs=true)
Arrange a call to a C++ method, passing the given arguments.
const CIRGenFunctionInfo & arrangeCXXMethodType(const clang::CXXRecordDecl *rd, const clang::FunctionProtoType *ftp, const clang::CXXMethodDecl *md)
Arrange the argument and result information for a call to an unknown C++ non-static member function o...
cir::FuncType getFunctionType(const CIRGenFunctionInfo &info)
Get the CIR function type for.
clang::CanQualType deriveThisType(const clang::CXXRecordDecl *rd, const clang::CXXMethodDecl *md)
Derives the 'this' type for CIRGen purposes, i.e.
const CIRGenFunctionInfo & arrangeCIRFunctionInfo(CanQualType returnType, llvm::ArrayRef< CanQualType > argTypes, FunctionType::ExtInfo info, RequiredArgs required)
const CIRGenFunctionInfo & arrangeFunctionDeclaration(const clang::FunctionDecl *fd)
Free functions are functions that are compatible with an ordinary C function pointer type.
clang::ASTContext & getASTContext() const
const CIRGenFunctionInfo & arrangeCXXMethodCall(const CallArgList &args, const clang::FunctionProtoType *type, RequiredArgs required, unsigned numPrefixArgs)
Arrange a call to a C++ method, passing the given arguments.
mlir::Type convertType(clang::QualType type)
Convert a Clang type into a mlir::Type.
void addUncopiedAggregate(LValue lvalue, clang::QualType type)
void add(RValue rvalue, clang::QualType type)
This trivial value class is used to represent the result of an expression that is evaluated.
static RValue get(mlir::Value v)
static RValue getAggregate(Address addr, bool isVolatile=false)
Convert an Address to an RValue.
static RValue getComplex(mlir::Value v)
A class for recording the number of arguments that a function signature requires.
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...
Contains the address where the return value of a function can be stored, and whether the address is v...
virtual bool isNoProtoCallVariadic(const FunctionNoProtoType *fnType) const
Determine whether a call to an unprototyped functions under the given calling convention should use t...
Represents a C++ constructor within a class.
Represents a static or instance method of a struct/union/class.
Qualifiers getMethodQualifiers() const
Represents a C++ struct/union/class.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
SourceLocation getBeginLoc() const
ConstExprIterator const_arg_iterator
Represents a canonical, potentially-qualified type.
static CanQual< Type > CreateUnsafe(QualType Other)
CanProxy< U > castAs() const
CanQual< T > getUnqualifiedType() const
Retrieve the unqualified form of this type.
CanProxy< U > getAs() const
Retrieve a canonical type pointer with a different static type, upcasting or downcasting as needed.
This represents one expression.
ExprObjectKind getObjectKind() const
getObjectKind - The object kind that this expression produces.
Represents a function declaration or definition.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Represents a K&R-style 'int foo()' function, which has no information available about its arguments.
Represents a prototype with parameter type info, e.g.
ExceptionSpecificationType getExceptionSpecType() const
Get the kind of exception specification on this function.
bool isNothrow(bool ResultIfDependent=false) const
Determine whether this function type has a non-throwing exception specification.
A class which abstracts out some details necessary for making a call.
FunctionType - C99 6.7.5.3 - Function Declarators.
ExtInfo getExtInfo() const
QualType getReturnType() const
GlobalDecl - represents a global declaration.
const Decl * getDecl() const
A (possibly-)qualified type.
LangAS getAddressSpace() const
bool isParamDestroyedInCallee() const
Encodes a location in the source.
SourceRange getSourceRange() const LLVM_READONLY
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpre...
CanQualType getCanonicalTypeUnqualified() const
bool isReferenceType() const
RecordDecl * castAsRecordDecl() const
const T * getAs() const
Member-template getAs<specific type>'.
bool isRecordType() const
Represents a variable declaration or definition.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
QualType::DestructionKind needsDestruction(const ASTContext &Ctx) const
Would the destruction of this variable have any effect, and if so, what kind?
@ Decl
The l-value was an access to a declared entity or something equivalently strong, like the address of ...
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
The JSON file list parser is used to communicate input to InstallAPI.
CanQual< Type > CanQualType
Represents a canonical, potentially-qualified type.
CXXCtorType
C++ constructor types.
bool isa(CodeGen::Address addr)
bool isUnresolvedExceptionSpec(ExceptionSpecificationType ESpecType)
@ OK_Ordinary
An ordinary object is located at an address in memory.
U cast(CodeGen::Address addr)
static bool opCallBitcastArg()
static bool opCallCIRGenFuncInfoExtParamInfo()
static bool functionUsesSEHTry()
static bool emitLifetimeMarkers()
static bool lowerAggregateLoadStore()
static bool opCallSurroundingTry()
static bool nothrowAttr()
static bool opCallReturn()
static bool opCallPaddingArgs()
static bool opCallExtParameterInfo()
static bool dataLayoutTypeAllocSize()
static bool opCallObjCMethod()
static bool opCallInAlloca()
static bool opCallCallConv()
static bool opFuncCallingConv()
static bool opCallAttrs()
static bool opCallImplicitObjectSizeArgs()
static bool opCallMustTail()
static bool cudaSupport()
static bool opCallFnInfoOpts()
static bool msvcCXXPersonality()
static bool opCallCIRGenFuncInfoParamInfo()
Similar to AddedStructorArgs, but only notes the number of additional arguments.
cir::TryOp getClosestTryParent()
llvm::PointerUnion< const clang::FunctionProtoType *, const clang::ObjCMethodDecl * > p
void copyInto(CIRGenFunction &cgf, Address addr, mlir::Location loc) const