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