[Lldb-commits] [PATCH] D51319: Use a RAII guard to control access to DisassemblerLLVMC.

Vedant Kumar via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 27 16:57:06 PDT 2018


vsk accepted this revision.
vsk added a comment.

Looks great, thanks!



================
Comment at: source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp:176
     bool got_op = false;
-    std::shared_ptr<DisassemblerLLVMC> disasm_sp(GetDisassembler());
-    if (disasm_sp) {
-      const ArchSpec &arch = disasm_sp->GetArchitecture();
+    DisassemblerScope disasm(*this);
+    if (disasm) {
----------------
Were all callers into Decode locking the disasm instance prior to this patch? If not, this is a sweet fix.


https://reviews.llvm.org/D51319





More information about the lldb-commits mailing list