From 411c0ec0b8131457cf52812de29f11dcbf491ce6 Mon Sep 17 00:00:00 2001 From: "Maciej S. Szmigiero" Date: Sat, 28 Dec 2019 18:13:14 +0100 Subject: 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 Reviewed-by: Dennis Schridde Cc: Alexander Shishkin Cc: clang-built-linux@googlegroups.com Cc: Denis Pronin Cc: Jiri Olsa Cc: Mark Rutland Cc: Namhyung Kim Cc: Naohiro Aota Cc: Peter Zijlstra Link: http://lore.kernel.org/lkml/20191228171314.946469-2-mail@maciej.szmigiero.name Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/c++/clang.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/perf/util/c++') 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 CI = -- cgit v1.2.3