-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[CIR][NFC] Use arrangeFunctionDeclaration to build function types #139787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,7 +47,8 @@ class RequiredArgs { | |
| /// | ||
| /// If FD is not null, this will consider pass_object_size params in FD. | ||
| static RequiredArgs | ||
| forPrototypePlus(const clang::FunctionProtoType *prototype) { | ||
| forPrototypePlus(const clang::FunctionProtoType *prototype, | ||
| unsigned additional) { | ||
| if (!prototype->isVariadic()) | ||
| return All; | ||
|
|
||
|
|
@@ -58,8 +59,9 @@ class RequiredArgs { | |
| } | ||
|
|
||
| static RequiredArgs | ||
| forPrototypePlus(clang::CanQual<clang::FunctionProtoType> prototype) { | ||
| return forPrototypePlus(prototype.getTypePtr()); | ||
| forPrototypePlus(clang::CanQual<clang::FunctionProtoType> prototype, | ||
|
||
| unsigned additional) { | ||
| return forPrototypePlus(prototype.getTypePtr(), additional); | ||
| } | ||
|
|
||
| unsigned getNumRequiredArgs() const { | ||
|
|
@@ -114,6 +116,14 @@ class CIRGenFunctionInfo final | |
| getReturnType().Profile(id); | ||
| } | ||
|
|
||
| llvm::ArrayRef<ArgInfo> arguments() const { | ||
| return llvm::ArrayRef<ArgInfo>(argInfoBegin(), numArgs); | ||
| } | ||
|
|
||
| llvm::ArrayRef<ArgInfo> requiredArguments() const { | ||
| return llvm::ArrayRef<ArgInfo>(argInfoBegin(), getNumRequiredArgs()); | ||
| } | ||
|
|
||
| CanQualType getReturnType() const { return getArgsBuffer()[0].type; } | ||
|
|
||
| const_arg_iterator argInfoBegin() const { return getArgsBuffer() + 1; } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.