From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- .../lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/ExecutionEngine/PerfJITEvents') diff --git a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp index cc196df3b2fa..d4c715cc59f6 100644 --- a/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp +++ b/llvm/lib/ExecutionEngine/PerfJITEvents/PerfJITEventListener.cpp @@ -34,9 +34,8 @@ #include #include // mmap() -#include // getpid() #include // clock_gettime(), time(), localtime_r() */ -#include // for getpid(), read(), close() +#include // for read(), close() using namespace llvm; using namespace llvm::object; @@ -81,7 +80,7 @@ private: void NotifyDebug(uint64_t CodeAddr, DILineInfoTable Lines); // cache lookups - pid_t Pid; + sys::Process::Pid Pid; // base directory for output data std::string JitPath; @@ -177,7 +176,8 @@ static inline uint64_t perf_get_timestamp(void) { return timespec_to_ns(&ts); } -PerfJITEventListener::PerfJITEventListener() : Pid(::getpid()) { +PerfJITEventListener::PerfJITEventListener() + : Pid(sys::Process::getProcessId()) { // check if clock-source is supported if (!perf_get_timestamp()) { errs() << "kernel does not support CLOCK_MONOTONIC\n"; @@ -328,7 +328,7 @@ bool PerfJITEventListener::InitDebuggingDir() { return false; } - JitPath = UniqueDebugDir.str(); + JitPath = std::string(UniqueDebugDir.str()); return true; } -- cgit v1.2.3