[compiler-rt] r348445 - [XRay] Use default-constructed struct as argument to Append(...)

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 5 17:56:27 PST 2018


Author: dberris
Date: Wed Dec  5 17:56:27 2018
New Revision: 348445

URL: http://llvm.org/viewvc/llvm-project?rev=348445&view=rev
Log:
[XRay] Use default-constructed struct as argument to Append(...)

This is a follow-up to D54989.

Work-around gcc-4.8 failing to handle brace-init for structs to imply
default-construction of an aggregate, and treats it as an initialiser
list instead.

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

Modified: compiler-rt/trunk/lib/xray/xray_profile_collector.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/xray/xray_profile_collector.cc?rev=348445&r1=348444&r2=348445&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_profile_collector.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_profile_collector.cc Wed Dec  5 17:56:27 2018
@@ -95,7 +95,7 @@ void post(const FunctionCallTrie &T, tid
     if (GlobalAllocators == nullptr || ThreadTries == nullptr)
       return;
 
-    Item = ThreadTries->Append({});
+    Item = ThreadTries->Append(ThreadTrie());
     if (Item == nullptr)
       return;
 




More information about the llvm-commits mailing list