[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-06 Thread Phabricator via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294202: Switch std::call_once to llvm::call_once (authored by kamil). Changed prior to commit: https://reviews.llvm.org/D29288?vs=87153=87252#toc Repository: rL LLVM https://reviews.llvm.org/D29288

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-06 Thread Greg Clayton via Phabricator via lldb-commits
clayborg accepted this revision. clayborg added a comment. This revision is now accepted and ready to land. Thanks for doing the right thing in LLVM first, looks great! Repository: rL LLVM https://reviews.llvm.org/D29288 ___ lldb-commits mailing

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-06 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added inline comments. Comment at: include/lldb/Core/Debugger.h:379 lldb::ListenerSP m_forward_listener_sp; - std::once_flag m_clear_once; + llvm::once_flag m_clear_once; clayborg wrote: > Is there a valid default initializer for the

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-05 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski updated this revision to Diff 87153. krytarowski added a comment. Revamp to new llvm::once_flag Repository: rL LLVM https://reviews.llvm.org/D29288 Files: include/lldb/Core/Debugger.h source/Commands/CommandObjectPlatform.cpp source/Core/Debugger.cpp

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-05 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. https://reviews.llvm.org/D29566 I filed a patch in LLVM. Repository: rL LLVM https://reviews.llvm.org/D29288 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Once someone could explain to me why `SymbolFileDWARF::GetCachedSectionData` cannot be switched mechanically to `llvm::call_once`, I would like to propose this revamped interface to llvm. Repository: rL LLVM https://reviews.llvm.org/D29288

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. Test results for the above patch for LLVM and LLDB with "mechanical" switch to `llvm::call_once`. === Test Result Summary === Test Methods: 1224 Reruns:1 Success: 268 Expected Failure:

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-02-04 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I've tried to build the LLDB code with mechanically * replaced `std::call_once` -> `llvm::call_once` and `std::once_flag` -> `llvm::once_flag`: --- /public/llvm/include/llvm/Support/Threading.h 2017-02-05 00:15:00.769574623 +0100 +++

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29288#660703, @mehdi_amini wrote: > In https://reviews.llvm.org/D29288#660677, @krytarowski wrote: > > > In https://reviews.llvm.org/D29288#660636, @clayborg wrote: > > > > > Be very careful when using this, you can't change member

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. namespace llvm { namespace sys { void MemoryFence(); #ifdef _MSC_VER typedef long cas_flag; #else typedef uint32_t cas_flag; #endif cas_flag CompareAndSwap(volatile cas_flag* ptr, cas_flag new_value,

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. In https://reviews.llvm.org/D29288#660636, @clayborg wrote: > Be very careful when using this, you can't change member variables that used > to be std::once to be statics. We also don't need the llvm namespace to be > included with "using namespace llvm;" in many

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Greg Clayton via Phabricator via lldb-commits
clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed. Be very careful when using this, you can't change member variables that used to be std::once to be statics. We also don't need the llvm namespace to be included with "using

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Mehdi AMINI via Phabricator via lldb-commits
mehdi_amini added a comment. I'm fine with this change, but I'll leave the approval to one of the LLDB developer :) (Thanks for following-up with the libstdc++ on these platforms!) Repository: rL LLVM https://reviews.llvm.org/D29288 ___

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski added a comment. I can build and test this patch on NetBSD/amd64. I don't have access right now to a performant FreeBSD, Linux, Android, Windows and FreeBSD hosts to test build and execute tests for this patch on other platforms. Please check. I was in touch with `libstdc++`

[Lldb-commits] [PATCH] D29288: Switch std::call_once to llvm::call_once

2017-01-30 Thread Kamil Rytarowski via Phabricator via lldb-commits
krytarowski created this revision. krytarowski added a project: LLDB. The std::call_once implementation in libstdc++ has problems on few systems: NetBSD, OpenBSD and Linux PPC. LLVM ships with a homegrown implementation llvm::call_once to help on these platforms. This change is