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
This commit is contained in:
@@ -156,7 +156,7 @@ public:
|
||||
} // namespace
|
||||
|
||||
std::unique_ptr<ASTConsumer>
|
||||
ObjectFilePCHContainerOperations::CreatePCHContainerGenerator(
|
||||
ObjectFilePCHContainerWriter::CreatePCHContainerGenerator(
|
||||
DiagnosticsEngine &Diags, const HeaderSearchOptions &HSO,
|
||||
const PreprocessorOptions &PPO, const TargetOptions &TO,
|
||||
const LangOptions &LO, const std::string &MainFileName,
|
||||
@@ -166,7 +166,7 @@ ObjectFilePCHContainerOperations::CreatePCHContainerGenerator(
|
||||
Diags, HSO, PPO, TO, LO, MainFileName, OutputFileName, OS, Buffer);
|
||||
}
|
||||
|
||||
void ObjectFilePCHContainerOperations::ExtractPCH(
|
||||
void ObjectFilePCHContainerReader::ExtractPCH(
|
||||
llvm::MemoryBufferRef Buffer, llvm::BitstreamReader &StreamFile) const {
|
||||
if (auto OF = llvm::object::ObjectFile::createObjectFile(Buffer)) {
|
||||
auto *Obj = OF.get().get();
|
||||
|
||||
Reference in New Issue
Block a user