diff options
author | Jonathan Roelofs <jonathan@codesourcery.com> | 2014-10-03 21:57:44 +0000 |
---|---|---|
committer | Jonathan Roelofs <jonathan@codesourcery.com> | 2014-10-03 21:57:44 +0000 |
commit | b140a100a0479f9dfcb45c523f22dd64c41b68f0 (patch) | |
tree | 5c28a4c9a18528cf4ae78ca8a1a803d21fceeef8 /clang/lib/Driver/Driver.cpp | |
parent | 0820e13e2a2676fd61500ec3cbe0a2c3d1902c43 (diff) | |
download | bcm5719-llvm-b140a100a0479f9dfcb45c523f22dd64c41b68f0.tar.gz bcm5719-llvm-b140a100a0479f9dfcb45c523f22dd64c41b68f0.zip |
CFE Knob for: Add a thread-model knob for lowering atomics on baremetal & single threaded systems
http://reviews.llvm.org/D4985
llvm-svn: 219027
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 8b097755064..89713f59ea6 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -684,9 +684,13 @@ void Driver::PrintVersion(const Compilation &C, raw_ostream &OS) const { OS << "Target: " << TC.getTripleString() << '\n'; // Print the threading model. - // - // FIXME: Implement correctly. - OS << "Thread model: " << "posix" << '\n'; + if (Arg *A = C.getArgs().getLastArg(options::OPT_mthread_model)) { + // Don't print if the ToolChain would have barfed on it already + if (TC.isThreadModelSupported(A->getValue())) + OS << "Thread model: " << A->getValue(); + } else + OS << "Thread model: " << TC.getThreadModel(); + OS << '\n'; } /// PrintDiagnosticCategories - Implement the --print-diagnostic-categories |