Minor cleanup
move a function def to InstrProfilingUtil.c llvm-svn: 262785
This commit is contained in:
parent
40e1a71cdd
commit
cf2f829be6
|
@ -34,3 +34,16 @@ void __llvm_profile_recursive_mkdir(char *path) {
|
|||
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
|
||||
|
||||
|
|
|
@ -20,4 +20,6 @@ void __llvm_profile_recursive_mkdir(char *Pathname);
|
|||
static inline char *getenv(const char *name) { return NULL; }
|
||||
#endif /* #if __PS4__ */
|
||||
|
||||
unsigned BoolCmpXchg(void **Ptr, void *OldV, void *NewV);
|
||||
|
||||
#endif /* PROFILE_INSTRPROFILINGUTIL_H */
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue