diff options
author | Dean Michael Berris <dberris@google.com> | 2018-12-05 07:14:06 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2018-12-05 07:14:06 +0000 |
commit | f8a5a3feda3303de03364337e915f99793796c4a (patch) | |
tree | aab3d59f57a99108408a55ef351dbbc8369c350b /lib/xray | |
parent | 1fbd43a422c281d0f3f8eba22318edd2c2fe4c13 (diff) | |
download | compiler-rt-f8a5a3feda3303de03364337e915f99793796c4a.tar.gz |
[XRay] Use uptr instead of uintptr_t
Follow-up to D54989.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@348338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/xray')
-rw-r--r-- | lib/xray/xray_profiling.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/xray/xray_profiling.cc b/lib/xray/xray_profiling.cc index 65c39b98b..6db4b6ff9 100644 --- a/lib/xray/xray_profiling.cc +++ b/lib/xray/xray_profiling.cc @@ -78,21 +78,21 @@ static ProfilingData *getThreadLocalData() XRAY_NEVER_INSTRUMENT { if (atomic_load_relaxed(&ThreadExitingLatch)) return nullptr; - uintptr_t Allocators = 0; + uptr Allocators = 0; if (atomic_compare_exchange_strong(&TLD.Allocators, &Allocators, 1, memory_order_acq_rel)) { new (&AllocatorsStorage) FunctionCallTrie::Allocators(FunctionCallTrie::InitAllocators()); - Allocators = reinterpret_cast<uintptr_t>( + Allocators = reinterpret_cast<uptr>( reinterpret_cast<FunctionCallTrie::Allocators *>(&AllocatorsStorage)); atomic_store(&TLD.Allocators, Allocators, memory_order_release); } - uintptr_t FCT = 0; + uptr FCT = 0; if (atomic_compare_exchange_strong(&TLD.FCT, &FCT, 1, memory_order_acq_rel)) { new (&FunctionCallTrieStorage) FunctionCallTrie( *reinterpret_cast<FunctionCallTrie::Allocators *>(Allocators)); - FCT = reinterpret_cast<uintptr_t>( + FCT = reinterpret_cast<uptr>( reinterpret_cast<FunctionCallTrie *>(&FunctionCallTrieStorage)); atomic_store(&TLD.FCT, FCT, memory_order_release); } @@ -109,13 +109,13 @@ static void cleanupTLD() XRAY_NEVER_INSTRUMENT { return; auto FCT = atomic_exchange(&TLD.FCT, 0, memory_order_acq_rel); - if (FCT == reinterpret_cast<uintptr_t>(reinterpret_cast<FunctionCallTrie *>( + if (FCT == reinterpret_cast<uptr>(reinterpret_cast<FunctionCallTrie *>( &FunctionCallTrieStorage))) reinterpret_cast<FunctionCallTrie *>(FCT)->~FunctionCallTrie(); auto Allocators = atomic_exchange(&TLD.Allocators, 0, memory_order_acq_rel); if (Allocators == - reinterpret_cast<uintptr_t>( + reinterpret_cast<uptr>( reinterpret_cast<FunctionCallTrie::Allocators *>(&AllocatorsStorage))) reinterpret_cast<FunctionCallTrie::Allocators *>(Allocators)->~Allocators(); } @@ -125,8 +125,8 @@ static void postCurrentThreadFCT(ProfilingData &T) XRAY_NEVER_INSTRUMENT { if (!TLDInit) return; - uintptr_t P = atomic_load(&T.FCT, memory_order_acquire); - if (P != reinterpret_cast<uintptr_t>( + uptr P = atomic_load(&T.FCT, memory_order_acquire); + if (P != reinterpret_cast<uptr>( reinterpret_cast<FunctionCallTrie *>(&FunctionCallTrieStorage))) return; |