Merge pull request #65370 from xymus/serial-macro-paths

[Macros] Serialize plugin search paths for LLDB use
This commit is contained in:
Alexis Laferrière
2023-05-02 09:20:16 -07:00
committed by GitHub
8 changed files with 159 additions and 0 deletions

View File

@@ -844,6 +844,11 @@ void Serializer::writeBlockInfoBlock() {
BLOCK_RECORD(options_block, MODULE_ABI_NAME);
BLOCK_RECORD(options_block, IS_CONCURRENCY_CHECKED);
BLOCK_RECORD(options_block, MODULE_PACKAGE_NAME);
BLOCK_RECORD(options_block, MODULE_EXPORT_AS_NAME);
BLOCK_RECORD(options_block, PLUGIN_SEARCH_PATH);
BLOCK_RECORD(options_block, EXTERNAL_SEARCH_PLUGIN_PATH);
BLOCK_RECORD(options_block, COMPILER_PLUGIN_LIBRARY_PATH);
BLOCK_RECORD(options_block, COMPILER_PLUGIN_EXECUTABLE_PATH);
BLOCK(INPUT_BLOCK);
BLOCK_RECORD(input_block, IMPORTED_MODULE);
@@ -1124,6 +1129,30 @@ void Serializer::writeHeader(const SerializationOptions &options) {
}
XCC.emit(ScratchRecord, arg);
}
// Macro plugins
options_block::PluginSearchPathLayout PluginSearchPath(Out);
for (auto Arg : options.PluginSearchPaths) {
PluginSearchPath.emit(ScratchRecord, Arg);
}
options_block::ExternalPluginSearchPathLayout
ExternalPluginSearchPath(Out);
for (auto Arg : options.ExternalPluginSearchPaths) {
ExternalPluginSearchPath.emit(ScratchRecord, Arg);
}
options_block::CompilerPluginLibraryPathLayout
CompilerPluginLibraryPath(Out);
for (auto Arg : options.CompilerPluginLibraryPaths) {
CompilerPluginLibraryPath.emit(ScratchRecord, Arg);
}
options_block::CompilerPluginExecutablePathLayout
CompilerPluginExecutablePath(Out);
for (auto Arg : options.CompilerPluginLibraryPaths) {
CompilerPluginExecutablePath.emit(ScratchRecord, Arg);
}
}
}
}