================
@@ -784,14 +784,12 @@ class CommandObjectSourceList : public 
CommandObjectParsed {
 
       if (sc.block == nullptr) {
         // Not an inlined function
-        sc.function->GetStartLineSourceInfo(start_file, start_line);
-        if (start_line == 0) {
-          result.AppendErrorWithFormat("Could not find line information for "
-                                       "start of function: \"%s\".\n",
-                                       source_info.function.GetCString());
-          return 0;
-        }
-        sc.function->GetEndLineSourceInfo(end_file, end_line);
+        auto expected_info = sc.function->GetSourceInfo();
+        if (!expected_info)
+          result.AppendError(llvm::toString(expected_info.takeError()));
----------------
JDevlieghere wrote:

Was this supposed to retain the `return 0;`? Now you're dereferencing 
`expected_info` even if it contains an error. 

https://github.com/llvm/llvm-project/pull/126526
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to