Make the clang module container format selectable from the command line.
authorAdrian Prantl <aprantl@apple.com>
Fri, 17 Jul 2015 01:19:54 +0000 (01:19 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 17 Jul 2015 01:19:54 +0000 (01:19 +0000)
commitfb2398d0c43405a6b654c80560e38fb3ccd134b9
treee1a0f288169e920a3ac6d9f2aaece67eb7796bf1
parentcabe02e14110526189a0935d172f8547f0232572
Make the clang module container format selectable from the command line.
- introduces a new cc1 option -fmodule-format=[raw,obj]
  with 'raw' being the default
- supports arbitrary module container formats that libclang is agnostic to
- adds the format to the module hash to avoid collisions
- splits the old PCHContainerOperations into PCHContainerWriter and
  a PCHContainerReader.

Thanks to Richard Smith for reviewing this patch!

llvm-svn: 242499
38 files changed:
clang/include/clang/Basic/DiagnosticCommonKinds.td
clang/include/clang/CodeGen/ObjectFilePCHContainerOperations.h
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Frontend/ASTUnit.h
clang/include/clang/Frontend/CompilerInstance.h
clang/include/clang/Frontend/PCHContainerOperations.h
clang/include/clang/Frontend/Utils.h
clang/include/clang/Lex/HeaderSearchOptions.h
clang/include/clang/Serialization/ASTReader.h
clang/include/clang/Serialization/GlobalModuleIndex.h
clang/include/clang/Serialization/ModuleManager.h
clang/include/clang/Tooling/Refactoring.h
clang/include/clang/Tooling/Tooling.h
clang/lib/ARCMigrate/ARCMT.cpp
clang/lib/Basic/FileManager.cpp
clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp
clang/lib/Frontend/ASTMerge.cpp
clang/lib/Frontend/ASTUnit.cpp
clang/lib/Frontend/ChainedIncludesSource.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Frontend/FrontendActions.cpp
clang/lib/Frontend/InitPreprocessor.cpp
clang/lib/Frontend/PCHContainerOperations.cpp
clang/lib/Lex/HeaderSearch.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/GlobalModuleIndex.cpp
clang/lib/Serialization/ModuleManager.cpp
clang/test/Modules/pch_container.m
clang/tools/arcmt-test/arcmt-test.cpp
clang/tools/clang-check/CMakeLists.txt
clang/tools/clang-check/ClangCheck.cpp
clang/tools/driver/cc1_main.cpp
clang/tools/libclang/CIndex.cpp
clang/tools/libclang/CIndexer.h
clang/tools/libclang/CMakeLists.txt
clang/unittests/ASTMatchers/ASTMatchersTest.h