Skip to content

Commit 71a706b

Browse files
Merge pull request #12 from adrian-prantl/compiler-errors
Fix compiler errors.
2 parents 0a33df7 + eece533 commit 71a706b

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lldb/source/Core/SourceManager.cpp

+10-10
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ static lldb_private::LineEntry FindEntryPoint(Module *exe_module) {
329329
const std::vector<std::pair<ConstString, bool>> &entry_points(
330330
GetEntryPointNames());
331331
for (std::pair<ConstString, bool> entry_point : entry_points) {
332-
#if 0 // llvm.org version
333332
const ConstString entry_point_name = entry_point.first;
334333
const bool skip_prologue = entry_point.second;
335334
SymbolContextList sc_list;
@@ -353,15 +352,6 @@ static lldb_private::LineEntry FindEntryPoint(Module *exe_module) {
353352
}
354353
}
355354
}
356-
#else // FIXME: upstream this!
357-
lldb_private::LineEntry line_entry(FindEntryPoint(executable_ptr));
358-
if (line_entry.IsValid()) {
359-
SetDefaultFileAndLine(line_entry.file, line_entry.line);
360-
file_spec = m_last_file_sp->GetFileSpec();
361-
line = m_last_line;
362-
return true;
363-
}
364-
#endif
365355
}
366356
return LineEntry();
367357
}
@@ -381,6 +371,7 @@ bool SourceManager::GetDefaultFileAndLine(FileSpec &file_spec, uint32_t &line) {
381371
// to set it (for instance when we stop somewhere...)
382372
Module *executable_ptr = target_sp->GetExecutableModulePointer();
383373
if (executable_ptr) {
374+
#if 0 // llvm.org
384375
SymbolContextList sc_list;
385376
ConstString main_name("main");
386377
bool symbols_okay = false; // Force it to be a debug symbol.
@@ -404,6 +395,15 @@ bool SourceManager::GetDefaultFileAndLine(FileSpec &file_spec, uint32_t &line) {
404395
}
405396
}
406397
}
398+
#else // FIXME: upstream this!
399+
lldb_private::LineEntry line_entry(FindEntryPoint(executable_ptr));
400+
if (line_entry.IsValid()) {
401+
SetDefaultFileAndLine(line_entry.file, line_entry.line);
402+
file_spec = m_last_file_sp->GetFileSpec();
403+
line = m_last_line;
404+
return true;
405+
}
406+
#endif
407407
}
408408
}
409409
}

0 commit comments

Comments
 (0)