diff --git a/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp b/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp --- a/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp +++ b/llvm/tools/llvm-exegesis/lib/PerfHelper.cpp @@ -12,9 +12,9 @@ #include "llvm/Support/Error.h" #include "llvm/Support/raw_ostream.h" #ifdef HAVE_LIBPFM -#include "perfmon/perf_event.h" -#include "perfmon/pfmlib.h" -#include "perfmon/pfmlib_perf_event.h" +#include +#include +#include #endif #include diff --git a/llvm/tools/llvm-exegesis/lib/X86/X86Counter.h b/llvm/tools/llvm-exegesis/lib/X86/X86Counter.h --- a/llvm/tools/llvm-exegesis/lib/X86/X86Counter.h +++ b/llvm/tools/llvm-exegesis/lib/X86/X86Counter.h @@ -15,14 +15,14 @@ #ifndef LLVM_TOOLS_LLVM_EXEGESIS_LIB_X86_X86COUNTER_H #define LLVM_TOOLS_LLVM_EXEGESIS_LIB_X86_X86COUNTER_H -#include "../PerfHelper.h" -#include "llvm/Support/Error.h" - // FIXME: Use appropriate wrappers for poll.h and mman.h // to support Windows and remove this linux-only guard. #if defined(__linux__) && defined(HAVE_LIBPFM) && \ defined(LIBPFM_HAS_FIELD_CYCLES) +#include "../PerfHelper.h" +#include "llvm/Support/Error.h" + namespace llvm { namespace exegesis { diff --git a/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp b/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp --- a/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp +++ b/llvm/tools/llvm-exegesis/lib/X86/X86Counter.cpp @@ -16,11 +16,9 @@ #include "llvm/Support/Endian.h" #include "llvm/Support/Errc.h" -#ifdef HAVE_LIBPFM -#include "perfmon/perf_event.h" -#include "perfmon/pfmlib.h" -#include "perfmon/pfmlib_perf_event.h" -#endif // HAVE_LIBPFM +#include +#include +#include #include #include