CppADCodeGen  2.4.3
A C++ Algorithmic Differentiation Package with Source Code Generation
llvm5_0.hpp
1 #ifndef CPPAD_CG_LLVM5_0_INCLUDED
2 #define CPPAD_CG_LLVM5_0_INCLUDED
3 /* --------------------------------------------------------------------------
4  * CppADCodeGen: C++ Algorithmic Differentiation with Source Code Generation:
5  * Copyright (C) 2017 Ciengis
6  * Copyright (C) 2018 Joao Leal
7  *
8  * CppADCodeGen is distributed under multiple licenses:
9  *
10  * - Eclipse Public License Version 1.0 (EPL1), and
11  * - GNU General Public License Version 3 (GPL3).
12  *
13  * EPL1 terms and conditions can be found in the file "epl-v10.txt", while
14  * terms and conditions for the GPL3 can be found in the file "gpl3.txt".
15  * ----------------------------------------------------------------------------
16  * Author: Joao Leal
17  */
18 
25 #ifdef LLVM_WITH_NDEBUG
26 
27 // save the original NDEBUG definition
28 #ifdef NDEBUG
29 #define _OUTER_NDEBUG_DEFINED
30 #endif
31 
32 #if LLVM_WITH_NDEBUG == 1
33 #define NDEBUG
34 #else
35 #undef NDEBUG
36 #endif
37 
38 #endif
39 
40 #include <clang/CodeGen/CodeGenAction.h>
41 #include <clang/Basic/DiagnosticOptions.h>
42 #include <clang/Basic/TargetInfo.h>
43 #include <clang/Basic/SourceManager.h>
44 #include <clang/Frontend/CompilerInstance.h>
45 #include <clang/Frontend/CompilerInvocation.h>
46 #include <clang/Frontend/FrontendDiagnostic.h>
47 #include <clang/Frontend/TextDiagnosticPrinter.h>
48 #include <clang/Frontend/Utils.h>
49 #include <clang/Parse/ParseAST.h>
50 #include <clang/Lex/Preprocessor.h>
51 #include <clang/Lex/PreprocessorOptions.h>
52 
53 #include <llvm/Analysis/Passes.h>
54 #include <llvm/IR/Verifier.h>
55 #include <llvm/ExecutionEngine/ExecutionEngine.h>
56 #include <llvm/ExecutionEngine/SectionMemoryManager.h>
57 //#include <llvm/ExecutionEngine/JIT.h>
58 #include <llvm/IR/LegacyPassManager.h>
59 #include <llvm/IR/Module.h>
60 #include <llvm/IR/LLVMContext.h>
61 #include <llvm/Pass.h>
62 #include <llvm/Transforms/IPO/PassManagerBuilder.h>
63 #include <llvm/Bitcode/BitcodeReader.h>
64 #include <llvm/Bitcode/BitcodeWriter.h>
65 #include <llvm/Support/ManagedStatic.h>
66 #include <llvm/Support/MemoryBuffer.h>
67 #include <llvm/Support/TargetSelect.h>
68 #include <llvm/Support/raw_os_ostream.h>
69 //#include <llvm/Support/system_error.h>
70 #include <llvm/Linker/Linker.h>
71 #include <llvm/Support/Program.h>
72 
73 #ifdef LLVM_WITH_NDEBUG
74 
75 // recover the original NDEBUG
76 #ifdef _OUTER_NDEBUG_DEFINED
77 #define NDEBUG
78 #else
79 #undef NDEBUG
80 #endif
81 
82 // no need for this anymore
83 #undef _OUTER_NDEBUG_DEFINED
84 
85 #endif
86 
87 #include <cppad/cg/model/compiler/clang_compiler.hpp>
88 #include <cppad/cg/model/llvm/llvm_model_library.hpp>
89 #include <cppad/cg/model/llvm/llvm_model.hpp>
90 #include <cppad/cg/model/llvm/v5_0/llvm_model_library_impl.hpp>
91 #include <cppad/cg/model/llvm/v5_0/llvm_model_library_processor.hpp>
92 
93 #endif