Skip to content

Commit 0ed3cec

Browse files
committed
Fix issue due to duplicated indexstore bindings in Swift Build and TSC
1 parent 50d4c9c commit 0ed3cec

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

Sources/SWBCSupport/IndexStore.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,10 @@ typedef struct {
181181
indexstore_string_ref_t
182182
(*unit_dependency_get_name)(indexstore_unit_dependency_t);
183183

184-
bool
185-
(*unit_reader_dependencies_apply)(indexstore_unit_reader_t,
186-
bool(^applier)(indexstore_unit_dependency_t));
187-
188184
bool
189185
(*unit_reader_dependencies_apply_f)(indexstore_unit_reader_t,
190186
void *context,
191187
bool(*applier)(void *context, indexstore_unit_dependency_t));
192-
} indexstore_functions_t;
188+
} swiftbuild_indexstore_functions_t;
193189

194190
#endif

Sources/SWBUtil/IndexStore.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ private final class IndexStoreAPIImpl {
334334
private let dylib: LibraryHandle
335335

336336
/// The index store API functions.
337-
fileprivate let fn: indexstore_functions_t
337+
fileprivate let fn: swiftbuild_indexstore_functions_t
338338

339339
fileprivate func call<T>(_ fn: (inout indexstore_error_t?) -> T) throws -> T {
340340
var error: indexstore_error_t? = nil
@@ -354,7 +354,7 @@ private final class IndexStoreAPIImpl {
354354
self.path = path
355355
self.dylib = try Library.open(path)
356356

357-
var api = indexstore_functions_t()
357+
var api = swiftbuild_indexstore_functions_t()
358358
api.store_create = Library.lookup(dylib, "indexstore_store_create")
359359
api.store_get_unit_name_from_output_path = Library.lookup(dylib, "indexstore_store_get_unit_name_from_output_path")
360360
api.unit_reader_create = Library.lookup(dylib, "indexstore_unit_reader_create")

0 commit comments

Comments
 (0)