Skip to content

[lldb] Wire up reflection support for Builtin.FixedArray #9928

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

Conversation

adrian-prantl
Copy link

No description provided.

@adrian-prantl adrian-prantl requested a review from a team as a code owner January 30, 2025 23:42
Copy link

@augusto2112 augusto2112 left a comment

Choose a reason for hiding this comment

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

Looks good to me with 1 fix.

At some point it would be nice to split these functions into smaller functions that deal with the different type info types. GetChildCompilerTypeAtIndex will be almost 400 lines long with this change.

return llvm::createStringError("Expected fixed array, but found: " +
type.GetMangledTypeName().GetString());
return ts->RemangleAsType(dem, dem_array_type->getChild(1),
ts->GetManglingFlavor());

Choose a reason for hiding this comment

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

    auto flavor = SwiftLanguageRuntime::GetManglingFlavor(
            type.GetMangledTypeName().GetStringRef());
    return ts->RemangleAsType(dem, dem_array_type->getChild(1), flavor);

Copy link
Author

Choose a reason for hiding this comment

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

At some point it would be nice to split these functions into smaller functions that deal with the different type info types. GetChildCompilerTypeAtIndex will be almost 400 lines long with this change.

I think the way to go is to factor out common code between GetChildCompilerTypeAtIndex, GetNumChildren, and GetChildMembeWithName.

No test in the testsuite triggeres this code path, except for the new
ValueGeneric tes, which triggers it for entirely the wrong reason. I
added a new test that exercises the case that is mentioned in the
comment to make sure that this is indeed obsolete.
@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test

@adrian-prantl
Copy link
Author

@swift-ci test windows

@adrian-prantl
Copy link
Author

@swift-ci test macos

@adrian-prantl
Copy link
Author

test with swiftlang/swift#79088
@swift-ci test

@adrian-prantl adrian-prantl merged commit 20fe415 into swiftlang:stable/20240723 Feb 1, 2025
2 of 3 checks passed
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.

2 participants