Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Maciej S. Szmigiero and committed by
Arnaldo Carvalho de Melo
411c0ec0 53f3feeb

+4
+4
tools/perf/util/c++/clang.cpp
··· 71 71 CompilerInstance Clang; 72 72 Clang.createDiagnostics(); 73 73 74 + #if CLANG_VERSION_MAJOR < 9 74 75 Clang.setVirtualFileSystem(&*VFS); 76 + #else 77 + Clang.createFileManager(&*VFS); 78 + #endif 75 79 76 80 #if CLANG_VERSION_MAJOR < 4 77 81 IntrusiveRefCntPtr<CompilerInvocation> CI =