[compiler-rt] r257126 - [profile] Add comments to portability macros for readability (NFC)
Vedant Kumar via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 7 16:49:34 PST 2016
Author: vedantk
Date: Thu Jan 7 18:49:34 2016
New Revision: 257126
URL: http://llvm.org/viewvc/llvm-project?rev=257126&view=rev
Log:
[profile] Add comments to portability macros for readability (NFC)
Modified:
compiler-rt/trunk/lib/profile/InstrProfilingPort.h
Modified: compiler-rt/trunk/lib/profile/InstrProfilingPort.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingPort.h?rev=257126&r1=257125&r2=257126&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingPort.h (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingPort.h Thu Jan 7 18:49:34 2016
@@ -29,16 +29,16 @@
#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) \
(InterlockedCompareExchange64((LONGLONG volatile *)Ptr, (LONGLONG)NewV, \
(LONGLONG)OldV) == (LONGLONG)OldV)
-#else
+#else /* !defined(_WIN64) */
#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) \
(InterlockedCompareExchange((LONG volatile *)Ptr, (LONG)NewV, (LONG)OldV) == \
(LONG)OldV)
#endif
-#else
+#else /* !defined(_MSC_VER) */
#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) \
__sync_bool_compare_and_swap(Ptr, OldV, NewV)
#endif
-#else
+#else /* COMPILER_RT_HAS_ATOMICS != 1 */
#define COMPILER_RT_BOOL_CMPXCHG(Ptr, OldV, NewV) \
BoolCmpXchg((void **)Ptr, OldV, NewV)
#endif
More information about the llvm-commits
mailing list