Skip to content

Add size for indexstoredb_symbol_role_t #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions Sources/IndexStoreDB/SymbolRole.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ public struct SymbolRole: OptionSet, Hashable, Sendable {

// MARK: Additional IndexStoreDB index roles

// Note: the imported constant INDEXSTOREDB_SYMBOL_ROLE_CANONICAL is signed by default and
// fails to construct in Swift.
public static let canonical: SymbolRole = SymbolRole(rawValue: 1 << 63)
public static let canonical: SymbolRole = SymbolRole(rawValue: INDEXSTOREDB_SYMBOL_ROLE_CANONICAL)

public static let all: SymbolRole = SymbolRole(rawValue: ~0)

Expand Down
4 changes: 2 additions & 2 deletions include/CIndexStoreDB/CIndexStoreDB.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ typedef void *indexstoredb_symbol_location_t;
typedef void *indexstoredb_symbol_relation_t;
typedef void *indexstoredb_unit_info_t;

typedef enum {
typedef enum : uint64_t {
INDEXSTOREDB_SYMBOL_ROLE_DECLARATION = 1 << 0,
INDEXSTOREDB_SYMBOL_ROLE_DEFINITION = 1 << 1,
INDEXSTOREDB_SYMBOL_ROLE_REFERENCE = 1 << 2,
Expand All @@ -82,7 +82,7 @@ typedef enum {
INDEXSTOREDB_SYMBOL_ROLE_REL_IBTYPEOF = 1 << 17,
INDEXSTOREDB_SYMBOL_ROLE_REL_SPECIALIZATIONOF = 1 << 18,

INDEXSTOREDB_SYMBOL_ROLE_CANONICAL = 1 << 63,
INDEXSTOREDB_SYMBOL_ROLE_CANONICAL = (uint64_t)1 << 63,
} indexstoredb_symbol_role_t;

typedef enum {
Expand Down