blob: 7d87075cd1c5dd6e3e0964a9c428aa6af53ce6ed [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001// SPDX-License-Identifier: GPL-2.0
Olivier Deprez157378f2022-04-04 15:47:50 +02002#include "clang/Basic/Version.h"
3#if CLANG_VERSION_MAJOR < 8
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00004#include "clang/Basic/VirtualFileSystem.h"
Olivier Deprez157378f2022-04-04 15:47:50 +02005#endif
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00006#include "clang/Driver/Driver.h"
7#include "clang/Frontend/TextDiagnosticPrinter.h"
8#include "llvm/ADT/IntrusiveRefCntPtr.h"
9#include "llvm/Support/ManagedStatic.h"
Olivier Deprez157378f2022-04-04 15:47:50 +020010#if CLANG_VERSION_MAJOR >= 8
11#include "llvm/Support/VirtualFileSystem.h"
12#endif
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000013#include "llvm/Support/raw_ostream.h"
14
15using namespace clang;
16using namespace clang::driver;
17
18int main()
19{
20 IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
21 IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
22
23 DiagnosticsEngine Diags(DiagID, &*DiagOpts);
24 Driver TheDriver("test", "bpf-pc-linux", Diags);
25
26 llvm::llvm_shutdown();
27 return 0;
28}