mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
![Maciej S. Szmigiero](/assets/img/avatar_default.png)
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>
28 lines
772 B
C++
28 lines
772 B
C++
// SPDX-License-Identifier: GPL-2.0
|
|
#include "clang/Basic/Version.h"
|
|
#if CLANG_VERSION_MAJOR < 8
|
|
#include "clang/Basic/VirtualFileSystem.h"
|
|
#endif
|
|
#include "clang/Driver/Driver.h"
|
|
#include "clang/Frontend/TextDiagnosticPrinter.h"
|
|
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
|
#include "llvm/Support/ManagedStatic.h"
|
|
#if CLANG_VERSION_MAJOR >= 8
|
|
#include "llvm/Support/VirtualFileSystem.h"
|
|
#endif
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
using namespace clang;
|
|
using namespace clang::driver;
|
|
|
|
int main()
|
|
{
|
|
IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
|
|
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
|
|
|
|
DiagnosticsEngine Diags(DiagID, &*DiagOpts);
|
|
Driver TheDriver("test", "bpf-pc-linux", Diags);
|
|
|
|
llvm::llvm_shutdown();
|
|
return 0;
|
|
}
|