0001
0002 #include "clang/Basic/Version.h"
0003 #if CLANG_VERSION_MAJOR < 8
0004 #include "clang/Basic/VirtualFileSystem.h"
0005 #endif
0006 #include "clang/Driver/Driver.h"
0007 #include "clang/Frontend/TextDiagnosticPrinter.h"
0008 #include "llvm/ADT/IntrusiveRefCntPtr.h"
0009 #include "llvm/Support/ManagedStatic.h"
0010 #if CLANG_VERSION_MAJOR >= 8
0011 #include "llvm/Support/VirtualFileSystem.h"
0012 #endif
0013 #include "llvm/Support/raw_ostream.h"
0014
0015 using namespace clang;
0016 using namespace clang::driver;
0017
0018 int main()
0019 {
0020 IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
0021 IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
0022
0023 DiagnosticsEngine Diags(DiagID, &*DiagOpts);
0024 Driver TheDriver("test", "bpf-pc-linux", Diags);
0025
0026 llvm::llvm_shutdown();
0027 return 0;
0028 }