mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[frontend] Added support for parsing the “-emit-verbose-sil” frontend argument.
This is not yet hooked up anywhere (beyond FrontendOptions), since the integrated frontend does not yet know how to emit SIL. Swift SVN r11161
This commit is contained in:
@@ -20,4 +20,7 @@ def debug_constraints : Flag<["-"], "debug-constraints">,
|
||||
Flags<[HelpHidden]>,
|
||||
HelpText<"Debug the constraint-based type checker">;
|
||||
|
||||
def emit_verbose_sil : Flag<["-"], "emit-verbose-sil">,
|
||||
Flags<[HelpHidden]>, HelpText<"Emit locations during SIL emission">;
|
||||
|
||||
} // end let Flags = [FrontendOption, NoDriverOption]
|
||||
|
||||
@@ -31,9 +31,16 @@ public:
|
||||
/// The name of the module which the frontend is building.
|
||||
std::string ModuleName;
|
||||
|
||||
/// Indicates that the frontend should emit "verbose" SIL
|
||||
/// (if asked to emit SIL).
|
||||
bool EmitVerboseSIL;
|
||||
|
||||
/// Path to a file which should contain serialized diagnostics for this
|
||||
/// frontend invocation.
|
||||
std::string SerializedDiagnosticsPath;
|
||||
|
||||
FrontendOptions() : InputFilenames(), OutputFilename(), ModuleName(),
|
||||
EmitVerboseSIL(false), SerializedDiagnosticsPath() {};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -51,6 +51,10 @@ static bool ParseFrontendArgs(FrontendOptions &Opts, ArgList &Args,
|
||||
Opts.SerializedDiagnosticsPath = A->getValue();
|
||||
}
|
||||
|
||||
if (Args.hasArg(OPT_emit_verbose_sil)) {
|
||||
Opts.EmitVerboseSIL = true;
|
||||
}
|
||||
|
||||
for (const Arg *A : make_range(Args.filtered_begin(OPT_INPUT),
|
||||
Args.filtered_end())) {
|
||||
Opts.InputFilenames.push_back(A->getValue());
|
||||
|
||||
Reference in New Issue
Block a user