diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 18 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGBuiltin.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDecl.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGNonTrivialStruct.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmt.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGStmtOpenMP.cpp | 4 | ||||
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 7 |
10 files changed, 24 insertions, 21 deletions
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); diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp index 6e98af4..c5073c2 100644 --- a/clang/lib/CodeGen/CGBuiltin.cpp +++ b/clang/lib/CodeGen/CGBuiltin.cpp @@ -1700,7 +1700,7 @@ llvm::Function *CodeGenFunction::generateBuiltinOSLogHelperFunction( IdentifierInfo *II = &Ctx.Idents.get(Name); FunctionDecl *FD = FunctionDecl::Create( Ctx, Ctx.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), II, - FuncionTy, nullptr, SC_PrivateExtern, false, false); + FuncionTy, nullptr, StorageClass::PrivateExtern, false, false); // Avoid generating debug location info for the function. FD->setImplicit(); diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp index a01638f..b0b8601 100644 --- a/clang/lib/CodeGen/CGDecl.cpp +++ b/clang/lib/CodeGen/CGDecl.cpp @@ -1388,7 +1388,7 @@ void CodeGenFunction::EmitAndRegisterVariableArrayDimensions( auto *ArtificialDecl = VarDecl::Create( getContext(), const_cast<DeclContext *>(D.getDeclContext()), D.getLocation(), D.getLocation(), NameIdent, QT, - getContext().CreateTypeSourceInfo(QT), SC_Auto); + getContext().CreateTypeSourceInfo(QT), StorageClass::Auto); ArtificialDecl->setImplicit(); MD = DI->EmitDeclareOfAutoVariable(ArtificialDecl, VlaSize.NumElts, diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 3013fff..9a09458e 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/lib/CodeGen/CGExpr.cpp @@ -2675,7 +2675,7 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { if (const auto *VD = dyn_cast<VarDecl>(ND)) { // Global Named registers access via intrinsics only - if (VD->getStorageClass() == SC_Register && + if (VD->getStorageClass() == StorageClass::Register && VD->hasAttr<AsmLabelAttr>() && !VD->isLocalVarDecl()) return EmitGlobalNamedRegister(VD, CGM); diff --git a/clang/lib/CodeGen/CGNonTrivialStruct.cpp b/clang/lib/CodeGen/CGNonTrivialStruct.cpp index d134be8..1a4e295 100644 --- a/clang/lib/CodeGen/CGNonTrivialStruct.cpp +++ b/clang/lib/CodeGen/CGNonTrivialStruct.cpp @@ -476,7 +476,7 @@ template <class Derived> struct GenFuncBase { FunctionDecl *FD = FunctionDecl::Create( Ctx, Ctx.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), II, Ctx.getFunctionType(Ctx.VoidTy, llvm::None, {}), nullptr, - SC_PrivateExtern, false, false); + StorageClass::PrivateExtern, false, false); CodeGenFunction NewCGF(CGM); setCGF(&NewCGF); CGF->StartFunction(FD, Ctx.VoidTy, F, FI, Args); diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index bdb9f40..75a72ed 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -3642,7 +3642,7 @@ CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction( FunctionDecl *FD = FunctionDecl::Create( C, C.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), II, - FunctionTy, nullptr, SC_Static, false, false); + FunctionTy, nullptr, StorageClass::Static, false, false); FunctionArgList args; ImplicitParamDecl DstDecl(C, FD, SourceLocation(), /*Id=*/nullptr, DestTy, @@ -3726,7 +3726,7 @@ CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction( FunctionDecl *FD = FunctionDecl::Create( C, C.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), II, - FunctionTy, nullptr, SC_Static, false, false); + FunctionTy, nullptr, StorageClass::Static, false, false); FunctionArgList args; ImplicitParamDecl DstDecl(C, FD, SourceLocation(), /*Id=*/nullptr, DestTy, diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp index a3540bd..e7282ba 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeGPU.cpp @@ -4127,7 +4127,7 @@ CGOpenMPRuntimeGPU::translateParameter(const FieldDecl *FD, const_cast<DeclContext *>(NativeParam->getDeclContext()), NativeParam->getBeginLoc(), NativeParam->getLocation(), NativeParam->getIdentifier(), ArgType, - /*TInfo=*/nullptr, SC_None, /*DefArg=*/nullptr); + /*TInfo=*/nullptr, StorageClass::None, /*DefArg=*/nullptr); } Address diff --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp index d67e73a..79994d1 100644 --- a/clang/lib/CodeGen/CGStmt.cpp +++ b/clang/lib/CodeGen/CGStmt.cpp @@ -1997,7 +1997,7 @@ AddVariableConstraints(const std::string &Constraint, const Expr &AsmExpr, const VarDecl *Variable = dyn_cast<VarDecl>(&Value); if (!Variable) return Constraint; - if (Variable->getStorageClass() != SC_Register) + if (Variable->getStorageClass() != StorageClass::Register) return Constraint; AsmLabelAttr *Attr = Variable->getAttr<AsmLabelAttr>(); if (!Attr) diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp index 5e8d98c..dd3b1607 100644 --- a/clang/lib/CodeGen/CGStmtOpenMP.cpp +++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp @@ -433,7 +433,7 @@ static llvm::Function *emitOutlinedFunctionPrologue( DebugFunctionDecl = FunctionDecl::Create( Ctx, Ctx.getTranslationUnitDecl(), FO.S->getBeginLoc(), SourceLocation(), DeclarationName(), FunctionTy, - Ctx.getTrivialTypeSourceInfo(FunctionTy), SC_Static, + Ctx.getTrivialTypeSourceInfo(FunctionTy), StorageClass::Static, /*isInlineSpecified=*/false, /*hasWrittenPrototype=*/false); } for (const FieldDecl *FD : RD->fields()) { @@ -468,7 +468,7 @@ static llvm::Function *emitOutlinedFunctionPrologue( Ctx, DebugFunctionDecl, CapVar ? CapVar->getBeginLoc() : FD->getBeginLoc(), CapVar ? CapVar->getLocation() : FD->getLocation(), II, ArgType, - /*TInfo=*/nullptr, SC_None, /*DefArg=*/nullptr); + /*TInfo=*/nullptr, StorageClass::None, /*DefArg=*/nullptr); } else { Arg = ImplicitParamDecl::Create(Ctx, /*DC=*/nullptr, FD->getLocation(), II, ArgType, ImplicitParamDecl::Other); diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 50fb30a..797d624 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -2546,9 +2546,10 @@ static FunctionDecl * createGlobalInitOrCleanupFnDecl(CodeGen::CodeGenModule &CGM, StringRef FnName) { ASTContext &Ctx = CGM.getContext(); QualType FunctionTy = Ctx.getFunctionType(Ctx.VoidTy, llvm::None, {}); - return FunctionDecl::Create( - Ctx, Ctx.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), - &Ctx.Idents.get(FnName), FunctionTy, nullptr, SC_Static, false, false); + return FunctionDecl::Create(Ctx, Ctx.getTranslationUnitDecl(), + SourceLocation(), SourceLocation(), + &Ctx.Idents.get(FnName), FunctionTy, nullptr, + StorageClass::Static, false, false); } void CodeGenModule::unregisterGlobalDtorsWithUnAtExit() { |