summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/c++
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2019-12-28 18:13:14 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-01-14 16:02:19 +0100
commit411c0ec0b8131457cf52812de29f11dcbf491ce6 (patch)
tree708514e202a016f7847bb8cfe8012390a304dc3c /tools/perf/util/c++
parentMerge tag 'perf-core-for-mingo-5.6-20200106' of git://git.kernel.org/pub/scm/... (diff)
downloadlinux-411c0ec0b8131457cf52812de29f11dcbf491ce6.tar.xz
linux-411c0ec0b8131457cf52812de29f11dcbf491ce6.zip
perf clang: Fix build with Clang 9
LLVM D59377 (included in Clang 9) refactored Clang VFS construction a bit, which broke perf clang build. Let's fix it. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Reviewed-by: Dennis Schridde <devurandom@gmx.net> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: clang-built-linux@googlegroups.com Cc: Denis Pronin <dannftk@yandex.ru> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Naohiro Aota <naota@elisp.net> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20191228171314.946469-2-mail@maciej.szmigiero.name Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/c++')
-rw-r--r--tools/perf/util/c++/clang.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/util/c++/clang.cpp b/tools/perf/util/c++/clang.cpp
index fc361c3f8570..c8885dfa3667 100644
--- a/tools/perf/util/c++/clang.cpp
+++ b/tools/perf/util/c++/clang.cpp
@@ -71,7 +71,11 @@ getModuleFromSource(llvm::opt::ArgStringList CFlags,
CompilerInstance Clang;
Clang.createDiagnostics();
+#if CLANG_VERSION_MAJOR < 9
Clang.setVirtualFileSystem(&*VFS);
+#else
+ Clang.createFileManager(&*VFS);
+#endif
#if CLANG_VERSION_MAJOR < 4
IntrusiveRefCntPtr<CompilerInvocation> CI =