public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf clang: Fix header include for LLVM >= 14
@ 2022-04-16  7:45 Guilherme Amadio
  2022-04-16 19:56 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Guilherme Amadio @ 2022-04-16  7:45 UTC (permalink / raw)
  To: acme; +Cc: linux-kernel

The header TargetRegistry.h has moved in LLVM/clang 14.

Signed-off-by: Guilherme Amadio <amadio@gentoo.org>
---
 tools/perf/util/c++/clang.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/perf/util/c++/clang.cpp b/tools/perf/util/c++/clang.cpp
index df7b18fb6b6e..1aad7d6d34aa 100644
--- a/tools/perf/util/c++/clang.cpp
+++ b/tools/perf/util/c++/clang.cpp
@@ -20,7 +20,11 @@
 #include "llvm/Option/Option.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/ManagedStatic.h"
+#if CLANG_VERSION_MAJOR >= 14
+#include "llvm/MC/TargetRegistry.h"
+#else
 #include "llvm/Support/TargetRegistry.h"
+#endif
 #include "llvm/Support/TargetSelect.h"
 #include "llvm/Target/TargetMachine.h"
 #include "llvm/Target/TargetOptions.h"
--
2.35.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-04-16 20:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-16  7:45 [PATCH] perf clang: Fix header include for LLVM >= 14 Guilherme Amadio
2022-04-16 19:56 ` Arnaldo Carvalho de Melo
2022-04-16 19:58   ` Arnaldo Carvalho de Melo
2022-04-16 20:00     ` Arnaldo Carvalho de Melo
2022-04-16 20:05       ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox