Linux Audio

Check our new training course

Loading...
v4.10.11
 
 
 
 1#include "clang/Basic/VirtualFileSystem.h"
 
 2#include "clang/Driver/Driver.h"
 3#include "clang/Frontend/TextDiagnosticPrinter.h"
 4#include "llvm/ADT/IntrusiveRefCntPtr.h"
 5#include "llvm/Support/ManagedStatic.h"
 
 
 
 6#include "llvm/Support/raw_ostream.h"
 7
 8using namespace clang;
 9using namespace clang::driver;
10
11int main()
12{
13	IntrusiveRefCntPtr<DiagnosticIDs> DiagID(new DiagnosticIDs());
14	IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
15
16	DiagnosticsEngine Diags(DiagID, &*DiagOpts);
17	Driver TheDriver("test", "bpf-pc-linux", Diags);
18
19	llvm::llvm_shutdown();
20	return 0;
21}
v6.2
 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"
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}