module volt.driver

Code Map

module volt.driver;


enum DEFAULT_A;
enum DEFAULT_BC;
enum DEFAULT_OBJ;
enum DEFAULT_EXE;

//! Default implementation of Driver, replace this if you wish to change
//! the basic operation of the compiler.
class VoltDriver : Driver, ErrorSink
{
public:
	ver: VersionSet;
	target: TargetInfo;
	frontend: Frontend;
	languagePass: LanguagePass;
	backend: Backend;
	tempMan: TempfileManager;
	debugVisitors: Pass[];


public:
	this(s: Settings, ver: VersionSet, target: TargetInfo, files: string[]) { }
	fn onWarning(msg: string, file: string, line: i32) { }
	fn onWarning(loc: const(ir.Location), msg: string, file: string, line: i32) { }
	fn onError(msg: string, file: string, line: i32) { }
	fn onError(loc: const(ir.Location), msg: string, file: string, line: i32) { }
	fn onPanic(msg: string, file: string, line: i32) { }
	fn onPanic(loc: const(ir.Location), msg: string, file: string, line: i32) { }
	//! Retrieve a Module by its name. Returns null if none is found.
	fn loadModule(name: ir.QualifiedName) ir.Module { }
	fn stringImport(loc: const(Location), fname: string) string { }
	fn getCommandLineModules() ir.Module[] { }
	fn close() { }
	fn addFile(file: string) { }
	fn addFiles(files: string[]) { }
	fn compile() i32 { }
	fn hostCompile(mod: ir.Module) BackendHostResult { }


protected:
	mArch: Arch;
	mPlatform: Platform;
	mNoLink: bool;
	mNoBackend: bool;
	mRemoveConditionalsOnly: bool;
	mMissingDeps: bool;
	mEmitLLVM: bool;
	mArWithLLLVM: bool;
	mOutput: string;
	mDepFile: string;
	//! All files used as input to this compiled.
	mDepFiles: string[];
	mIncludes: string[];
	mSrcIncludes: string[];
	mSourceFiles: string[];
	mImportAsSrc: string[];
	mBitcodeFiles: string[];
	mObjectFiles: string[];
	mStringImportPaths: string[];
	mInternalDiff: bool;
	mInternalDebug: bool;
	mInternalNoCatch: bool;
	mCommandLineModules: ir.Module[];
	mDebugPassesRun: bool;
	mAccumReading: Accumulator;
	mAccumParsing: Accumulator;
	mCompiledModules: BackendHostResult[u64];
	mJsonPrinter: JsonPrinter;
	mLLVMDriver: LLVMDriver;
	mLLVMSettings: LLVMDriverSettings;
	mRunVoltend: bool;
	mRunBackend: bool;


protected:
	fn writeDepFile() { }
	fn pathFromQualifiedName(name: ir.QualifiedName, includes: string[], suffix: string) string { }
	//! Loads a file and parses it.
	fn loadAndParse(file: string) ir.Module { }
	fn intCompile() i32 { }
	fn intCompileVoltend() i32 { }
	fn intCompileBackend() i32 { }
	fn decideStuff(settings: Settings) { }
	fn decideJson(settings: Settings) { }
	fn decideLinker(settings: Settings) { }
	fn decideOutputFile(settings: Settings) { }
	fn decideCheckErrors() { }
	fn decideParts() { }
	fn decideBackend() { }


protected:
	static fn decideMode(settings: Settings) Mode { }
}

fn setTargetInfo(target: TargetInfo, arch: Arch, platform: Platform, cRuntime: CRuntime, llvmIntrinsicVersion: i32) TargetInfo { }
class VoltDriver : Driver, ErrorSink

Default implementation of Driver, replace this if you wish to change the basic operation of the compiler.

mDepFiles: string[]

All files used as input to this compiled.

fn loadModule(name: ir.QualifiedName) ir.Module

Retrieve a Module by its name. Returns null if none is found.

fn loadAndParse(file: string) ir.Module

Loads a file and parses it.

fn debugPrint(msg: string, s: string)

If we are debugging print messages.