[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.
This commit is contained in:
Kazu Hirata
2025-06-22 16:31:34 -07:00
committed by GitHub
parent 4154ada1d4
commit 9844085ea8

View File

@@ -343,7 +343,7 @@ llvm::ArrayRef<std::unique_ptr<CallEdge>> Function::GetCallEdges() {
Block &block = GetBlock(/*can_create*/true);
SymbolFile *sym_file = block.GetSymbolFile();
if (!sym_file)
return std::nullopt;
return {};
// Lazily read call site information from the SymbolFile.
m_call_edges = sym_file->ParseCallEdgesInFunction(GetID());