[Lldb-commits] [PATCH] D82396: [lldb/ScriptInterpreter] Extract IO redirection logic and move it out of ScriptInterpreterPython (NFC)

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 24 03:44:57 PDT 2020


labath added a comment.

Sounds like a good idea, just the error handling needs to be done carefully.



================
Comment at: lldb/source/Interpreter/ScriptInterpreter.cpp:171
+  if (!nullin) {
+    error = nullin.takeError();
+    return;
----------------
I'm pretty sure this will trigger an assertion about overwriting an unchecked error. One way to handle this would be to wrap the error in an `ErrorAsOutParameter` object, but I think it's better to replace the constructor with a static factory function returning an `Expected<unique_ptr>`.


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

https://reviews.llvm.org/D82396





More information about the lldb-commits mailing list