Fix Clang-tidy modernize-use-nullptr warnings in some files in source/Core; other minor fixes.

llvm-svn: 263312
This commit is contained in:
Eugene Zelenko 2016-03-12 00:31:13 +00:00
parent 4b4e75886c
commit 0e28a19683
5 changed files with 165 additions and 428 deletions

View File

@ -94,7 +94,6 @@ public:
class SearchFilter
{
public:
//------------------------------------------------------------------
/// The basic constructor takes a Target, which gives the space to search.
///
@ -108,7 +107,7 @@ public:
virtual
~SearchFilter ();
const SearchFilter&
SearchFilter&
operator=(const SearchFilter& rhs);
//------------------------------------------------------------------
@ -294,7 +293,6 @@ class SearchFilterByModule :
public SearchFilter
{
public:
//------------------------------------------------------------------
/// The basic constructor takes a Target, which gives the space to search,
/// and the module to restrict the search to.
@ -312,7 +310,7 @@ public:
~SearchFilterByModule() override;
const SearchFilterByModule&
SearchFilterByModule&
operator=(const SearchFilterByModule& rhs);
bool
@ -354,7 +352,6 @@ class SearchFilterByModuleList :
public SearchFilter
{
public:
//------------------------------------------------------------------
/// The basic constructor takes a Target, which gives the space to search,
/// and the module list to restrict the search to.
@ -372,7 +369,7 @@ public:
~SearchFilterByModuleList() override;
const SearchFilterByModuleList&
SearchFilterByModuleList&
operator=(const SearchFilterByModuleList& rhs);
bool
@ -414,7 +411,6 @@ class SearchFilterByModuleListAndCU :
public SearchFilterByModuleList
{
public:
//------------------------------------------------------------------
/// The basic constructor takes a Target, which gives the space to search,
/// and the module list to restrict the search to.
@ -433,7 +429,7 @@ public:
~SearchFilterByModuleListAndCU() override;
const SearchFilterByModuleListAndCU&
SearchFilterByModuleListAndCU&
operator=(const SearchFilterByModuleListAndCU& rhs);
bool

View File

@ -1,4 +1,4 @@
//===-- RegisterValue.cpp ----------------------------------------*- C++ -*-===//
//===-- RegisterValue.cpp ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -11,7 +11,11 @@
// C Includes
// C++ Includes
#include <vector>
// Other libraries and framework includes
#include "llvm/ADT/StringRef.h"
// Project includes
#include "lldb/Core/DataExtractor.h"
#include "lldb/Core/Error.h"
@ -24,7 +28,6 @@
using namespace lldb;
using namespace lldb_private;
bool
RegisterValue::Dump (Stream *s,
const RegisterInfo *reg_info,
@ -98,14 +101,12 @@ RegisterValue::Dump (Stream *s,
return false;
}
bool
RegisterValue::GetData (DataExtractor &data) const
{
return data.SetData(GetBytes(), GetByteSize(), GetByteOrder()) > 0;
}
uint32_t
RegisterValue::GetAsMemoryData (const RegisterInfo *reg_info,
void *dst,
@ -113,7 +114,7 @@ RegisterValue::GetAsMemoryData (const RegisterInfo *reg_info,
lldb::ByteOrder dst_byte_order,
Error &error) const
{
if (reg_info == NULL)
if (reg_info == nullptr)
{
error.SetErrorString ("invalid register info argument.");
return 0;
@ -163,7 +164,7 @@ RegisterValue::SetFromMemoryData (const RegisterInfo *reg_info,
lldb::ByteOrder src_byte_order,
Error &error)
{
if (reg_info == NULL)
if (reg_info == nullptr)
{
error.SetErrorString ("invalid register info argument.");
return 0;
@ -405,8 +406,6 @@ RegisterValue::SetValueFromData (const RegisterInfo *reg_info, DataExtractor &sr
return error;
}
#include "llvm/ADT/StringRef.h"
#include <vector>
static inline void StripSpaces(llvm::StringRef &Str)
{
while (!Str.empty() && isspace(Str[0]))
@ -414,16 +413,19 @@ static inline void StripSpaces(llvm::StringRef &Str)
while (!Str.empty() && isspace(Str.back()))
Str = Str.substr(0, Str.size()-1);
}
static inline void LStrip(llvm::StringRef &Str, char c)
{
if (!Str.empty() && Str.front() == c)
Str = Str.substr(1);
}
static inline void RStrip(llvm::StringRef &Str, char c)
{
if (!Str.empty() && Str.back() == c)
Str = Str.substr(0, Str.size()-1);
}
// Helper function for RegisterValue::SetValueFromCString()
static bool
ParseVectorEncoding(const RegisterInfo *reg_info, const char *vector_str, const uint32_t byte_size, RegisterValue *reg_value)
@ -457,17 +459,18 @@ ParseVectorEncoding(const RegisterInfo *reg_info, const char *vector_str, const
reg_value->SetBytes(&(bytes.front()), byte_size, eByteOrderLittle);
return true;
}
Error
RegisterValue::SetValueFromCString (const RegisterInfo *reg_info, const char *value_str)
{
Error error;
if (reg_info == NULL)
if (reg_info == nullptr)
{
error.SetErrorString ("Invalid register info argument.");
return error;
}
if (value_str == NULL || value_str[0] == '\0')
if (value_str == nullptr || value_str[0] == '\0')
{
error.SetErrorString ("Invalid c-string value string.");
return error;
@ -574,7 +577,6 @@ RegisterValue::SetValueFromCString (const RegisterInfo *reg_info, const char *va
return error;
}
bool
RegisterValue::SignExtend (uint32_t sign_bitpos)
{
@ -742,9 +744,7 @@ RegisterValue::GetAsUInt128 (const llvm::APInt& fail_value, bool *success_ptr) c
case 4:
case 8:
case 16:
{
return llvm::APInt(BITWIDTH_INT128, NUM_OF_WORDS_INT128, ((const type128 *)buffer.bytes)->x);
}
}
}
break;
@ -837,7 +837,7 @@ RegisterValue::GetBytes () const
case eTypeLongDouble: return m_scalar.GetBytes();
case eTypeBytes: return buffer.bytes;
}
return NULL;
return nullptr;
}
void *
@ -856,7 +856,7 @@ RegisterValue::GetBytes ()
case eTypeLongDouble: return m_scalar.GetBytes();
case eTypeBytes: return buffer.bytes;
}
return NULL;
return nullptr;
}
uint32_t
@ -878,7 +878,6 @@ RegisterValue::GetByteSize () const
return 0;
}
bool
RegisterValue::SetUInt (uint64_t uint, uint32_t byte_size)
{
@ -933,7 +932,6 @@ RegisterValue::SetBytes (const void *bytes, size_t length, lldb::ByteOrder byte_
}
}
bool
RegisterValue::operator == (const RegisterValue &rhs) const
{
@ -1044,7 +1042,6 @@ RegisterValue::ClearBit (uint32_t bit)
return false;
}
bool
RegisterValue::SetBit (uint32_t bit)
{
@ -1089,4 +1086,3 @@ RegisterValue::SetBit (uint32_t bit)
}
return false;
}

View File

@ -7,11 +7,17 @@
//
//===----------------------------------------------------------------------===//
#include <string.h>
#include "lldb/Core/RegularExpression.h"
#include "llvm/ADT/StringRef.h"
#include "lldb/Core/Error.h"
// C Includes
// C++ Includes
#include <cstring>
// Other libraries and framework includes
#include "llvm/ADT/StringRef.h"
// Project includes
#include "lldb/Core/Error.h"
//----------------------------------------------------------------------
// Enable enhanced mode if it is available. This allows for things like
@ -26,15 +32,12 @@
using namespace lldb_private;
//----------------------------------------------------------------------
// Default constructor
//----------------------------------------------------------------------
RegularExpression::RegularExpression() :
m_re(),
m_comp_err (1),
m_preg()
{
memset(&m_preg,0,sizeof(m_preg));
memset(&m_preg, 0, sizeof(m_preg));
}
//----------------------------------------------------------------------
@ -63,6 +66,7 @@ RegularExpression::operator= (const RegularExpression &rhs)
Compile (rhs.GetText());
return *this;
}
//----------------------------------------------------------------------
// Destructor
//
@ -117,7 +121,7 @@ bool
RegularExpression::Execute (const char* s, Match *match) const
{
int err = 1;
if (s != NULL && m_comp_err == 0)
if (s != nullptr && m_comp_err == 0)
{
if (match)
{
@ -129,11 +133,11 @@ RegularExpression::Execute (const char* s, Match *match) const
}
else
{
err = ::regexec (&m_preg,
s,
0,
NULL,
0);
err = ::regexec(&m_preg,
s,
0,
nullptr,
0);
}
}
@ -202,7 +206,6 @@ RegularExpression::Match::GetMatchSpanningIndices (const char* s, uint32_t idx1,
return false;
}
//----------------------------------------------------------------------
// Returns true if the regular expression compiled and is ready
// for execution.
@ -220,9 +223,7 @@ RegularExpression::IsValid () const
const char*
RegularExpression::GetText () const
{
if (m_re.empty())
return NULL;
return m_re.c_str();
return (m_re.empty() ? nullptr : m_re.c_str());
}
//----------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

View File

@ -9,9 +9,10 @@
// C Includes
// C++ Includes
#include <limits>
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Core/SearchFilter.h"
#include "lldb/Core/Module.h"
@ -21,56 +22,26 @@
using namespace lldb;
using namespace lldb_private;
//----------------------------------------------------------------------
// SearchFilter constructor
//----------------------------------------------------------------------
Searcher::Searcher ()
{
Searcher::Searcher() = default;
}
Searcher::~Searcher ()
{
}
Searcher::~Searcher() = default;
void
Searcher::GetDescription (Stream *s)
{
}
//----------------------------------------------------------------------
// SearchFilter constructor
//----------------------------------------------------------------------
SearchFilter::SearchFilter(const TargetSP &target_sp) :
m_target_sp (target_sp)
{
}
//----------------------------------------------------------------------
// SearchFilter copy constructor
//----------------------------------------------------------------------
SearchFilter::SearchFilter(const SearchFilter& rhs) :
m_target_sp (rhs.m_target_sp)
{
}
SearchFilter::SearchFilter(const SearchFilter& rhs) = default;
//----------------------------------------------------------------------
// SearchFilter assignment operator
//----------------------------------------------------------------------
const SearchFilter&
SearchFilter::operator=(const SearchFilter& rhs)
{
m_target_sp = rhs.m_target_sp;
return *this;
}
SearchFilter&
SearchFilter::operator=(const SearchFilter& rhs) = default;
//----------------------------------------------------------------------
// Destructor
//----------------------------------------------------------------------
SearchFilter::~SearchFilter()
{
}
SearchFilter::~SearchFilter() = default;
bool
SearchFilter::ModulePasses (const FileSpec &spec)
@ -116,7 +87,6 @@ SearchFilter::GetDescription (Stream *s)
void
SearchFilter::Dump (Stream *s) const
{
}
lldb::SearchFilterSP
@ -143,7 +113,7 @@ SearchFilter::Search (Searcher &searcher)
empty_sc.target_sp = m_target_sp;
if (searcher.GetDepth() == Searcher::eDepthTarget)
searcher.SearchCallback (*this, empty_sc, NULL, false);
searcher.SearchCallback(*this, empty_sc, nullptr, false);
else
DoModuleIteration(empty_sc, searcher);
}
@ -158,7 +128,7 @@ SearchFilter::SearchInModuleList (Searcher &searcher, ModuleList &modules)
empty_sc.target_sp = m_target_sp;
if (searcher.GetDepth() == Searcher::eDepthTarget)
searcher.SearchCallback (*this, empty_sc, NULL, false);
searcher.SearchCallback(*this, empty_sc, nullptr, false);
else
{
Mutex::Locker modules_locker(modules.GetMutex());
@ -176,7 +146,6 @@ SearchFilter::SearchInModuleList (Searcher &searcher, ModuleList &modules)
}
}
Searcher::CallbackReturn
SearchFilter::DoModuleIteration (const lldb::ModuleSP& module_sp, Searcher &searcher)
{
@ -194,7 +163,7 @@ SearchFilter::DoModuleIteration (const SymbolContext &context, Searcher &searche
if (searcher.GetDepth () == Searcher::eDepthModule)
{
SymbolContext matchingContext(context.module_sp.get());
searcher.SearchCallback (*this, matchingContext, NULL, false);
searcher.SearchCallback(*this, matchingContext, nullptr, false);
}
else
{
@ -219,7 +188,7 @@ SearchFilter::DoModuleIteration (const SymbolContext &context, Searcher &searche
{
SymbolContext matchingContext(m_target_sp, module_sp);
Searcher::CallbackReturn shouldContinue = searcher.SearchCallback (*this, matchingContext, NULL, false);
Searcher::CallbackReturn shouldContinue = searcher.SearchCallback(*this, matchingContext, nullptr, false);
if (shouldContinue == Searcher::eCallbackReturnStop
|| shouldContinue == Searcher::eCallbackReturnPop)
return shouldContinue;
@ -242,7 +211,7 @@ Searcher::CallbackReturn
SearchFilter::DoCUIteration (const ModuleSP &module_sp, const SymbolContext &context, Searcher &searcher)
{
Searcher::CallbackReturn shouldContinue;
if (context.comp_unit == NULL)
if (context.comp_unit == nullptr)
{
const size_t num_comp_units = module_sp->GetNumCompileUnits();
for (size_t i = 0; i < num_comp_units; i++)
@ -257,7 +226,7 @@ SearchFilter::DoCUIteration (const ModuleSP &module_sp, const SymbolContext &con
{
SymbolContext matchingContext(m_target_sp, module_sp, cu_sp.get());
shouldContinue = searcher.SearchCallback (*this, matchingContext, NULL, false);
shouldContinue = searcher.SearchCallback(*this, matchingContext, nullptr, false);
if (shouldContinue == Searcher::eCallbackReturnPop)
return Searcher::eCallbackReturnContinue;
@ -276,7 +245,7 @@ SearchFilter::DoCUIteration (const ModuleSP &module_sp, const SymbolContext &con
if (CompUnitPasses(*context.comp_unit))
{
SymbolContext matchingContext (m_target_sp, module_sp, context.comp_unit);
return searcher.SearchCallback (*this, matchingContext, NULL, false);
return searcher.SearchCallback(*this, matchingContext, nullptr, false);
}
}
return Searcher::eCallbackReturnContinue;
@ -297,10 +266,7 @@ SearchFilter::DoFunctionIteration (Function *function, const SymbolContext &cont
bool
SearchFilterForUnconstrainedSearches::ModulePasses (const FileSpec &module_spec)
{
if (m_target_sp->ModuleIsExcludedForUnconstrainedSearches (module_spec))
return false;
else
return true;
return (!m_target_sp->ModuleIsExcludedForUnconstrainedSearches(module_spec));
}
bool
@ -326,30 +292,15 @@ SearchFilterForUnconstrainedSearches::DoCopyForBreakpoint (Breakpoint &breakpoin
// Selects a shared library matching a given file spec
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// SearchFilterByModule constructors
//----------------------------------------------------------------------
SearchFilterByModule::SearchFilterByModule (const lldb::TargetSP &target_sp, const FileSpec &module) :
SearchFilter (target_sp),
m_module_spec (module)
{
}
SearchFilterByModule::SearchFilterByModule(const SearchFilterByModule& rhs) = default;
//----------------------------------------------------------------------
// SearchFilterByModule copy constructor
//----------------------------------------------------------------------
SearchFilterByModule::SearchFilterByModule(const SearchFilterByModule& rhs) :
SearchFilter (rhs),
m_module_spec (rhs.m_module_spec)
{
}
//----------------------------------------------------------------------
// SearchFilterByModule assignment operator
//----------------------------------------------------------------------
const SearchFilterByModule&
SearchFilterByModule&
SearchFilterByModule::operator=(const SearchFilterByModule& rhs)
{
m_target_sp = rhs.m_target_sp;
@ -357,20 +308,12 @@ SearchFilterByModule::operator=(const SearchFilterByModule& rhs)
return *this;
}
//----------------------------------------------------------------------
// Destructor
//----------------------------------------------------------------------
SearchFilterByModule::~SearchFilterByModule()
{
}
SearchFilterByModule::~SearchFilterByModule() = default;
bool
SearchFilterByModule::ModulePasses (const ModuleSP &module_sp)
{
if (module_sp && FileSpec::Equal(module_sp->GetFileSpec(), m_module_spec, false))
return true;
else
return false;
return (module_sp && FileSpec::Equal(module_sp->GetFileSpec(), m_module_spec, false));
}
bool
@ -388,7 +331,6 @@ SearchFilterByModule::AddressPasses (Address &address)
return true;
}
bool
SearchFilterByModule::CompUnitPasses (FileSpec &fileSpec)
{
@ -411,7 +353,7 @@ SearchFilterByModule::Search (Searcher &searcher)
{
SymbolContext empty_sc;
empty_sc.target_sp = m_target_sp;
searcher.SearchCallback (*this, empty_sc, NULL, false);
searcher.SearchCallback(*this, empty_sc, nullptr, false);
}
// If the module file spec is a full path, then we can just find the one
@ -463,7 +405,6 @@ SearchFilterByModule::GetFilterRequiredItems()
void
SearchFilterByModule::Dump (Stream *s) const
{
}
lldb::SearchFilterSP
@ -478,10 +419,6 @@ SearchFilterByModule::DoCopyForBreakpoint (Breakpoint &breakpoint)
// Selects a shared library matching a given file spec
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// SearchFilterByModuleList constructors
//----------------------------------------------------------------------
SearchFilterByModuleList::SearchFilterByModuleList (const lldb::TargetSP &target_sp,
const FileSpecList &module_list) :
SearchFilter (target_sp),
@ -489,20 +426,9 @@ SearchFilterByModuleList::SearchFilterByModuleList (const lldb::TargetSP &target
{
}
SearchFilterByModuleList::SearchFilterByModuleList(const SearchFilterByModuleList& rhs) = default;
//----------------------------------------------------------------------
// SearchFilterByModuleList copy constructor
//----------------------------------------------------------------------
SearchFilterByModuleList::SearchFilterByModuleList(const SearchFilterByModuleList& rhs) :
SearchFilter (rhs),
m_module_spec_list (rhs.m_module_spec_list)
{
}
//----------------------------------------------------------------------
// SearchFilterByModuleList assignment operator
//----------------------------------------------------------------------
const SearchFilterByModuleList&
SearchFilterByModuleList&
SearchFilterByModuleList::operator=(const SearchFilterByModuleList& rhs)
{
m_target_sp = rhs.m_target_sp;
@ -510,12 +436,7 @@ SearchFilterByModuleList::operator=(const SearchFilterByModuleList& rhs)
return *this;
}
//----------------------------------------------------------------------
// Destructor
//----------------------------------------------------------------------
SearchFilterByModuleList::~SearchFilterByModuleList()
{
}
SearchFilterByModuleList::~SearchFilterByModuleList() = default;
bool
SearchFilterByModuleList::ModulePasses (const ModuleSP &module_sp)
@ -523,7 +444,8 @@ SearchFilterByModuleList::ModulePasses (const ModuleSP &module_sp)
if (m_module_spec_list.GetSize() == 0)
return true;
if (module_sp && m_module_spec_list.FindFileIndex(0, module_sp->GetFileSpec(), false) != UINT32_MAX)
if (module_sp &&
m_module_spec_list.FindFileIndex(0, module_sp->GetFileSpec(), false) != std::numeric_limits<uint32_t>::max())
return true;
else
return false;
@ -535,7 +457,7 @@ SearchFilterByModuleList::ModulePasses (const FileSpec &spec)
if (m_module_spec_list.GetSize() == 0)
return true;
if (m_module_spec_list.FindFileIndex(0, spec, true) != UINT32_MAX)
if (m_module_spec_list.FindFileIndex(0, spec, true) != std::numeric_limits<uint32_t>::max())
return true;
else
return false;
@ -548,7 +470,6 @@ SearchFilterByModuleList::AddressPasses (Address &address)
return true;
}
bool
SearchFilterByModuleList::CompUnitPasses (FileSpec &fileSpec)
{
@ -571,7 +492,7 @@ SearchFilterByModuleList::Search (Searcher &searcher)
{
SymbolContext empty_sc;
empty_sc.target_sp = m_target_sp;
searcher.SearchCallback (*this, empty_sc, NULL, false);
searcher.SearchCallback(*this, empty_sc, nullptr, false);
}
// If the module file spec is a full path, then we can just find the one
@ -585,7 +506,7 @@ SearchFilterByModuleList::Search (Searcher &searcher)
for (size_t i = 0; i < num_modules; i++)
{
Module* module = target_modules.GetModulePointerAtIndexUnlocked(i);
if (m_module_spec_list.FindFileIndex(0, module->GetFileSpec(), false) != UINT32_MAX)
if (m_module_spec_list.FindFileIndex(0, module->GetFileSpec(), false) != std::numeric_limits<uint32_t>::max())
{
SymbolContext matchingContext(m_target_sp, module->shared_from_this());
Searcher::CallbackReturn shouldContinue;
@ -645,7 +566,6 @@ SearchFilterByModuleList::GetFilterRequiredItems()
void
SearchFilterByModuleList::Dump (Stream *s) const
{
}
lldb::SearchFilterSP
@ -655,16 +575,11 @@ SearchFilterByModuleList::DoCopyForBreakpoint (Breakpoint &breakpoint)
return ret_sp;
}
//----------------------------------------------------------------------
// SearchFilterByModuleListAndCU:
// Selects a shared library matching a given file spec
//----------------------------------------------------------------------
//----------------------------------------------------------------------
// SearchFilterByModuleListAndCU constructors
//----------------------------------------------------------------------
SearchFilterByModuleListAndCU::SearchFilterByModuleListAndCU (const lldb::TargetSP &target_sp,
const FileSpecList &module_list,
const FileSpecList &cu_list) :
@ -673,20 +588,9 @@ SearchFilterByModuleListAndCU::SearchFilterByModuleListAndCU (const lldb::Target
{
}
SearchFilterByModuleListAndCU::SearchFilterByModuleListAndCU(const SearchFilterByModuleListAndCU& rhs) = default;
//----------------------------------------------------------------------
// SearchFilterByModuleListAndCU copy constructor
//----------------------------------------------------------------------
SearchFilterByModuleListAndCU::SearchFilterByModuleListAndCU(const SearchFilterByModuleListAndCU& rhs) :
SearchFilterByModuleList (rhs),
m_cu_spec_list (rhs.m_cu_spec_list)
{
}
//----------------------------------------------------------------------
// SearchFilterByModuleListAndCU assignment operator
//----------------------------------------------------------------------
const SearchFilterByModuleListAndCU&
SearchFilterByModuleListAndCU&
SearchFilterByModuleListAndCU::operator=(const SearchFilterByModuleListAndCU& rhs)
{
if (&rhs != this)
@ -698,12 +602,7 @@ SearchFilterByModuleListAndCU::operator=(const SearchFilterByModuleListAndCU& rh
return *this;
}
//----------------------------------------------------------------------
// Destructor
//----------------------------------------------------------------------
SearchFilterByModuleListAndCU::~SearchFilterByModuleListAndCU()
{
}
SearchFilterByModuleListAndCU::~SearchFilterByModuleListAndCU() = default;
bool
SearchFilterByModuleListAndCU::AddressPasses (Address &address)
@ -711,17 +610,16 @@ SearchFilterByModuleListAndCU::AddressPasses (Address &address)
return true;
}
bool
SearchFilterByModuleListAndCU::CompUnitPasses (FileSpec &fileSpec)
{
return m_cu_spec_list.FindFileIndex(0, fileSpec, false) != UINT32_MAX;
return m_cu_spec_list.FindFileIndex(0, fileSpec, false) != std::numeric_limits<uint32_t>::max();
}
bool
SearchFilterByModuleListAndCU::CompUnitPasses (CompileUnit &compUnit)
{
bool in_cu_list = m_cu_spec_list.FindFileIndex(0, compUnit, false) != UINT32_MAX;
bool in_cu_list = m_cu_spec_list.FindFileIndex(0, compUnit, false) != std::numeric_limits<uint32_t>::max();
if (in_cu_list)
{
ModuleSP module_sp(compUnit.GetModule());
@ -747,7 +645,7 @@ SearchFilterByModuleListAndCU::Search (Searcher &searcher)
{
SymbolContext empty_sc;
empty_sc.target_sp = m_target_sp;
searcher.SearchCallback (*this, empty_sc, NULL, false);
searcher.SearchCallback(*this, empty_sc, nullptr, false);
}
// If the module file spec is a full path, then we can just find the one
@ -763,7 +661,8 @@ SearchFilterByModuleListAndCU::Search (Searcher &searcher)
for (size_t i = 0; i < num_modules; i++)
{
lldb::ModuleSP module_sp = target_images.GetModuleAtIndexUnlocked(i);
if (no_modules_in_filter || m_module_spec_list.FindFileIndex(0, module_sp->GetFileSpec(), false) != UINT32_MAX)
if (no_modules_in_filter ||
m_module_spec_list.FindFileIndex(0, module_sp->GetFileSpec(), false) != std::numeric_limits<uint32_t>::max())
{
SymbolContext matchingContext(m_target_sp, module_sp);
Searcher::CallbackReturn shouldContinue;
@ -783,7 +682,8 @@ SearchFilterByModuleListAndCU::Search (Searcher &searcher)
matchingContext.comp_unit = cu_sp.get();
if (matchingContext.comp_unit)
{
if (m_cu_spec_list.FindFileIndex(0, *matchingContext.comp_unit, false) != UINT32_MAX)
if (m_cu_spec_list.FindFileIndex(0, *matchingContext.comp_unit, false) !=
std::numeric_limits<uint32_t>::max())
{
shouldContinue = DoCUIteration(module_sp, matchingContext, searcher);
if (shouldContinue == Searcher::eCallbackReturnStop)
@ -844,7 +744,6 @@ SearchFilterByModuleListAndCU::GetFilterRequiredItems()
void
SearchFilterByModuleListAndCU::Dump (Stream *s) const
{
}
lldb::SearchFilterSP
@ -853,4 +752,3 @@ SearchFilterByModuleListAndCU::DoCopyForBreakpoint (Breakpoint &breakpoint)
SearchFilterSP ret_sp(new SearchFilterByModuleListAndCU(*this));
return ret_sp;
}