Ha yes sure, I thought that was not recommended since LLVM was not used for
many other similar situations (i.e. Mutex, Regex, Argument parsing vs
getopt, some path functions, etc...).
But I suppose it is maybe due more to the fact it wasn't good/stable enough
at the time you needed it, and switch would be OK now?


On Thu, Aug 29, 2013 at 1:07 AM, João Matos <[email protected]> wrote:

> +#ifdef _MSC_VER
> +        InterlockedIncrement(&m_last_revision);
> +#else
>          __sync_add_and_fetch(&m_last_revision, +1);
> +#endif
>
> I see this pattern ifdef'd in a lot of places, I think we should abstract
> it in an helper "atomics" function, or even better, just re-use LLVM
> support libraries 
> (llvm::sys::AtomicIncrement<http://llvm.org/docs/doxygen/html/namespacellvm_1_1sys.html#a40e1bab8b13b891dfb830c16c58a44cb>
> ).
>
>
> --
> João Matos
>
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to