[Macros] Serialize plugin search paths for LLDB use

rdar://107030743
This commit is contained in:
Rintaro Ishizaki
2023-04-07 12:02:12 -07:00
committed by Alexis Laferrière
parent 08af8a657f
commit 3ef6087d32
8 changed files with 159 additions and 0 deletions

View File

@@ -843,6 +843,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);
@@ -1119,6 +1124,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);
}
}
}
}