summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2017-08-02 04:51:40 +0000
committerDean Michael Berris <dberris@google.com>2017-08-02 04:51:40 +0000
commitcd6d69c22ec4b19475b51fa7a677954b9da1ddb3 (patch)
tree97b704d1660bc0277509cbce7dcbd17f8af2203d /include
parent73ea55e16c3724f1ea0caa30a34aad7427dd36f7 (diff)
[XRay][compiler-rt] Remove use of std::mutex and std::shared_ptr from global scope.
Summary: This change attempts to remove all the dependencies we have on std::mutex and any std::shared_ptr construction in global variables. We instead use raw pointers to these objects, and construct them on the heap. In cases where it's possible, we lazily initialize these pointers. While we do not have a replacement for std::shared_ptr yet in compiler-rt, we use this work-around to avoid having to statically initialize the objects as globals. Subsequent changes should allow us to completely remove our dependency on std::shared_ptr and instead have our own implementation of the std::shared_ptr and std::weak_ptr semantics (or completely rewrite the implementaton to not need these standard-library provided abstractions). Reviewers: dblaikie, kpw, pelikan Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D36078 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@309792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/xray/xray_records.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/xray/xray_records.h b/include/xray/xray_records.h
index feb8d228b..506755dbd 100644
--- a/include/xray/xray_records.h
+++ b/include/xray/xray_records.h
@@ -17,6 +17,8 @@
#ifndef XRAY_XRAY_RECORDS_H
#define XRAY_XRAY_RECORDS_H
+#include <cstdint>
+
namespace __xray {
enum FileTypes {