Merge tag 'block-5.11-2021-01-16' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / tools / build / feature / test-clang.cpp
blob7d87075cd1c5dd6e3e0964a9c428aa6af53ce6ed
1 // SPDX-License-Identifier: GPL-2.0
2 #include "clang/Basic/Version.h"
3 #if CLANG_VERSION_MAJOR < 8
4 #include "clang/Basic/VirtualFileSystem.h"
5 #endif
6 #include "clang/Driver/Driver.h"
7 #include "clang/Frontend/TextDiagnosticPrinter.h"
8 #include "llvm/ADT/IntrusiveRefCntPtr.h"
9 #include "llvm/Support/ManagedStatic.h"
10 #if CLANG_VERSION_MAJOR >= 8
11 #include "llvm/Support/VirtualFileSystem.h"
12 #endif
13 #include "llvm/Support/raw_ostream.h"
15 using namespace clang;
16 using namespace clang::driver;
18 int main()
20 IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
21 IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
23 DiagnosticsEngine Diags(DiagID, &*DiagOpts);
24 Driver TheDriver("test", "bpf-pc-linux", Diags);
26 llvm::llvm_shutdown();
27 return 0;