jankratochvil marked an inline comment as done.
jankratochvil added inline comments.
================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:56
+ return 0;
+ std::shared_ptr<void> m_die_array_size_atomic_set(nullptr,
+ [&](void*){ m_die_array_size_atomic = m_die_array.size(); });
----------------
clayborg wrote:
> Remove the "m_" prefix on this local variable as that indicates it is a
> member variable.
>
> Might be better to use CleanUp utility from "lldb/Utility/CleanUp.h" instead
> of a shared pointer to void? Took me a bit to figure out what this was doing.
> If this is a very accepted C++ way to run a function that is scoped that is
> fine, but it seems a little unclear what this was doing initially.
>
Done, done. I have googled the shared_ptr cleanup for this purpose at [[
https://stackoverflow.com/questions/36644263/is-there-a-c-standard-class-to-set-a-variable-to-a-value-at-scope-exit
| StackOverflow ]]. Updated, thanks.
https://reviews.llvm.org/D40470
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits