mirror of
https://github.com/intel/llvm.git
synced 2026-01-14 20:10:50 +08:00
Re-land "[lldb] Expose a const iterator for SymbolContextList"
Re-lands 04aa943be8 with modifications
to fix tests.
I originally reverted this because it caused a test to fail on Linux.
The problem was that I inverted a condition on accident.
This commit is contained in:
@@ -192,7 +192,7 @@ void BreakpointResolverFileLine::FilterContexts(SymbolContextList &sc_list) {
|
||||
}
|
||||
|
||||
void BreakpointResolverFileLine::DeduceSourceMapping(
|
||||
SymbolContextList &sc_list) {
|
||||
const SymbolContextList &sc_list) {
|
||||
Target &target = GetBreakpoint()->GetTarget();
|
||||
if (!target.GetAutoSourceMapRelative())
|
||||
return;
|
||||
@@ -223,13 +223,10 @@ void BreakpointResolverFileLine::DeduceSourceMapping(
|
||||
return;
|
||||
|
||||
const bool case_sensitive = request_file.IsCaseSensitive();
|
||||
for (uint32_t i = 0; i < sc_list.GetSize(); ++i) {
|
||||
SymbolContext sc;
|
||||
sc_list.GetContextAtIndex(i, sc);
|
||||
|
||||
for (const SymbolContext &sc : sc_list) {
|
||||
FileSpec sc_file = sc.line_entry.file;
|
||||
|
||||
if (FileSpec::Equal(sc_file, request_file, /*full*/true))
|
||||
if (FileSpec::Equal(sc_file, request_file, /*full*/ true))
|
||||
continue;
|
||||
|
||||
llvm::StringRef sc_file_dir = sc_file.GetDirectory().GetStringRef();
|
||||
|
||||
Reference in New Issue
Block a user