From 845fe8a7087c68d8e88ac41229efa12c390d1491 Mon Sep 17 00:00:00 2001 From: Dean Michael Berris Date: Mon, 14 May 2018 03:55:12 +0000 Subject: [PATCH] [XRay][compiler-rt] Fixup: Avoid C++11 narrowing in non-x86_64 This should fix non-x86_64 builds where size_t != atomic_uint64_t::Type. Follow-up to D46574. llvm-svn: 332209 --- compiler-rt/lib/xray/xray_fdr_logging.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler-rt/lib/xray/xray_fdr_logging.cc b/compiler-rt/lib/xray/xray_fdr_logging.cc index 14326b5..ca50cf4 100644 --- a/compiler-rt/lib/xray/xray_fdr_logging.cc +++ b/compiler-rt/lib/xray/xray_fdr_logging.cc @@ -123,9 +123,10 @@ XRayBuffer fdrIterator(const XRayBuffer B) { if (It == End) return {nullptr, 0}; - XRayBuffer Result{ - It->Data, __sanitizer::atomic_load(&It->Extents->Size, - __sanitizer::memory_order_acquire)}; + XRayBuffer Result; + Result.Data = It->Data; + Result.Size = __sanitizer::atomic_load(&It->Extents->Size, + __sanitizer::memory_order_acquire); ++It; return Result; } -- 2.7.4