Skip to content

Commit 58d3053

Browse files
authored
[dndxc] Add option when dump ast. (#5266)
* [dndxc] Add option when dump ast. This will allow dump ast to add option like -HV 2021.
1 parent 451cd8b commit 58d3053

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/clang/tools/dotnetc/EditorForm.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,12 @@ private void CompileDocument()
624624
{
625625
try
626626
{
627-
var result = compiler.Compile(source, fileName, fileVars.Entry, fileVars.Target, new string[] { "-ast-dump" }, 1, null, 0, library.CreateIncludeHandler());
627+
List<string> args = new List<string>();
628+
args.Add("-ast-dump");
629+
args.AddRange(tbOptions.Text.Split());
630+
var result = compiler.Compile(source, fileName, fileVars.Entry,
631+
fileVars.Target, args.ToArray(), args.Count,
632+
null, 0, library.CreateIncludeHandler());
628633
if (result.GetStatus() == 0)
629634
{
630635
this.ASTDumpBox.Text = GetStringFromBlob(result.GetResult());

0 commit comments

Comments
 (0)