aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr_llvm.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'tuplr_llvm.hpp')
-rw-r--r--tuplr_llvm.hpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/tuplr_llvm.hpp b/tuplr_llvm.hpp
new file mode 100644
index 0000000..99be041
--- /dev/null
+++ b/tuplr_llvm.hpp
@@ -0,0 +1,47 @@
+/* Tuplr LLVM Backend Definitions
+ * Copyright (C) 2008-2009 David Robillard <dave@drobilla.net>
+ *
+ * Tuplr is free software: you can redistribute it and/or modify it under
+ * the terms of the GNU Affero General Public License as published by the
+ * Free Software Foundation, either version 3 of the License, or (at your
+ * option) any later version.
+ *
+ * Tuplr is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General
+ * Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with Tuplr. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef TUPLR_LLVM_HPP
+#define TUPLR_LLVM_HPP
+
+#include "tuplr.hpp"
+#include "llvm/Analysis/Verifier.h"
+#include "llvm/DerivedTypes.h"
+#include "llvm/ExecutionEngine/ExecutionEngine.h"
+#include "llvm/Instructions.h"
+#include "llvm/Module.h"
+#include "llvm/ModuleProvider.h"
+#include "llvm/PassManager.h"
+#include "llvm/Support/IRBuilder.h"
+#include "llvm/Target/TargetData.h"
+#include "llvm/Transforms/Scalar.h"
+
+typedef llvm::Value CValue;
+typedef llvm::Type CType;
+typedef llvm::Function CFunction;
+
+struct CArg { CArg(int o=0, int a=0) : op(o), arg(a) {} int op; int arg; };
+
+struct CEngine {
+ CEngine();
+ llvm::Module* module;
+ llvm::ExecutionEngine* engine;
+ llvm::IRBuilder<> builder;
+};
+
+#endif // TUPLR_LLVM_HPP
+