[compiler-rt] r348449 - [XRay] Use a local lvalue as arg to AppendEmplace(...)

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 5 18:55:47 PST 2018


Author: dberris
Date: Wed Dec  5 18:55:47 2018
New Revision: 348449

URL: http://llvm.org/viewvc/llvm-project?rev=348449&view=rev
Log:
[XRay] Use a local lvalue as arg to AppendEmplace(...)

This is a follow-up to D54989.

Further work-around gcc-4.8 failing to handle brace-init with temporaries.

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=348449&r1=348448&r2=348449&view=diff
==============================================================================
--- compiler-rt/trunk/lib/xray/xray_profile_collector.cc (original)
+++ compiler-rt/trunk/lib/xray/xray_profile_collector.cc Wed Dec  5 18:55:47 2018
@@ -95,7 +95,8 @@ void post(const FunctionCallTrie &T, tid
     if (GlobalAllocators == nullptr || ThreadTries == nullptr)
       return;
 
-    Item = ThreadTries->Append(ThreadTrie());
+    ThreadTrie Empty;
+    Item = ThreadTries->AppendEmplace(Empty);
     if (Item == nullptr)
       return;
 




More information about the llvm-commits mailing list