mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[frontend] Added temporary support for setting MainInputFilename, Triple, and OutputFilename in IRGenOptions.
MainInputFilename and OutputFilename are pulled from the FrontendOptions, while Triple is parsed directly from the ArgList. Eventually, MainInputFilename and OutputFilename should likely be removed from IRGenOptions, in favor of the values in FrontendOptions, while Triple will be in a separate TargetOptions class. Swift SVN r11455
This commit is contained in:
@@ -149,13 +149,9 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
// Cleanup instructions/builtin calls not suitable for IRGen.
|
||||
performSILCleanup(SM.get());
|
||||
|
||||
// TODO: remove these manual overrides as CompilerInvocation fills in more
|
||||
// of IRGenOptions.
|
||||
IRGenOptions &Options = Invocation.getIRGenOptions();
|
||||
Options.MainInputFilename = Invocation.getInputFilenames()[0];
|
||||
Options.Triple = Invocation.getTargetTriple();
|
||||
Options.OutputFilename = Invocation.getOutputFilename();
|
||||
|
||||
|
||||
// TODO: remove once the frontend understands what action it should perform
|
||||
switch (Action) {
|
||||
case FrontendOptions::EmitIR:
|
||||
Options.OutputKind = IRGenOutputKind::LLVMAssembly;
|
||||
|
||||
Reference in New Issue
Block a user