[Lldb-commits] [lldb] 529ca5a - [lldb] Use std::nullopt instead of llvm::None (NFC)
Kazu Hirata via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 5 23:18:21 PST 2022
Author: Kazu Hirata
Date: 2022-12-05T23:18:15-08:00
New Revision: 529ca5ad07d5b872b7c0a8e8d27ce559a5bde4f7
URL: https://github.com/llvm/llvm-project/commit/529ca5ad07d5b872b7c0a8e8d27ce559a5bde4f7
DIFF: https://github.com/llvm/llvm-project/commit/529ca5ad07d5b872b7c0a8e8d27ce559a5bde4f7.diff
LOG: [lldb] Use std::nullopt instead of llvm::None (NFC)
This is part of an effort to migrate from llvm::Optional to
std::optional:
https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
Added:
Modified:
lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
lldb/source/Host/netbsd/HostInfoNetBSD.cpp
lldb/source/Host/openbsd/HostInfoOpenBSD.cpp
lldb/source/Host/windows/HostInfoWindows.cpp
lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp
lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h
lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
Removed:
################################################################################
diff --git a/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp b/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
index f9ff45666c1e0..40efe69004439 100644
--- a/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
+++ b/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp
@@ -38,7 +38,7 @@ llvm::Optional<std::string> HostInfoFreeBSD::GetOSBuildString() {
if (::sysctl(mib, 2, &osrev, &osrev_len, NULL, 0) == 0)
return llvm::formatv("{0,8:8}", osrev).str();
- return llvm::None;
+ return std::nullopt;
}
FileSpec HostInfoFreeBSD::GetProgramFileSpec() {
diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
index ddc66c8f5b50b..8dacc872d9bf2 100644
--- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
+++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm
@@ -68,7 +68,7 @@
if (::sysctl(mib, 2, cstr, &cstr_len, NULL, 0) == 0)
return std::string(cstr, cstr_len - 1);
- return llvm::None;
+ return std::nullopt;
}
static void ParseOSVersion(llvm::VersionTuple &version, NSString *Key) {
diff --git a/lldb/source/Host/netbsd/HostInfoNetBSD.cpp b/lldb/source/Host/netbsd/HostInfoNetBSD.cpp
index 234dd3d5e1039..ad0ee20e91c37 100644
--- a/lldb/source/Host/netbsd/HostInfoNetBSD.cpp
+++ b/lldb/source/Host/netbsd/HostInfoNetBSD.cpp
@@ -51,7 +51,7 @@ llvm::Optional<std::string> HostInfoNetBSD::GetOSBuildString() {
if (::sysctl(mib, 2, &osrev, &osrev_len, NULL, 0) == 0)
return llvm::formatv("{0,10:10}", osrev).str();
- return llvm::None;
+ return std::nullopt;
}
FileSpec HostInfoNetBSD::GetProgramFileSpec() {
diff --git a/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp b/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp
index 5db843ff628d6..033685a40f5c1 100644
--- a/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp
+++ b/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp
@@ -38,7 +38,7 @@ llvm::Optional<std::string> HostInfoOpenBSD::GetOSBuildString() {
if (::sysctl(mib, 2, &osrev, &osrev_len, NULL, 0) == 0)
return llvm::formatv("{0,8:8}", osrev).str();
- return llvm::None;
+ return std::nullopt;
}
FileSpec HostInfoOpenBSD::GetProgramFileSpec() {
diff --git a/lldb/source/Host/windows/HostInfoWindows.cpp b/lldb/source/Host/windows/HostInfoWindows.cpp
index c6fa96d674bb7..48b3e10984adf 100644
--- a/lldb/source/Host/windows/HostInfoWindows.cpp
+++ b/lldb/source/Host/windows/HostInfoWindows.cpp
@@ -29,10 +29,10 @@ namespace {
class WindowsUserIDResolver : public UserIDResolver {
protected:
llvm::Optional<std::string> DoGetUserName(id_t uid) override {
- return llvm::None;
+ return std::nullopt;
}
llvm::Optional<std::string> DoGetGroupName(id_t gid) override {
- return llvm::None;
+ return std::nullopt;
}
};
} // namespace
@@ -77,7 +77,7 @@ llvm::VersionTuple HostInfoWindows::GetOSVersion() {
llvm::Optional<std::string> HostInfoWindows::GetOSBuildString() {
llvm::VersionTuple version = GetOSVersion();
if (version.empty())
- return llvm::None;
+ return std::nullopt;
return "Windows NT " + version.getAsString();
}
diff --git a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
index 5910980a889e9..80a7303f79aef 100644
--- a/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/NativeRegisterContextFreeBSD_x86_64.cpp
@@ -311,9 +311,9 @@ NativeRegisterContextFreeBSD_x86_64::GetSetForNativeRegNum(
if (reg_num >= k_first_avx_i386 && reg_num <= k_last_avx_i386)
return YMMRegSet;
if (reg_num >= k_first_mpxr_i386 && reg_num <= k_last_mpxr_i386)
- return llvm::None; // MPXR
+ return std::nullopt; // MPXR
if (reg_num >= k_first_mpxc_i386 && reg_num <= k_last_mpxc_i386)
- return llvm::None; // MPXC
+ return std::nullopt; // MPXC
if (reg_num >= k_first_dbr_i386 && reg_num <= k_last_dbr_i386)
return DBRegSet; // DBR
break;
@@ -325,9 +325,9 @@ NativeRegisterContextFreeBSD_x86_64::GetSetForNativeRegNum(
if (reg_num >= k_first_avx_x86_64 && reg_num <= k_last_avx_x86_64)
return YMMRegSet;
if (reg_num >= k_first_mpxr_x86_64 && reg_num <= k_last_mpxr_x86_64)
- return llvm::None; // MPXR
+ return std::nullopt; // MPXR
if (reg_num >= k_first_mpxc_x86_64 && reg_num <= k_last_mpxc_x86_64)
- return llvm::None; // MPXC
+ return std::nullopt; // MPXC
if (reg_num >= k_first_dbr_x86_64 && reg_num <= k_last_dbr_x86_64)
return DBRegSet; // DBR
break;
@@ -633,7 +633,7 @@ llvm::Optional<NativeRegisterContextFreeBSD_x86_64::YMMSplitPtr>
NativeRegisterContextFreeBSD_x86_64::GetYMMSplitReg(uint32_t reg) {
uint32_t offset = m_xsave_offsets[YMMRegSet];
if (offset == LLDB_INVALID_XSAVE_OFFSET)
- return llvm::None;
+ return std::nullopt;
uint32_t reg_index;
switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) {
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
index a63b437befc9a..0d54b21dcc123 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp
@@ -189,7 +189,7 @@ size_t CommunicationKDP::WaitForPacketWithTimeoutMicroSecondsNoLock(
lldb::ConnectionStatus status = eConnectionStatusNoConnection;
size_t bytes_read = Read(buffer, sizeof(buffer),
timeout_usec == UINT32_MAX
- ? Timeout<std::micro>(llvm::None)
+ ? Timeout<std::micro>(std::nullopt)
: std::chrono::microseconds(timeout_usec),
status, &error);
diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
index 88971e8336a17..8839a99d79510 100644
--- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
+++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
@@ -770,7 +770,7 @@ void *ProcessKDP::AsyncThread() {
"ProcessKDP::AsyncThread (pid = %" PRIu64
") listener.WaitForEvent (NULL, event_sp)...",
pid);
- if (listener_sp->GetEvent(event_sp, llvm::None)) {
+ if (listener_sp->GetEvent(event_sp, std::nullopt)) {
uint32_t event_type = event_sp->GetType();
LLDB_LOGF(log,
"ProcessKDP::AsyncThread (pid = %" PRIu64
diff --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
index 5a910b5a6ec9a..52b30440789fc 100644
--- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
+++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp
@@ -318,9 +318,9 @@ NativeRegisterContextNetBSD_x86_64::GetSetForNativeRegNum(
if (reg_num >= k_first_avx_i386 && reg_num <= k_last_avx_i386)
return YMMRegSet;
if (reg_num >= k_first_mpxr_i386 && reg_num <= k_last_mpxr_i386)
- return llvm::None; // MPXR
+ return std::nullopt; // MPXR
if (reg_num >= k_first_mpxc_i386 && reg_num <= k_last_mpxc_i386)
- return llvm::None; // MPXC
+ return std::nullopt; // MPXC
if (reg_num >= k_first_dbr_i386 && reg_num <= k_last_dbr_i386)
return DBRegSet; // DBR
break;
@@ -332,9 +332,9 @@ NativeRegisterContextNetBSD_x86_64::GetSetForNativeRegNum(
if (reg_num >= k_first_avx_x86_64 && reg_num <= k_last_avx_x86_64)
return YMMRegSet;
if (reg_num >= k_first_mpxr_x86_64 && reg_num <= k_last_mpxr_x86_64)
- return llvm::None; // MPXR
+ return std::nullopt; // MPXR
if (reg_num >= k_first_mpxc_x86_64 && reg_num <= k_last_mpxc_x86_64)
- return llvm::None; // MPXC
+ return std::nullopt; // MPXC
if (reg_num >= k_first_dbr_x86_64 && reg_num <= k_last_dbr_x86_64)
return DBRegSet; // DBR
break;
@@ -623,7 +623,7 @@ llvm::Optional<NativeRegisterContextNetBSD_x86_64::YMMSplitPtr>
NativeRegisterContextNetBSD_x86_64::GetYMMSplitReg(uint32_t reg) {
auto xst = reinterpret_cast<xstate *>(m_xstate.data());
if (!(xst->xs_rfbm & XCR0_SSE) || !(xst->xs_rfbm & XCR0_YMM_Hi128))
- return llvm::None;
+ return std::nullopt;
uint32_t reg_index;
switch (GetRegisterInfoInterface().GetTargetArchitecture().GetMachine()) {
diff --git a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
index de4a23d4d5059..c0edf1528d2c6 100644
--- a/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
+++ b/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
@@ -590,7 +590,7 @@ StopInfoMachException::MachException::ExceptionCode(const char *name) {
#ifdef EXC_CORPSE_NOTIFY
.Case("EXC_CORPSE_NOTIFY", EXC_CORPSE_NOTIFY)
#endif
- .Default(llvm::None);
+ .Default(std::nullopt);
}
#endif
diff --git a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
index eddda6efa2538..77649e7194af0 100644
--- a/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/DebuggerThread.cpp
@@ -417,29 +417,29 @@ static llvm::Optional<std::string> GetFileNameFromHandleFallback(HANDLE hFile) {
DWORD dwFileSizeHi = 0;
DWORD dwFileSizeLo = ::GetFileSize(hFile, &dwFileSizeHi);
if (dwFileSizeLo == 0 && dwFileSizeHi == 0)
- return llvm::None;
+ return std::nullopt;
AutoHandle filemap(
::CreateFileMappingW(hFile, nullptr, PAGE_READONLY, 0, 1, NULL), nullptr);
if (!filemap.IsValid())
- return llvm::None;
+ return std::nullopt;
auto view_deleter = [](void *pMem) { ::UnmapViewOfFile(pMem); };
std::unique_ptr<void, decltype(view_deleter)> pMem(
::MapViewOfFile(filemap.get(), FILE_MAP_READ, 0, 0, 1), view_deleter);
if (!pMem)
- return llvm::None;
+ return std::nullopt;
std::array<wchar_t, MAX_PATH + 1> mapped_filename;
if (!::GetMappedFileNameW(::GetCurrentProcess(), pMem.get(),
mapped_filename.data(), mapped_filename.size()))
- return llvm::None;
+ return std::nullopt;
// A series of null-terminated strings, plus an additional null character
std::array<wchar_t, 512> drive_strings;
drive_strings[0] = L'\0';
if (!::GetLogicalDriveStringsW(drive_strings.size(), drive_strings.data()))
- return llvm::None;
+ return std::nullopt;
std::array<wchar_t, 3> drive = {L"_:"};
for (const wchar_t *it = drive_strings.data(); *it != L'\0';
@@ -464,7 +464,7 @@ static llvm::Optional<std::string> GetFileNameFromHandleFallback(HANDLE hFile) {
}
}
}
- return llvm::None;
+ return std::nullopt;
}
DWORD
diff --git a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
index f1b0b4bd871a7..24d1cece6baa8 100644
--- a/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/CommandObjectTraceStartIntelPT.cpp
@@ -173,7 +173,7 @@ bool CommandObjectProcessTraceStartIntelPT::DoExecute(
Optional<uint64_t>
ParsingUtils::ParseUserFriendlySizeExpression(llvm::StringRef size_expression) {
if (size_expression.empty()) {
- return llvm::None;
+ return std::nullopt;
}
const uint64_t kBytesMultiplier = 1;
const uint64_t kKibiBytesMultiplier = 1024;
@@ -187,7 +187,7 @@ ParsingUtils::ParseUserFriendlySizeExpression(llvm::StringRef size_expression) {
const auto non_digit_index = size_expression.find_first_not_of("0123456789");
if (non_digit_index == 0) { // expression starts from from non-digit char.
- return llvm::None;
+ return std::nullopt;
}
const llvm::StringRef number_part =
@@ -196,7 +196,7 @@ ParsingUtils::ParseUserFriendlySizeExpression(llvm::StringRef size_expression) {
: size_expression.substr(0, non_digit_index);
uint64_t parsed_number;
if (number_part.getAsInteger(10, parsed_number)) {
- return llvm::None;
+ return std::nullopt;
}
if (non_digit_index != llvm::StringRef::npos) { // if expression has units.
@@ -204,7 +204,7 @@ ParsingUtils::ParseUserFriendlySizeExpression(llvm::StringRef size_expression) {
auto it = multipliers.find(multiplier);
if (it == multipliers.end())
- return llvm::None;
+ return std::nullopt;
return parsed_number * it->second;
} else {
diff --git a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
index d850217a789a4..740114e2f0620 100644
--- a/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
+++ b/lldb/source/Plugins/Trace/intel-pt/DecodedThread.h
@@ -296,7 +296,7 @@ class DecodedThread : public std::enable_shared_from_this<DecodedThread> {
std::map<uint64_t, TSCRange> m_tscs;
/// This is the chronologically last TSC that has been added.
llvm::Optional<std::map<uint64_t, TSCRange>::iterator> m_last_tsc =
- llvm::None;
+ std::nullopt;
/// This map contains the non-interpolated nanoseconds timestamps of the
/// decoded trace items. It maps `item index -> nanoseconds`, where `item
/// index` is the first index at which the mapped nanoseconds first appears.
@@ -304,14 +304,14 @@ class DecodedThread : public std::enable_shared_from_this<DecodedThread> {
/// them as ranges.
std::map<uint64_t, NanosecondsRange> m_nanoseconds;
llvm::Optional<std::map<uint64_t, NanosecondsRange>::iterator>
- m_last_nanoseconds = llvm::None;
+ m_last_nanoseconds = std::nullopt;
// The cpu information is stored as a map. It maps `item index -> CPU`.
// A CPU is associated with the next instructions that follow until the next
// cpu is seen.
std::map<uint64_t, lldb::cpu_id_t> m_cpus;
/// This is the chronologically last CPU ID.
- llvm::Optional<uint64_t> m_last_cpu = llvm::None;
+ llvm::Optional<uint64_t> m_last_cpu = std::nullopt;
// The PSB offsets are stored as a map. It maps `item index -> psb offset`.
llvm::DenseMap<uint64_t, lldb::addr_t> m_psb_offsets;
diff --git a/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp b/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp
index b85c4f3bacf3d..c636847714efd 100644
--- a/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp
+++ b/lldb/source/Plugins/Trace/intel-pt/LibiptDecoder.cpp
@@ -570,7 +570,7 @@ Error lldb_private::trace_intel_pt::DecodeSingleTraceForThread(
trace_intel_pt, block, buffer.slice(block.psb_offset, block.size),
*decoded_thread.GetThread()->GetProcess(),
i + 1 < blocks->size() ? blocks->at(i + 1).starting_ip : None,
- decoded_thread, llvm::None);
+ decoded_thread, std::nullopt);
if (!decoder)
return decoder.takeError();
diff --git a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h
index 8418065ba955b..3ca23093870c5 100644
--- a/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h
+++ b/lldb/source/Plugins/Trace/intel-pt/TraceIntelPTConstants.h
@@ -19,7 +19,7 @@ namespace trace_intel_pt {
const size_t kDefaultIptTraceSize = 4 * 1024; // 4KB
const size_t kDefaultProcessBufferSizeLimit = 5 * 1024 * 1024; // 500MB
const bool kDefaultEnableTscValue = false;
-const llvm::Optional<size_t> kDefaultPsbPeriod = llvm::None;
+const llvm::Optional<size_t> kDefaultPsbPeriod = std::nullopt;
const bool kDefaultPerCpuTracing = false;
const bool kDefaultDisableCgroupFiltering = false;
diff --git a/lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp b/lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
index a99324db1da27..a5e0aad08a847 100644
--- a/lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
+++ b/lldb/source/Plugins/TraceExporter/common/TraceHTR.cpp
@@ -144,9 +144,9 @@ TraceHTR::TraceHTR(Thread &thread, TraceCursor &cursor)
pc_addr.CalculateSymbolContext(&sc))
return sc.GetFunctionName()
? llvm::Optional<ConstString>(sc.GetFunctionName())
- : llvm::None;
+ : std::nullopt;
else
- return llvm::None;
+ return std::nullopt;
};
while (cursor.HasValue()) { if (cursor.IsError()) {
@@ -177,7 +177,7 @@ TraceHTR::TraceHTR(Thread &thread, TraceCursor &cursor)
// Next instruction is not known - pass None to indicate the name
// of the function being called is not known
m_instruction_layer_up->AddCallInstructionMetadata(
- current_instruction_load_address, llvm::None);
+ current_instruction_load_address, std::nullopt);
}
}
}
diff --git a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
index 7957c83044c1b..2c49b34b34fe3 100644
--- a/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
+++ b/lldb/unittests/SymbolFile/PDB/SymbolFilePDBTests.cpp
@@ -216,7 +216,7 @@ TEST_F(SymbolFilePDBTests, TestLookupOfHeaderFileWithInlines) {
FileSpec alt_cpp_spec("test-pdb-alt.cpp");
for (const auto &hspec : header_specs) {
SymbolContextList sc_list;
- SourceLocationSpec location_spec(hspec, /*line=*/0, /*column=*/llvm::None,
+ SourceLocationSpec location_spec(hspec, /*line=*/0, /*column=*/std::nullopt,
/*check_inlines=*/true);
uint32_t result_count = symfile->ResolveSymbolContext(
location_spec, lldb::eSymbolContextCompUnit, sc_list);
@@ -270,7 +270,7 @@ TEST_F(SymbolFilePDBTests, TestLineTablesMatchAll) {
lldb::eSymbolContextCompUnit | lldb::eSymbolContextLineEntry;
SourceLocationSpec location_spec(
- source_file, /*line=*/0, /*column=*/llvm::None, /*check_inlines=*/true);
+ source_file, /*line=*/0, /*column=*/std::nullopt, /*check_inlines=*/true);
uint32_t count = symfile->ResolveSymbolContext(location_spec, scope, sc_list);
EXPECT_EQ(1u, count);
SymbolContext sc;
@@ -321,7 +321,7 @@ TEST_F(SymbolFilePDBTests, TestLineTablesMatchSpecific) {
// First test with line 7, and verify that only line 7 entries are added.
SourceLocationSpec location_spec(
- source_file, /*line=*/7, /*column=*/llvm::None, /*check_inlines=*/true);
+ source_file, /*line=*/7, /*column=*/std::nullopt, /*check_inlines=*/true);
uint32_t count = symfile->ResolveSymbolContext(location_spec, scope, sc_list);
EXPECT_EQ(1u, count);
SymbolContext sc;
@@ -339,7 +339,7 @@ TEST_F(SymbolFilePDBTests, TestLineTablesMatchSpecific) {
sc_list.Clear();
// Then test with line 9, and verify that only line 9 entries are added.
location_spec = SourceLocationSpec(
- source_file, /*line=*/9, /*column=*/llvm::None, /*check_inlines=*/true);
+ source_file, /*line=*/9, /*column=*/std::nullopt, /*check_inlines=*/true);
count = symfile->ResolveSymbolContext(location_spec, scope, sc_list);
EXPECT_EQ(1u, count);
EXPECT_TRUE(sc_list.GetContextAtIndex(0, sc));
More information about the lldb-commits
mailing list