[Lldb-commits] [PATCH] D100965: [lldb] Refactor argument group by SourceLocationSpec (NFCI)

Jonas Devlieghere via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Apr 27 18:28:49 PDT 2021


JDevlieghere requested changes to this revision.
JDevlieghere added inline comments.
This revision now requires changes to proceed.


================
Comment at: lldb/source/Breakpoint/BreakpointResolverFileLine.cpp:239
+  const uint32_t line = m_location_spec.GetLine();
+  auto optional_column = m_location_spec.GetColumn();
+  const uint16_t column =
----------------



================
Comment at: lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp:116
+    if (!location_spec) {
+      llvm::errs() << "Invalid SourceLocationSpec.\n";
+      return eCallbackReturnContinue;
----------------
We can't write straight to stderr. We should either have this return an `Expected<Searcher::CallbackReturn>` or deal with the error in some other way. 


================
Comment at: lldb/source/Core/Module.cpp:609
+    if (!location_spec) {
+      llvm::errs() << llvm::toString(location_spec.takeError()) << "\n";
+      return 0;
----------------
Same here


================
Comment at: lldb/source/Core/Module.cpp:940
+  if (!location_spec) {
+    llvm::errs() << llvm::toString(location_spec.takeError()) << "\n";
+    return;
----------------
and here


================
Comment at: lldb/source/Symbol/CompileUnit.cpp:234
+  if (!location_spec) {
+    llvm::errs() << llvm::toString(location_spec.takeError()) << "\n";
+    return UINT32_MAX;
----------------
and here


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100965/new/

https://reviews.llvm.org/D100965



More information about the lldb-commits mailing list