aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2024-10-24 10:23:40 +0100
committerGitHub <noreply@github.com>2024-10-24 10:23:40 +0100
commit4dd55c567aaed30c6842812e0798a70fee324c98 (patch)
tree832c5f53b744938b73f6484e3acde01bb1972677 /clang/lib/CodeGen/CodeGenFunction.h
parente37d736def5b95a2710f92881b5fc8b0494d8a05 (diff)
downloadllvm-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/CodeGenFunction.h')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h
index 5f203fe..750a6cc 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -3524,7 +3524,7 @@ public:
/// This function may clear the current insertion point; callers should use
/// EnsureInsertPoint if they wish to subsequently generate code without first
/// calling EmitBlock, EmitBranch, or EmitStmt.
- void EmitStmt(const Stmt *S, ArrayRef<const Attr *> Attrs = std::nullopt);
+ void EmitStmt(const Stmt *S, ArrayRef<const Attr *> Attrs = {});
/// EmitSimpleStmt - Try to emit a "simple" statement which does not
/// necessarily require an insertion point or debug information; typically
@@ -3551,11 +3551,9 @@ public:
void EmitIndirectGotoStmt(const IndirectGotoStmt &S);
void EmitIfStmt(const IfStmt &S);
- void EmitWhileStmt(const WhileStmt &S,
- ArrayRef<const Attr *> Attrs = std::nullopt);
- void EmitDoStmt(const DoStmt &S, ArrayRef<const Attr *> Attrs = std::nullopt);
- void EmitForStmt(const ForStmt &S,
- ArrayRef<const Attr *> Attrs = std::nullopt);
+ void EmitWhileStmt(const WhileStmt &S, ArrayRef<const Attr *> Attrs = {});
+ void EmitDoStmt(const DoStmt &S, ArrayRef<const Attr *> Attrs = {});
+ void EmitForStmt(const ForStmt &S, ArrayRef<const Attr *> Attrs = {});
void EmitReturnStmt(const ReturnStmt &S);
void EmitDeclStmt(const DeclStmt &S);
void EmitBreakStmt(const BreakStmt &S);
@@ -3632,7 +3630,7 @@ public:
llvm::Value *ParentFP);
void EmitCXXForRangeStmt(const CXXForRangeStmt &S,
- ArrayRef<const Attr *> Attrs = std::nullopt);
+ ArrayRef<const Attr *> Attrs = {});
/// Controls insertion of cancellation exit blocks in worksharing constructs.
class OMPCancelStackRAII {