<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 2, 2021 at 10:25 PM Mehdi AMINI <<a href="mailto:joker.eph@gmail.com">joker.eph@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi all,<div><br></div><div>I'm trying to figure out how to use clang to compile some piece of IR in a .ll generated with coroutines.</div><div><br></div><div>I tried to use the `-fcoroutines-ts`, but it isn't even forwarded by the driver to CC1. And even if I use -Xclang to forward it manually it is then ignored because LLVM IR input is shortcut by CompilerInvocation::ParseLangArgs. </div><div><br></div><div>What's the best way here? I could add support in CompilerInvocation::ParseLangArgs:</div><div><br></div><div>@@ -3547,6 +3546,9 @@ bool CompilerInvocation::ParseLangArgs(L<br>     parseSanitizerKinds("-fsanitize=", Args.getAllArgValues(OPT_fsanitize_EQ),<br>                         Diags, Opts.Sanitize);<br> <br>+    // Allows to use -fcoroutine-ts with IR input.<br>+    Opts.Coroutines = Args.hasArg(OPT_fcoroutines_ts);<br>+<br>     return Diags.getNumErrors() == NumErrorsBefore;<br>   }<br></div><div><br></div><div><br></div><div>But I still need to figure out how to have the driver propagate the option to cc1, any pointer?</div><div>Is it expected to silently discard it here by the way? It is quite surprising to me).<br></div></div></blockquote><div><br></div><div>Ping on these questions? Anyone want to chime in?</div><div><br></div><div>Cheers,</div><div><br></div><div>-- </div><div>Mehdi </div></div></div>