Skip to content

Commit

Permalink
[llvm-exegesis] Use correct pid_t definition in SubprocessMemory.h
Browse files Browse the repository at this point in the history
Due to failures in MinGW builds I adjusted the preprocessor directives
to be more specific about when to include but kept the old definition in
files that were committed more recently on accident. This patch changes
those definitions to match the fixed ones.

Also fix a typo leftover from the original change in PerfHelper.h.
  • Loading branch information
boomanaiden154 committed Jun 27, 2023
1 parent d983e83 commit ae4846d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/tools/llvm-exegesis/lib/PerfHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
typedef int pid_t;
#else
#include <sys/types.h>
#endif // HAVE_LIBPFM
#endif // _MSC_VER

struct perf_event_attr;

Expand Down
7 changes: 5 additions & 2 deletions llvm/tools/llvm-exegesis/lib/SubprocessMemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
#include <unordered_map>
#include <vector>

#ifndef __linux__
#ifdef _MSC_VER
typedef int pid_t;
#endif // __linux__
#else
#include <sys/types.h>
#endif // _MSC_VER


namespace llvm {
namespace exegesis {
Expand Down

0 comments on commit ae4846d

Please sign in to comment.