[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

@@ -43,6 +43,10 @@ namespace swift {
StringRef ModuleLinkName;
StringRef ModuleInterface;
std::vector<std::string> ExtraClangOptions;
std::vector<std::string> PluginSearchPaths;
std::vector<std::string> ExternalPluginSearchPaths;
std::vector<std::string> CompilerPluginLibraryPaths;
std::vector<std::string> CompilerPluginExecutablePaths;
/// Path prefixes that should be rewritten in debug info.
PathRemapper DebuggingOptionsPrefixMap;

View File

@@ -106,6 +106,12 @@ struct ValidationInfo {
/// \sa validateSerializedAST()
class ExtendedValidationInfo {
SmallVector<StringRef, 4> ExtraClangImporterOpts;
SmallVector<StringRef, 1> PluginSearchPaths;
SmallVector<StringRef, 1> ExternalPluginSearchPaths;
SmallVector<StringRef, 1> CompilerPluginLibraryPaths;
SmallVector<StringRef, 1> CompilerPluginExecutablePaths;
std::string SDKPath;
StringRef ModuleABIName;
StringRef ModulePackageName;
@@ -138,6 +144,34 @@ public:
ExtraClangImporterOpts.push_back(option);
}
ArrayRef<StringRef> getPluginSearchPaths() const {
return PluginSearchPaths;
}
void addPluginSearchPath(StringRef path) {
PluginSearchPaths.push_back(path);
}
ArrayRef<StringRef> getExternalPluginSearchPaths() const {
return ExternalPluginSearchPaths;
}
void addExternalPluginSearchPath(StringRef path) {
ExternalPluginSearchPaths.push_back(path);
}
ArrayRef<StringRef> getCompilerPluginLibraryPaths() const {
return CompilerPluginLibraryPaths;
}
void addCompilerPluginLibraryPath(StringRef path) {
CompilerPluginLibraryPaths.push_back(path);
}
ArrayRef<StringRef> getCompilerPluginExecutablePaths() const {
return CompilerPluginExecutablePaths;
}
void addCompilerPluginExecutablePath(StringRef path) {
CompilerPluginExecutablePaths.push_back(path);
}
bool isSIB() const { return Bits.IsSIB; }
void setIsSIB(bool val) {
Bits.IsSIB = val;