[XRay][compiler-rt] Fixup: Avoid C++11 narrowing in non-x86_64
authorDean Michael Berris <dberris@google.com>
Mon, 14 May 2018 03:55:12 +0000 (03:55 +0000)
committerDean Michael Berris <dberris@google.com>
Mon, 14 May 2018 03:55:12 +0000 (03:55 +0000)
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

index 14326b5..ca50cf4 100644 (file)
@@ -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;
 }