Skip to content

Commit 9844085

Browse files
[lldb] Migrate away from ValueRange(std::nullopt) (NFC) (#145245)
ArrayRef has a constructor that accepts std::nullopt. This constructor dates back to the days when we still had llvm::Optional. Since the use of std::nullopt outside the context of std::optional is kind of abuse and not intuitive to new comers, I would like to move away from the constructor and eventually remove it. This patch takes care of the lldb side of migration.
1 parent 4154ada commit 9844085

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Symbol/Function.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ llvm::ArrayRef<std::unique_ptr<CallEdge>> Function::GetCallEdges() {
343343
Block &block = GetBlock(/*can_create*/true);
344344
SymbolFile *sym_file = block.GetSymbolFile();
345345
if (!sym_file)
346-
return std::nullopt;
346+
return {};
347347

348348
// Lazily read call site information from the SymbolFile.
349349
m_call_edges = sym_file->ParseCallEdgesInFunction(GetID());

0 commit comments

Comments
 (0)