<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 class="" 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">llvm::sys::AtomicIncrement</a>).</div>

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