[Lldb-commits] [PATCH] D68737: SBFile::GetFile: convert SBFile back into python native files.

Lawrence D'Anna via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 10 19:43:54 PDT 2019


lawrence_danna added a comment.

I split off the OpenOptions enum stuff into a separate patch, because changing it from uint32_t to the enum is kind of viral



================
Comment at: lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h:674-682
+  PythonFile(File &file, const char *mode = nullptr) {
+    auto f = FromFile(file, mode);
+    if (f)
+      *this = std::move(f.get());
+    else {
+      Reset();
+      llvm::consumeError(f.takeError());
----------------
labath wrote:
> It looks like there's just one caller of this constructor (the "out" typemap for FILE*). Can we just inline this stuff there and delete this constructor?
It's also called in some parts of ScriptInterpreterPython that are broken for other reasons, and are getting fixed later in my patch queue.   I'll just put a fixme here and delete it when all the other code that uses it also gets deleted, ok?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68737





More information about the lldb-commits mailing list