diff options
author | David Robillard <d@drobilla.net> | 2009-10-06 18:28:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-10-06 18:28:00 +0000 |
commit | 63d9988b36d55e85fe776a41f67009eb2f187489 (patch) | |
tree | 04883163b07f5ee524f2358d7072a82e30ccea3c | |
parent | ec308ab801a64ac7a22e751b8ae3239ae64ed820 (diff) | |
download | resp-63d9988b36d55e85fe776a41f67009eb2f187489.tar.gz resp-63d9988b36d55e85fe776a41f67009eb2f187489.tar.bz2 resp-63d9988b36d55e85fe776a41f67009eb2f187489.zip |
Rename gc and backend files to more library appropriate names (tuplr_ prefix).
git-svn-id: http://svn.drobilla.net/resp/tuplr@195 ad02d1e2-f140-0410-9f75-f8b11f17cedd
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | src/tuplr.hpp | 6 | ||||
-rw-r--r-- | src/tuplr_gc.cpp (renamed from src/gclib.cpp) | 0 | ||||
-rw-r--r-- | src/tuplr_llvm.cpp (renamed from src/llvm.cpp) | 10 |
4 files changed, 16 insertions, 4 deletions
@@ -20,9 +20,9 @@ OBJECTS = \ build/constrain.o \ build/cps.o \ build/gc.o \ - build/gclib.so \ + build/tuplr_gc.so \ build/lex.o \ - build/llvm.so \ + build/tuplr_llvm.so \ build/parse.o \ build/pprint.o \ build/repl.o \ diff --git a/src/tuplr.hpp b/src/tuplr.hpp index 5b59c00..4302584 100644 --- a/src/tuplr.hpp +++ b/src/tuplr.hpp @@ -636,8 +636,10 @@ struct Engine { virtual const string call(CEnv& cenv, CFunction f, AType* retT) = 0; }; -Engine* tuplr_new_engine(); -void tuplr_free_engine(Engine* engine); +extern "C" { + Engine* tuplr_new_engine(); + void tuplr_free_engine(Engine* engine); +} /// Compile-Time Environment struct CEnv { diff --git a/src/gclib.cpp b/src/tuplr_gc.cpp index 8a0dd3e..8a0dd3e 100644 --- a/src/gclib.cpp +++ b/src/tuplr_gc.cpp diff --git a/src/llvm.cpp b/src/tuplr_llvm.cpp index cebed68..d4f8055 100644 --- a/src/llvm.cpp +++ b/src/tuplr_llvm.cpp @@ -43,6 +43,12 @@ using namespace llvm; using namespace std; using boost::format; +// Backend shared library interface +extern "C" { + Engine* tuplr_new_engine(); + void tuplr_free_engine(Engine* engine); +} + static inline Value* llVal(CValue v) { return static_cast<Value*>(v); } static inline Function* llFunc(CFunction f) { return static_cast<Function*>(f); } @@ -190,6 +196,8 @@ struct LLVMEngine : public Engine { FunctionPassManager opt; }; +extern "C" { + /// Create a new Engine (shared library entry point) Engine* tuplr_new_engine() @@ -204,6 +212,8 @@ tuplr_free_engine(Engine* engine) delete (LLVMEngine*)engine; } +} + /*************************************************************************** * Code Generation * |