[PATCH] D19271: Change CALL_ONCE_INITIALIZATION implementation to use static initialization

Mehdi Amini via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 11:38:16 PDT 2016


I'm hesitating: the InitiOnceExecuteOnce seems "complex" to setup, knowing that it is *only* for MSVC2013, the tradeoff of leaving the existing code dying with the 2013 support is tempting.

> On Apr 20, 2016, at 11:24 AM, Reid Kleckner <rnk at google.com> wrote:
> 
> rnk added a comment.
> 
> If we're going to suffer ifdefs, we should just use InitOnceExecuteOnce on the Windows side. I trust it more than this code.
> 
> We try not to let LLVM headers transitively pollute the world with windows.h macros, so we would need to have our own definitions of `union _RTL_RUN_ONCE` and the `InitOnceExecuteOnce` prototype.
> 
> 
> http://reviews.llvm.org/D19271
> 
> 
> 



More information about the llvm-commits mailing list