[XRay] Use a local lvalue as arg to AppendEmplace(...)
authorDean Michael Berris <dberris@google.com>
Thu, 6 Dec 2018 02:55:47 +0000 (02:55 +0000)
committerDean Michael Berris <dberris@google.com>
Thu, 6 Dec 2018 02:55:47 +0000 (02:55 +0000)
This is a follow-up to D54989.

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

llvm-svn: 348449

compiler-rt/lib/xray/xray_profile_collector.cc

index 5f014ee..2c91d7b 100644 (file)
@@ -95,7 +95,8 @@ void post(const FunctionCallTrie &T, tid_t TId) XRAY_NEVER_INSTRUMENT {
     if (GlobalAllocators == nullptr || ThreadTries == nullptr)
       return;
 
-    Item = ThreadTries->Append(ThreadTrie());
+    ThreadTrie Empty;
+    Item = ThreadTries->AppendEmplace(Empty);
     if (Item == nullptr)
       return;