[Lldb-commits] [PATCH] D83512: [lldb/Module] Allow for the creation of memory-only modules
Frederic Riss via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 14 08:49:30 PDT 2020
friss marked an inline comment as done.
friss added inline comments.
================
Comment at: lldb/unittests/TestingSupport/TestUtilities.h:39-41
+ TestFile(TestFile &&RHS) : Buffer(std::move(RHS.Buffer)) {
+ RHS.Buffer = llvm::None;
}
----------------
labath wrote:
> Since we don't need to do cleanup anymore, we can make `Buffer` a regular `std::string` and rely on the compiler-generated move and copy operations. In fact, we may not even need the `TestFile` class at all as the yaml functions could return a ModuleSpec directly.
I kept the TestFile class for now, as it owns the file memory buffer. I could change the tests to to a DataBufferHeap which would copy the memory, but be able to live on its own. Tell me if you feel strongly about this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83512/new/
https://reviews.llvm.org/D83512
More information about the lldb-commits
mailing list