diff options
author | Jay Foad <jay.foad@amd.com> | 2024-10-24 10:23:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-24 10:23:40 +0100 |
commit | 4dd55c567aaed30c6842812e0798a70fee324c98 (patch) | |
tree | 832c5f53b744938b73f6484e3acde01bb1972677 /clang/lib/CodeGen/CGCall.cpp | |
parent | e37d736def5b95a2710f92881b5fc8b0494d8a05 (diff) | |
download | llvm-4dd55c567aaed30c6842812e0798a70fee324c98.zip llvm-4dd55c567aaed30c6842812e0798a70fee324c98.tar.gz llvm-4dd55c567aaed30c6842812e0798a70fee324c98.tar.bz2 |
[clang] Use {} instead of std::nullopt to initialize empty ArrayRef (#109399)
Follow up to #109133.
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGCall.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 4ae981e..5f50ab6f 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -118,8 +118,8 @@ CodeGenTypes::arrangeFreeFunctionType(CanQual<FunctionNoProtoType> FTNP) { // When translating an unprototyped function type, always use a // variadic type. return arrangeLLVMFunctionInfo(FTNP->getReturnType().getUnqualifiedType(), - FnInfoOpts::None, std::nullopt, - FTNP->getExtInfo(), {}, RequiredArgs(0)); + FnInfoOpts::None, {}, FTNP->getExtInfo(), {}, + RequiredArgs(0)); } static void addExtParameterInfosForCall( @@ -473,7 +473,7 @@ CodeGenTypes::arrangeFunctionDeclaration(const FunctionDecl *FD) { // non-variadic type. if (CanQual<FunctionNoProtoType> noProto = FTy.getAs<FunctionNoProtoType>()) { return arrangeLLVMFunctionInfo(noProto->getReturnType(), FnInfoOpts::None, - std::nullopt, noProto->getExtInfo(), {}, + {}, noProto->getExtInfo(), {}, RequiredArgs::All); } @@ -719,8 +719,8 @@ CodeGenTypes::arrangeCXXMethodCall(const CallArgList &args, } const CGFunctionInfo &CodeGenTypes::arrangeNullaryFunction() { - return arrangeLLVMFunctionInfo(getContext().VoidTy, FnInfoOpts::None, - std::nullopt, FunctionType::ExtInfo(), {}, + return arrangeLLVMFunctionInfo(getContext().VoidTy, FnInfoOpts::None, {}, + FunctionType::ExtInfo(), {}, RequiredArgs::All); } @@ -4423,7 +4423,7 @@ void CodeGenFunction::EmitNonNullArgCheck(RValue RV, QualType ArgType, EmitCheckSourceLocation(ArgLoc), EmitCheckSourceLocation(AttrLoc), llvm::ConstantInt::get(Int32Ty, ArgNo + 1), }; - EmitCheck(std::make_pair(Cond, CheckKind), Handler, StaticData, std::nullopt); + EmitCheck(std::make_pair(Cond, CheckKind), Handler, StaticData, {}); } void CodeGenFunction::EmitNonNullArgCheck(Address Addr, QualType ArgType, @@ -4814,7 +4814,7 @@ CodeGenFunction::EmitNounwindRuntimeCall(llvm::FunctionCallee callee, /// runtime function. llvm::CallInst *CodeGenFunction::EmitRuntimeCall(llvm::FunctionCallee callee, const llvm::Twine &name) { - return EmitRuntimeCall(callee, std::nullopt, name); + return EmitRuntimeCall(callee, {}, name); } // Calls which may throw must have operand bundles indicating which funclet @@ -4881,7 +4881,7 @@ void CodeGenFunction::EmitNoreturnRuntimeCallOrInvoke( llvm::CallBase * CodeGenFunction::EmitRuntimeCallOrInvoke(llvm::FunctionCallee callee, const Twine &name) { - return EmitRuntimeCallOrInvoke(callee, std::nullopt, name); + return EmitRuntimeCallOrInvoke(callee, {}, name); } /// Emits a call or invoke instruction to the given runtime function. |