Skip to content

Change the backing base name type of DeclName to DeclBaseName #8019

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
Mar 11, 2017

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 10, 2017

The new DeclBaseName type will later be able to hold either normal identifiers (as they exist now) or special names that don't have an identifier (like subscripts)

The TODO in this PR will be addressed in PRs for subsequent commits of #6848.

static inline swift::DeclBaseName getFromVoidPointer(void *P) {
return swift::Identifier::getFromOpaquePointer(P);
}
enum { NumLowBitsAvailable = 2 };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be PointerLikeTypeTraits<swift::Identifier>::NumLowBitsAvailable.

return const_cast<void *>(D.getAsOpaquePointer());
}
static inline swift::DeclBaseName getFromVoidPointer(void *P) {
return swift::Identifier::getFromOpaquePointer(P);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit weird that these two aren't symmetrical.

Copy link
Member Author

@ahoppen ahoppen Mar 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, the second one was meant to be swift::DeclBaseName::getFromOpaquePointer(P)

The new DeclBaseName type will later be able to hold either normal
identifiers (as they exist now) or special names that don't have an
identifier (like subscripts)
@ahoppen ahoppen force-pushed the backing-type-of-DeclName branch from 6cbb8ec to 4f0ab96 Compare March 10, 2017 21:45
@ahoppen
Copy link
Member Author

ahoppen commented Mar 10, 2017

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Jenkins build - Swift Test Linux Platform
Git Commit - 4f0ab96
Test requested by - @ahoppen

@ahoppen
Copy link
Member Author

ahoppen commented Mar 11, 2017

Let's try Linux again

@swift-ci please test Linux platform

@ahoppen ahoppen merged commit 983ac9f into swiftlang:master Mar 11, 2017
@ahoppen ahoppen deleted the backing-type-of-DeclName branch June 26, 2017 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants