From efc82c4ad2bcb256a4f4c20238d08cd3afba4d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20Sch=C3=BCtt?= Date: Wed, 23 Dec 2020 16:56:00 +0100 Subject: [NFC, Refactor] Modernize StorageClass from Specifiers.h to a scoped enum (II) Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D93765 --- clang/lib/CodeGen/CGBlocks.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'clang/lib/CodeGen/CGBlocks.cpp') diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index a4f09af..a34f2e3 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -1954,7 +1954,7 @@ CodeGenFunction::GenerateCopyHelperFunction(const CGBlockInfo &blockInfo) { FunctionDecl *FD = FunctionDecl::Create( C, C.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), II, - FunctionTy, nullptr, SC_Static, false, false); + FunctionTy, nullptr, StorageClass::Static, false, false); setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, CGM); // This is necessary to avoid inheriting the previous line number. @@ -2148,7 +2148,7 @@ CodeGenFunction::GenerateDestroyHelperFunction(const CGBlockInfo &blockInfo) { FunctionDecl *FD = FunctionDecl::Create( C, C.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), II, - FunctionTy, nullptr, SC_Static, false, false); + FunctionTy, nullptr, StorageClass::Static, false, false); setBlockHelperAttributesVisibility(blockInfo.CapturesNonExternalType, Fn, FI, CGM); @@ -2400,9 +2400,10 @@ generateByrefCopyHelper(CodeGenFunction &CGF, const BlockByrefInfo &byrefInfo, ArgTys.push_back(Context.VoidPtrTy); QualType FunctionTy = Context.getFunctionType(ReturnTy, ArgTys, {}); - FunctionDecl *FD = FunctionDecl::Create( - Context, Context.getTranslationUnitDecl(), SourceLocation(), - SourceLocation(), II, FunctionTy, nullptr, SC_Static, false, false); + FunctionDecl *FD = + FunctionDecl::Create(Context, Context.getTranslationUnitDecl(), + SourceLocation(), SourceLocation(), II, FunctionTy, + nullptr, StorageClass::Static, false, false); CGF.CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, FI); @@ -2475,9 +2476,10 @@ generateByrefDisposeHelper(CodeGenFunction &CGF, ArgTys.push_back(Context.VoidPtrTy); QualType FunctionTy = Context.getFunctionType(R, ArgTys, {}); - FunctionDecl *FD = FunctionDecl::Create( - Context, Context.getTranslationUnitDecl(), SourceLocation(), - SourceLocation(), II, FunctionTy, nullptr, SC_Static, false, false); + FunctionDecl *FD = + FunctionDecl::Create(Context, Context.getTranslationUnitDecl(), + SourceLocation(), SourceLocation(), II, FunctionTy, + nullptr, StorageClass::Static, false, false); CGF.CGM.SetInternalFunctionAttributes(GlobalDecl(), Fn, FI); -- cgit v1.1