PTH-- Remove feature entirely-
authorErich Keane <erich.keane@intel.com>
Tue, 4 Dec 2018 14:34:09 +0000 (14:34 +0000)
committerErich Keane <erich.keane@intel.com>
Tue, 4 Dec 2018 14:34:09 +0000 (14:34 +0000)
commit0a6b5b653ee47234674614fecc213c1d73bb1e28
tree3de28f49966adcfaf8a1f6540c083b4dc5f7d92a
parent924f98e579b04e72c849f8dd3cd9b84cfdd57c06
PTH-- Remove feature entirely-

When debugging a boost build with a modified
version of Clang, I discovered that the PTH implementation
stores TokenKind in 8 bits. However, we currently have 368
TokenKinds.

The result is that the value gets truncated and the wrong token
gets picked up when including PTH files. It seems that this will
go wrong every time someone uses a token that uses the 9th bit.

Upon asking on IRC, it was brought up that this was a highly
experimental features that was considered a failure. I discovered
via googling that BoostBuild (mostly Boost.Math) is the only user of
this
feature, using the CC1 flag directly. I believe that this can be
transferred over to normal PCH with minimal effort:
https://github.com/boostorg/build/issues/367

Based on advice on IRC and research showing that this is a nearly
completely unused feature, this patch removes it entirely.

Note: I considered leaving the build-flags in place and making them
emit an error/warning, however since I've basically identified and
warned the only user, it seemed better to just remove them.

Differential Revision: https://reviews.llvm.org/D54547

Change-Id: If32744275ef1f585357bd6c1c813d96973c4d8d9
llvm-svn: 348266
40 files changed:
clang/NOTES.txt
clang/docs/InternalsManual.rst
clang/docs/PTHInternals.rst [deleted file]
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticFrontendKinds.td
clang/include/clang/Basic/DiagnosticLexKinds.td
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Driver/Driver.h
clang/include/clang/Driver/Options.td
clang/include/clang/Frontend/FrontendActions.h
clang/include/clang/Frontend/FrontendOptions.h
clang/include/clang/Frontend/Utils.h
clang/include/clang/Lex/PTHLexer.h [deleted file]
clang/include/clang/Lex/PTHManager.h [deleted file]
clang/include/clang/Lex/Preprocessor.h
clang/include/clang/Lex/PreprocessorOptions.h
clang/lib/ARCMigrate/ARCMT.cpp
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CMakeLists.txt
clang/lib/Frontend/CacheTokens.cpp [deleted file]
clang/lib/Frontend/ChainedIncludesSource.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/FrontendActions.cpp
clang/lib/Frontend/InitPreprocessor.cpp
clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
clang/lib/Lex/CMakeLists.txt
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPLexerChange.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/PTHLexer.cpp [deleted file]
clang/lib/Lex/Pragma.cpp
clang/lib/Lex/Preprocessor.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Driver/pth.c [deleted file]
clang/test/PCH/emit-pth.c [deleted file]
clang/test/PCH/pth.c [deleted file]
clang/test/Preprocessor/include-pth.c [deleted file]