#include "PlanschbeckenJIT/PlanschbeckenJIT.h"
#include <stdlib.h>

int main(int argc, char **argv)
{
	llvm::orc::PlanschbeckenJIT::setupLLVM();

	auto jit = llvm::orc::PlanschbeckenJIT::Create();

	for(int n = 1; n < argc; n++)
	{
		jit->addModule(argv[n]);
	}

	int (*function)() = (int(*)())jit->lookup("?helloOrc@@YAHXZ"); //?helloOrc@@YAHXZ
	printf("Function: 0x%p\n", function);
	if(function)
	{
		function();
	}

	system("PAUSE");
	return 0;
}