[compiler-rt] r262785 - Minor cleanup
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 5 16:55:20 PST 2016
Author: davidxl
Date: Sat Mar 5 18:55:20 2016
New Revision: 262785
URL: http://llvm.org/viewvc/llvm-project?rev=262785&view=rev
Log:
Minor cleanup
move a function def to InstrProfilingUtil.c
Modified:
compiler-rt/trunk/lib/profile/InstrProfilingUtil.c
compiler-rt/trunk/lib/profile/InstrProfilingUtil.h
compiler-rt/trunk/lib/profile/InstrProfilingValue.c
Modified: compiler-rt/trunk/lib/profile/InstrProfilingUtil.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingUtil.c?rev=262785&r1=262784&r2=262785&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingUtil.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingUtil.c Sat Mar 5 18:55:20 2016
@@ -34,3 +34,16 @@ void __llvm_profile_recursive_mkdir(char
path[i] = '/';
}
}
+
+#if COMPILER_RT_HAS_ATOMICS != 1
+COMPILER_RT_VISIBILITY
+uint32_t BoolCmpXchg(void **Ptr, void *OldV, void *NewV) {
+ void *R = *Ptr;
+ if (R == OldV) {
+ *Ptr = NewV;
+ return 1;
+ }
+ return 0;
+}
+#endif
+
Modified: compiler-rt/trunk/lib/profile/InstrProfilingUtil.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingUtil.h?rev=262785&r1=262784&r2=262785&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingUtil.h (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingUtil.h Sat Mar 5 18:55:20 2016
@@ -20,4 +20,6 @@ void __llvm_profile_recursive_mkdir(char
static inline char *getenv(const char *name) { return NULL; }
#endif /* #if __PS4__ */
+unsigned BoolCmpXchg(void **Ptr, void *OldV, void *NewV);
+
#endif /* PROFILE_INSTRPROFILINGUTIL_H */
Modified: compiler-rt/trunk/lib/profile/InstrProfilingValue.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingValue.c?rev=262785&r1=262784&r2=262785&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingValue.c (original)
+++ compiler-rt/trunk/lib/profile/InstrProfilingValue.c Sat Mar 5 18:55:20 2016
@@ -25,18 +25,6 @@
return NULL; \
}
-#if COMPILER_RT_HAS_ATOMICS != 1
-COMPILER_RT_VISIBILITY
-uint32_t BoolCmpXchg(void **Ptr, void *OldV, void *NewV) {
- void *R = *Ptr;
- if (R == OldV) {
- *Ptr = NewV;
- return 1;
- }
- return 0;
-}
-#endif
-
/* This method is only used in value profiler mock testing. */
COMPILER_RT_VISIBILITY void
__llvm_profile_set_num_value_sites(__llvm_profile_data *Data,
More information about the llvm-commits
mailing list