<div dir="ltr">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...).<div>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?</div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 29, 2013 at 1:07 AM, Joćo Matos <span dir="ltr"><<a href="mailto:ripzonetriton@gmail.com" target="_blank">ripzonetriton@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>+#ifdef _MSC_VER</div><div>+        InterlockedIncrement(&m_last_revision);</div><div>+#else</div>

<div>         __sync_add_and_fetch(&m_last_revision, +1);</div><div>+#endif</div><div><br></div>

<div>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 (<a href="http://llvm.org/docs/doxygen/html/namespacellvm_1_1sys.html#a40e1bab8b13b891dfb830c16c58a44cb" style="font-size:13px;color:rgb(61,33,133);font-weight:bold;background-color:rgb(242,242,255);font-family:Verdana,Geneva,Arial,Helvetica,sans-serif" target="_blank">llvm::sys::AtomicIncrement</a>).</div>

<span class="HOEnZb"><font color="#888888">

<div class="gmail_extra"><br><div><br></div>-- <br>Joćo Matos
</div></font></span></div>
</blockquote></div><br></div>