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

hfinkel at anl.gov hfinkel at anl.gov
Wed Aug 20 10:34:11 PDT 2014


================
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.

Then you'll need a regression test for this.

http://reviews.llvm.org/D4985






More information about the cfe-commits mailing list