[compiler-rt] r332209 - [XRay][compiler-rt] Fixup: Avoid C++11 narrowing in non-x86_64

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Sun May 13 20:55:12 PDT 2018


Author: dberris
Date: Sun May 13 20:55:12 2018
New Revision: 332209

URL: http://llvm.org/viewvc/llvm-project?rev=332209&view=rev
Log:
[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.

Modified:
    compiler-rt/trunk/lib/xray/xray_fdr_logging.cc

Modified: compiler-rt/trunk/lib/xray/xray_fdr_logging.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_fdr_logging.cc?rev=332209&r1=332208&r2=332209&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_fdr_logging.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_fdr_logging.cc Sun May 13 20:55:12 2018
@@ -123,9 +123,10 @@ XRayBuffer fdrIterator(const XRayBuffer
   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;
 }




More information about the llvm-commits mailing list