diff options
author | David Robillard <d@drobilla.net> | 2009-03-06 00:11:52 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-03-06 00:11:52 +0000 |
commit | fd2f7c3d6f43e2d6b102189073c647570d012fe9 (patch) | |
tree | 9f5fc89c7141d4808dace9271b788a4ee20fe67b /tuplr_llvm.hpp | |
parent | 832a7a2482c49478f684060583d23d2ef7355137 (diff) | |
download | resp-fd2f7c3d6f43e2d6b102189073c647570d012fe9.tar.gz resp-fd2f7c3d6f43e2d6b102189073c647570d012fe9.tar.bz2 resp-fd2f7c3d6f43e2d6b102189073c647570d012fe9.zip |
Split LLVM dependent backend from core code.
No more pretty little one filer. Oh well.
git-svn-id: http://svn.drobilla.net/resp/tuplr@51 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'tuplr_llvm.hpp')
-rw-r--r-- | tuplr_llvm.hpp | 47 |
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 + |