[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Ylp0M/VYgHOxtcnF@gentoo.org>
Date: Sat, 16 Apr 2022 09:45:55 +0200
From: Guilherme Amadio <amadio@...too.org>
To: acme@...nel.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] perf clang: Fix header include for LLVM >= 14
The header TargetRegistry.h has moved in LLVM/clang 14.
Signed-off-by: Guilherme Amadio <amadio@...too.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
Powered by blists - more mailing lists