File tree Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Expand file tree Collapse file tree 3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,12 @@ class ModuleListProperties : public Properties {
100
100
bool GetSwiftEnableASTContext () const ;
101
101
// END SWIFT
102
102
103
+ // START CAS
104
+ FileSpec GetCASOnDiskPath () const ;
105
+ FileSpec GetCASPluginPath () const ;
106
+ std::vector<std::pair<std::string, std::string>> GetCASPluginOptions () const ;
107
+ // END CAS
108
+
103
109
FileSpec GetClangModulesCachePath () const ;
104
110
bool SetClangModulesCachePath (const FileSpec &path);
105
111
bool GetEnableExternalLookup () const ;
Original file line number Diff line number Diff line change @@ -74,6 +74,19 @@ let Definition = "modulelist" in {
74
74
DefaultTrue,
75
75
Desc<"Enable instantiating Swift AST contexts.">;
76
76
// END SWIFT
77
+ // BEGIN CAS
78
+ def CASOnDiskPath: Property<"cas-path", "FileSpec">,
79
+ Global,
80
+ DefaultStringValue<"">,
81
+ Desc<"The path for CAS storage">;
82
+ def CASPluginPath: Property<"cas-plugin-path", "FileSpec">,
83
+ Global,
84
+ DefaultStringValue<"">,
85
+ Desc<"The path for CAS plugin dynamic library">;
86
+ def CASPluginOptions: Property<"cas-plugin-options", "Array">,
87
+ ElementType<"String">,
88
+ Desc<"A list of options to be passed to CAS plugins">;
89
+ // END CAS
77
90
def SymLinkPaths: Property<"debug-info-symlink-paths", "FileSpecList">,
78
91
Global,
79
92
DefaultStringValue<"">,
Original file line number Diff line number Diff line change @@ -282,6 +282,32 @@ bool ModuleListProperties::GetSwiftEnableASTContext() const {
282
282
}
283
283
// END SWIFT
284
284
285
+ // START CAS
286
+ FileSpec ModuleListProperties::GetCASOnDiskPath () const {
287
+ const uint32_t idx = ePropertyCASOnDiskPath;
288
+ return GetPropertyAtIndexAs<FileSpec>(idx, {});
289
+ }
290
+
291
+ FileSpec ModuleListProperties::GetCASPluginPath () const {
292
+ const uint32_t idx = ePropertyCASPluginPath;
293
+ return GetPropertyAtIndexAs<FileSpec>(idx, {});
294
+ }
295
+
296
+ std::vector<std::pair<std::string, std::string>>
297
+ ModuleListProperties::GetCASPluginOptions () const {
298
+ Args args;
299
+ const uint32_t idx = ePropertyCASPluginOptions;
300
+ m_collection_sp->GetPropertyAtIndexAsArgs (idx, args);
301
+ std::vector<std::pair<std::string, std::string>> options;
302
+ for (auto &arg: args) {
303
+ llvm::StringRef opt = arg.c_str ();
304
+ auto splitted = opt.split (" =" );
305
+ options.emplace_back (splitted.first .str (), splitted.second .str ());
306
+ }
307
+ return options;
308
+ }
309
+ // END CAS
310
+
285
311
FileSpec ModuleListProperties::GetLLDBIndexCachePath () const {
286
312
const uint32_t idx = ePropertyLLDBIndexCachePath;
287
313
return GetPropertyAtIndexAs<FileSpec>(idx, {});
You can’t perform that action at this time.
0 commit comments