mirror of
https://github.com/intel/llvm.git
synced 2026-01-21 04:14:03 +08:00
[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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user