Skip to content

Commit

Permalink
Update LLVM and Swift files for Swift 6
Browse files Browse the repository at this point in the history
Updated some files from https://github.com/apple/llvm-project and
https://github.com/swiftlang/swift.

I'm not confident that I did this correctly, but the tests do pass and
this does fix
#60.

```
$ swift --version
swift-driver version: 1.111.2 Apple Swift version 6.0 (swiftlang-6.0.0.5.15 clang-1600.0.22.6)
Target: arm64-apple-macosx14.0
$ swift test
Building for debugging...
ld: warning: duplicate -rpath '/Applications/Xcode-16.0.0-Beta.3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib' ignored
[67/67] Linking IndexStorePackageTests
Build complete! (7.53s)
Test Suite 'All tests' started at 2024-07-11 13:12:09.222.
Test Suite 'IndexStorePackageTests.xctest' started at 2024-07-11 13:12:09.223.
Test Suite 'IndexStoreTests' started at 2024-07-11 13:12:09.223.
Test Case '-[IndexStoreTests.IndexStoreTests testExerciseIndexStore]' started.
Test Case '-[IndexStoreTests.IndexStoreTests testExerciseIndexStore]' passed (0.506 seconds).
Test Case '-[IndexStoreTests.IndexStoreTests testMissingIndexStore]' started.
Test Case '-[IndexStoreTests.IndexStoreTests testMissingIndexStore]' passed (0.000 seconds).
Test Suite 'IndexStoreTests' passed at 2024-07-11 13:12:09.729.
	 Executed 2 tests, with 0 failures (0 unexpected) in 0.506 (0.506) seconds
Test Suite 'SwiftDemangleTests' started at 2024-07-11 13:12:09.729.
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testBreathFirstSequence]' started.
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testBreathFirstSequence]' passed (0.000 seconds).
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testDemangle]' started.
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testDemangle]' passed (0.000 seconds).
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testObjCUSR]' started.
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testObjCUSR]' passed (0.000 seconds).
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testSwiftExtensionUSR]' started.
Test Case '-[SwiftDemangleTests.SwiftDemangleTests testSwiftExtensionUSR]' passed (0.000 seconds).
Test Suite 'SwiftDemangleTests' passed at 2024-07-11 13:12:09.730.
	 Executed 4 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'IndexStorePackageTests.xctest' passed at 2024-07-11 13:12:09.730.
	 Executed 6 tests, with 0 failures (0 unexpected) in 0.507 (0.507) seconds
Test Suite 'All tests' passed at 2024-07-11 13:12:09.730.
	 Executed 6 tests, with 0 failures (0 unexpected) in 0.507 (0.508) seconds
```

This will fail on CI until it is updated to Swift 6.

Signed-off-by: JP Simard <[email protected]>
  • Loading branch information
jpsim committed Jul 11, 2024
1 parent 53a322b commit 78f6b4c
Show file tree
Hide file tree
Showing 6 changed files with 276 additions and 65 deletions.
6 changes: 5 additions & 1 deletion Sources/CIndexStore/include/indexstore.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* INDEXSTORE_VERSION_MAJOR is intended for "major" source/ABI breaking changes.
*/
#define INDEXSTORE_VERSION_MAJOR 0
#define INDEXSTORE_VERSION_MINOR 13
#define INDEXSTORE_VERSION_MINOR 15 /* added Swift init accessor sub-symbol */

#define INDEXSTORE_VERSION_ENCODE(major, minor) ( \
((major) * 10000) \
Expand Down Expand Up @@ -128,6 +128,8 @@ typedef struct {
INDEXSTORE_PUBLIC unsigned
indexstore_format_version(void);

INDEXSTORE_PUBLIC unsigned indexstore_version(void);

typedef void *indexstore_t;
typedef void *indexstore_creation_options_t;

Expand Down Expand Up @@ -280,6 +282,7 @@ typedef enum {
INDEXSTORE_SYMBOL_KIND_CONVERSIONFUNCTION = 24,
INDEXSTORE_SYMBOL_KIND_PARAMETER = 25,
INDEXSTORE_SYMBOL_KIND_USING = 26,
INDEXSTORE_SYMBOL_KIND_CONCEPT = 27,

INDEXSTORE_SYMBOL_KIND_COMMENTTAG = 1000,
} indexstore_symbol_kind_t;
Expand Down Expand Up @@ -310,6 +313,7 @@ typedef enum {
INDEXSTORE_SYMBOL_SUBKIND_SWIFTGENERICTYPEPARAM = 1013,
INDEXSTORE_SYMBOL_SUBKIND_SWIFTACCESSORREAD = 1014,
INDEXSTORE_SYMBOL_SUBKIND_SWIFTACCESSORMODIFY = 1015,
INDEXSTORE_SYMBOL_SUBKIND_SWIFTACCESSORINIT = 1016,
} indexstore_symbol_subkind_t;

INDEXSTORE_OPTIONS(uint64_t, indexstore_symbol_property_t) {
Expand Down
Loading

0 comments on commit 78f6b4c

Please sign in to comment.