aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorVlad Serebrennikov <serebrennikov.vladislav@gmail.com>2023-11-06 12:00:40 +0300
committerVlad Serebrennikov <serebrennikov.vladislav@gmail.com>2023-11-06 12:01:09 +0300
commitdda8e3de35ead65498094e75adf6f6efd2641323 (patch)
tree5de4c65eedc7239d1d328566e78bbef4b6e70b04 /clang/lib/CodeGen/CGBlocks.cpp
parent3f69b0a9037cfe4184102a980f580ce26e170728 (diff)
downloadllvm-dda8e3de35ead65498094e75adf6f6efd2641323.zip
llvm-dda8e3de35ead65498094e75adf6f6efd2641323.tar.gz
llvm-dda8e3de35ead65498094e75adf6f6efd2641323.tar.bz2
[clang][NFC] Refactor `ImplicitParamDecl::ImplicitParamKind`
This patch converts `ImplicitParamDecl::ImplicitParamKind` into a scoped enum at namespace scope, making it eligible for forward declaring. This is useful for `preferred_type` annotations on bit-fields.
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index 4f3a6e3..0cbace7 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -992,7 +992,7 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) {
// Fake up a new variable so that EmitScalarInit doesn't think
// we're referring to the variable in its own initializer.
ImplicitParamDecl BlockFieldPseudoVar(getContext(), type,
- ImplicitParamDecl::Other);
+ ImplicitParamKind::Other);
// We use one of these or the other depending on whether the
// reference is nested.
@@ -1450,7 +1450,7 @@ llvm::Function *CodeGenFunction::GenerateBlockFunction(
ImplicitParamDecl SelfDecl(getContext(), const_cast<BlockDecl *>(blockDecl),
SourceLocation(), II, selfTy,
- ImplicitParamDecl::ObjCSelf);
+ ImplicitParamKind::ObjCSelf);
args.push_back(&SelfDecl);
// Now add the rest of the parameters.
@@ -1874,9 +1874,9 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) {
QualType ReturnTy = C.VoidTy;
FunctionArgList args;
- ImplicitParamDecl DstDecl(C, C.VoidPtrTy, ImplicitParamDecl::Other);
+ ImplicitParamDecl DstDecl(C, C.VoidPtrTy, ImplicitParamKind::Other);
args.push_back(&DstDecl);
- ImplicitParamDecl SrcDecl(C, C.VoidPtrTy, ImplicitParamDecl::Other);
+ ImplicitParamDecl SrcDecl(C, C.VoidPtrTy, ImplicitParamKind::Other);
args.push_back(&SrcDecl);
const CGFunctionInfo &FI =
@@ -2061,7 +2061,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) {
QualType ReturnTy = C.VoidTy;
FunctionArgList args;
- ImplicitParamDecl SrcDecl(C, C.VoidPtrTy, ImplicitParamDecl::Other);
+ ImplicitParamDecl SrcDecl(C, C.VoidPtrTy, ImplicitParamKind::Other);
args.push_back(&SrcDecl);
const CGFunctionInfo &FI =
@@ -2303,10 +2303,10 @@ generateByrefCopyHelper(CodeGenFunction &CGF, const BlockByrefInfo &byrefInfo,
QualType ReturnTy = Context.VoidTy;
FunctionArgList args;
- ImplicitParamDecl Dst(Context, Context.VoidPtrTy, ImplicitParamDecl::Other);
+ ImplicitParamDecl Dst(Context, Context.VoidPtrTy, ImplicitParamKind::Other);
args.push_back(&Dst);
- ImplicitParamDecl Src(Context, Context.VoidPtrTy, ImplicitParamDecl::Other);
+ ImplicitParamDecl Src(Context, Context.VoidPtrTy, ImplicitParamKind::Other);
args.push_back(&Src);
const CGFunctionInfo &FI =
@@ -2371,7 +2371,7 @@ generateByrefDisposeHelper(CodeGenFunction &CGF,
FunctionArgList args;
ImplicitParamDecl Src(CGF.getContext(), Context.VoidPtrTy,
- ImplicitParamDecl::Other);
+ ImplicitParamKind::Other);
args.push_back(&Src);
const CGFunctionInfo &FI =