[cfe-commits] r80883 - in /cfe/trunk: include/clang/Basic/DiagnosticFrontendKinds.td include/clang/Basic/LangOptions.h lib/Basic/Targets.cpp lib/Driver/Tools.cpp lib/Frontend/PCHReader.cpp tools/clang-cc/clang-cc.cpp

Douglas Gregor dgregor at apple.com
Thu Sep 3 07:40:22 PDT 2009


On Sep 2, 2009, at 9:54 PM, Daniel Dunbar wrote:

> Author: ddunbar
> Date: Wed Sep  2 23:54:28 2009
> New Revision: 80883
>
> URL: http://llvm.org/viewvc/llvm-project?rev=80883&view=rev
> Log:
> Add basic support for -pthread.
> - Patch by David Chisnall, with PCH and Darwin support mixed in.
>
> [snip]
> Modified: cfe/trunk/lib/Frontend/PCHReader.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/PCHReader.cpp?rev=80883&r1=80882&r2=80883&view=diff
>
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- cfe/trunk/lib/Frontend/PCHReader.cpp (original)
> +++ cfe/trunk/lib/Frontend/PCHReader.cpp Wed Sep  2 23:54:28 2009
> @@ -78,6 +78,7 @@
>   PARSE_LANGOPT_IMPORTANT(NoBuiltin, diag::warn_pch_builtins);
>   PARSE_LANGOPT_IMPORTANT(ThreadsafeStatics,
>                           diag::warn_pch_thread_safe_statics);
> +  PARSE_LANGOPT_IMPORTANT(POSIXThreads,  
> diag::warn_pch_posix_threads);
>   PARSE_LANGOPT_IMPORTANT(Blocks, diag::warn_pch_blocks);
>   PARSE_LANGOPT_BENIGN(EmitAllDecls);
>   PARSE_LANGOPT_IMPORTANT(MathErrno, diag::warn_pch_math_errno);

This is necessary but not sufficient. The POSIXThreads bit also needs  
to be saved in PCHWriter::WriteLanguageOptions and loaded in  
PCHReader::ParseLanguageOptions. Fixed in r80916.

	- Doug



More information about the cfe-commits mailing list