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

tools build: Fix test-clang.cpp with Clang 8+

LLVM rL344140 (included in Clang 8+) moved VFS from Clang to LLVM, so
paths to its include files have changed.

This broke the Clang test in tools/build - let's fix it.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Denis Pronin <dannftk@yandex.ru>
Cc: Dennis Schridde <devurandom@gmx.net>
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>
Cc: clang-built-linux@googlegroups.com
Link: http://lore.kernel.org/lkml/20191228171314.946469-1-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
d8007772 411c0ec0

+6
+6
tools/build/feature/test-clang.cpp
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 + #include "clang/Basic/Version.h" 3 + #if CLANG_VERSION_MAJOR < 8 2 4 #include "clang/Basic/VirtualFileSystem.h" 5 + #endif 3 6 #include "clang/Driver/Driver.h" 4 7 #include "clang/Frontend/TextDiagnosticPrinter.h" 5 8 #include "llvm/ADT/IntrusiveRefCntPtr.h" 6 9 #include "llvm/Support/ManagedStatic.h" 10 + #if CLANG_VERSION_MAJOR >= 8 11 + #include "llvm/Support/VirtualFileSystem.h" 12 + #endif 7 13 #include "llvm/Support/raw_ostream.h" 8 14 9 15 using namespace clang;