aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineOutliner.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2024-09-19 16:16:38 +0100
committerGitHub <noreply@github.com>2024-09-19 16:16:38 +0100
commite03f427196ec67a8a5cfbdd658f9eabe9bce83ce (patch)
tree5c39989033e45fe09b7d589f923e0b6c9d20f917 /llvm/lib/CodeGen/MachineOutliner.cpp
parent14120227a34365e829d05c1413033d235d7d272c (diff)
downloadllvm-e03f427196ec67a8a5cfbdd658f9eabe9bce83ce.zip
llvm-e03f427196ec67a8a5cfbdd658f9eabe9bce83ce.tar.gz
llvm-e03f427196ec67a8a5cfbdd658f9eabe9bce83ce.tar.bz2
[LLVM] Use {} instead of std::nullopt to initialize empty ArrayRef (#109133)
It is almost always simpler to use {} instead of std::nullopt to initialize an empty ArrayRef. This patch changes all occurrences I could find in LLVM itself. In future the ArrayRef(std::nullopt_t) constructor could be deprecated or removed.
Diffstat (limited to 'llvm/lib/CodeGen/MachineOutliner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineOutliner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp
index 36c325cb..6006ea7 100644
--- a/llvm/lib/CodeGen/MachineOutliner.cpp
+++ b/llvm/lib/CodeGen/MachineOutliner.cpp
@@ -1007,8 +1007,7 @@ MachineFunction *MachineOutliner::createOutlinedFunction(
DISubprogram *OutlinedSP = DB.createFunction(
Unit /* Context */, F->getName(), StringRef(Dummy), Unit /* File */,
0 /* Line 0 is reserved for compiler-generated code. */,
- DB.createSubroutineType(
- DB.getOrCreateTypeArray(std::nullopt)), /* void type */
+ DB.createSubroutineType(DB.getOrCreateTypeArray({})), /* void type */
0, /* Line 0 is reserved for compiler-generated code. */
DINode::DIFlags::FlagArtificial /* Compiler-generated code. */,
/* Outlined code is optimized code by definition. */