Esempio n. 1
0
	core::ProgramPtr ConversionJob::execute(core::NodeManager& manager, bool fullApp) {
		// extension initialization
		frontendExtensionInit();

		// create a temporary manager
		core::NodeManager& tmpMgr = manager; // for performance we are just using the same manager
		//		core::NodeManager tmpMgr;		// not: due to the relevance of class-info-annotations no chaining of managers is allowed here

		// load and merge all files into a single translation unit
		auto unit = toIRTranslationUnit(tmpMgr);

		// convert units to a single program
		auto res = (fullApp) ? core::tu::toProgram(tmpMgr, unit) : core::tu::resolveEntryPoints(tmpMgr, unit);

		return applyPostProcessing(manager, res);
	}
Esempio n. 2
0
	core::ProgramPtr ConversionJob::execute(core::NodeManager& manager) {
		// extension initialization
		frontendExtensionInit();

		// create a temporary manager
	    core::NodeManager& tmpMgr = manager;	// for performance we are just using the same manager
//		core::NodeManager tmpMgr;		// not: due to the relevance of class-info-annotations no chaining of managers is allowed here

		// load and merge all files into a single translation unit
		auto unit = toIRTranslationUnit(tmpMgr);
		core::ProgramPtr res;

		if(unit.getEntryPoints().size() > 1)
			res = tu::resolveEntryPoints(tmpMgr, unit);
		else
			res = tu::toProgram(tmpMgr, unit);

		return execute(manager, res);
	}