Skip to content

Commit

Permalink
[CodeGen] Add public function to emit C++ constructor/destructor
Browse files Browse the repository at this point in the history
function info
  • Loading branch information
ahatanaka committed Feb 12, 2024
1 parent 1bcf1d7 commit 16df02a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clang/include/clang/CodeGen/CodeGenABITypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ const CGFunctionInfo &arrangeFreeFunctionCall(CodeGenModule &CGM,
FunctionType::ExtInfo info,
RequiredArgs args);

const CGFunctionInfo &arrangeCXXStructorDeclaration(CodeGenModule &CGM,
GlobalDecl GD);

/// Returns the implicit arguments to add to a complete, non-delegating C++
/// constructor call.
ImplicitCXXConstructorArgs
Expand Down
5 changes: 5 additions & 0 deletions clang/lib/CodeGen/CGCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ CodeGenTypes::arrangeCXXStructorDeclaration(GlobalDecl GD) {
argTypes, extInfo, paramInfos, required);
}

const CGFunctionInfo &CodeGen::arrangeCXXStructorDeclaration(CodeGenModule &CGM,
GlobalDecl GD) {
return CGM.getTypes().arrangeCXXStructorDeclaration(GD);
}

static SmallVector<CanQualType, 16>
getArgTypesForCall(ASTContext &ctx, const CallArgList &args) {
SmallVector<CanQualType, 16> argTypes;
Expand Down

0 comments on commit 16df02a

Please sign in to comment.