module volt.llvm.driver

Code Map

module volt.llvm.driver;


//! Settings for LLVMDriver.
class LLVMDriverSettings
{
public:
	ar: string;
	clang: string;
	linker: string;
	libFiles: string[];
	libraryPaths: string[];
	libraryFlags: string[];
	frameworkPaths: string[];
	frameworkNames: string[];
	xCC: string[];
	xLD: string[];
	xLink: string[];
	xClang: string[];
	xLinker: string[];
	linkWithCC: bool;
	linkWithLink: bool;


public:
	this() { }
}

//! The beckend part of the Driver that handles the backend and running of
//! the commands.
class LLVMDriver
{
public:
	d: Driver;
	lp: LanguagePass;
	tempMan: TempfileManager;
	target: TargetInfo;
	backend: Backend;
	ls: LLVMDriverSettings;


public:
	this(d: Driver, tm: TempfileManager, target: TargetInfo, lp: LanguagePass, backend: Backend, ls: LLVMDriverSettings) { }
	//! Make a single bitcode files out of all given modules and bitcode files.
	fn makeBitcode(of: string, mods: ir.Module[], bitcodeFiles: string[]) i32 { }
	//! Make a single object files out of all given modules and bitcode files.
	fn makeObject(of: string, mods: ir.Module[], bitcodeFiles: string[]) i32 { }
	//! Make a single ar archive out of all given modules, bitcode files and
	//! object files.
	fn makeArchive(of: string, mods: ir.Module[], bitcodeFiles: string[], objectFiles: string[]) i32 { }
	//! Run the native linker.
	fn doNativeLink(of: string, mods: ir.Module[], bitcodeFiles: string[], objectFiles: string[]) i32 { }


protected:
	fn turnModulesIntoResults(mods: ir.Module[], targetType: TargetType) BackendFileResult[] { }
	fn turnBitcodeIntoObject(bitcodeFiles: string[]) string[] { }
	fn turnResultsIntoFiles(results: BackendFileResult[], ending: string) string[] { }
	fn turnBitcodesIntoObjects(bitcodeFiles: string[]) string[] { }
	fn runClang(ls: LLVMDriverSettings, results: BackendFileResult[], bitcodeFiles: string[]) string[] { }
	fn runAr(ar: string, of: string, objectFiles: string[]) i32 { }
	fn runCC(ls: LLVMDriverSettings, of: string, objectFiles: string[]) i32 { }
	fn runLink(ls: LLVMDriverSettings, of: string, objectFiles: string[]) i32 { }
	fn getClangArgs(ls: LLVMDriverSettings) string[] { }
	fn checkClangReturn(result: i32) { }
}
class LLVMDriverSettings

Settings for LLVMDriver.

class LLVMDriver

The beckend part of the Driver that handles the backend and running of the commands.

fn makeBitcode(of: string, mods: ir.Module[], bitcodeFiles: string[]) i32

Make a single bitcode files out of all given modules and bitcode files.

fn makeObject(of: string, mods: ir.Module[], bitcodeFiles: string[]) i32

Make a single object files out of all given modules and bitcode files.

fn makeArchive(of: string, mods: ir.Module[], bitcodeFiles: string[], objectFiles: string[]) i32

Make a single ar archive out of all given modules, bitcode files and object files.

fn doNativeLink(of: string, mods: ir.Module[], bitcodeFiles: string[], objectFiles: string[]) i32

Run the native linker.