[XRay] Use default-constructed struct as argument to Append(...)
authorDean Michael Berris <dberris@google.com>
Thu, 6 Dec 2018 01:56:27 +0000 (01:56 +0000)
committerDean Michael Berris <dberris@google.com>
Thu, 6 Dec 2018 01:56:27 +0000 (01:56 +0000)
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.

llvm-svn: 348445

compiler-rt/lib/xray/xray_profile_collector.cc

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