[PATCH] CFE Knob for: Add a thread-model knob for lowering atomics on baremetal & single threaded systems

Jonathan Roelofs jonathan at codesourcery.com
Wed Aug 20 12:08:40 PDT 2014



On 8/20/14, 11:34 AM, hfinkel at anl.gov wrote:
> ================
> Comment at: lib/Frontend/CompilerInvocation.cpp:440
> @@ -439,2 +439,3 @@
>     Opts.RelocationModel = Args.getLastArgValue(OPT_mrelocation_model, "pic");
> +  Opts.ThreadModel = Args.getLastArgValue(OPT_mthread_model, "POSIX");
>     Opts.TrapFuncName = Args.getLastArgValue(OPT_ftrap_function_EQ);
> ----------------
> You need to validate the string here (just asserting later is not acceptable). There are plenty of calls to Diags.Report in this file, you'll need to add another.
Ok.
>
> Then you'll need a regression test for this.
Oops. Forgot that. Thanks!

Cheers,
Jon
>
> http://reviews.llvm.org/D4985
>
>

-- 
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded



More information about the cfe-commits mailing list