[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 3 09:56:48 PDT 2024


================
@@ -33,16 +33,16 @@ class RemoteAwarePlatformTester : public RemoteAwarePlatform {
   MOCK_METHOD0(CalculateTrapHandlerSymbolNames, void());
 
   MOCK_METHOD2(ResolveExecutable,
-               std::pair<Status, ModuleSP>(const ModuleSpec &,
-                                           const FileSpecList *));
+               std::pair<bool, ModuleSP>(const ModuleSpec &,
+                                         const FileSpecList *));
   Status
   ResolveExecutable(const ModuleSpec &module_spec,
                     lldb::ModuleSP &exe_module_sp,
                     const FileSpecList *module_search_paths_ptr) /*override*/
   { // NOLINT(modernize-use-override)
     auto pair = ResolveExecutable(module_spec, module_search_paths_ptr);
     exe_module_sp = pair.second;
-    return pair.first;
+    return pair.first ? Status() : Status::FromErrorString("error");
----------------
adrian-prantl wrote:

That doesn't work with the type inference.

https://github.com/llvm/llvm-project/pull/106774


More information about the lldb-commits mailing list