Skip to content

[lldb] Calculate stride of clang types on emplaceClangTypeInfo. #3914

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
Feb 11, 2022

Conversation

augusto2112
Copy link

rdar://83990756

@augusto2112
Copy link
Author

@swift-ci test

@augusto2112
Copy link
Author

@swift-ci test

@@ -664,17 +664,21 @@ SwiftLanguageRuntimeImpl::emplaceClangTypeInfo(
m_clang_type_info.insert({clang_type.GetOpaqueQualType(), llvm::None});
return nullptr;
}
auto byte_align = *bit_align / 8;

Choose a reason for hiding this comment

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

is bit_align guaranteed to be a multiple of 8?

Copy link
Author

Choose a reason for hiding this comment

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

Not sure, I just moved that from a block of code below:

         swift::reflection::TypeInfo(swift::reflection::TypeInfoKind::Builtin,
                                      *byte_size, *bit_align / 8, 0, 0, true)});

I'll find out.

Copy link
Author

Choose a reason for hiding this comment

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

Do you think we have an alignment that's not expressible in bytes though?

Choose a reason for hiding this comment

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

I wouldn't think so. Sounds like this calls for an assert.

@augusto2112
Copy link
Author

Unrelated failure:

  Swift(iphonesimulator-x86_64) :: ModuleInterface/back-deploy-attr.swift

@augusto2112
Copy link
Author

@swift-ci test macOS

@augusto2112
Copy link
Author

@swift-ci test

Comment on lines +1 to +2
#ifndef bridging_header_h
#define bridging_header_h

Choose a reason for hiding this comment

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

do bridging headers need these? Normal objc doesn't need these because #import has this behavior.

print(array) //%self.expect('frame variable array[0]', substrs=['[0]', '.SampleEnumZero'])
//%self.expect('frame variable array[1]', substrs=['[1]', '.SampleEnumOne'])
//%self.expect('frame variable array[2]', substrs=['[2]', '.SampleEnumTwo'])
//FIXME: frame variable array[3] returns [.SampleEnumOne, .SampleEnumTwo]

Choose a reason for hiding this comment

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

When you find out why this is happening, I'd love to know what the reason is.

Copy link
Author

Choose a reason for hiding this comment

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

Do you mean the FIXME? I saw it when I wrote the test, I have no idea why it's happening yet.

Choose a reason for hiding this comment

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

yes the FIXME, I'd like to know what the underlying issue is

Choose a reason for hiding this comment

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

file a radar for this?

Copy link
Author

Choose a reason for hiding this comment

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

Will do

@augusto2112
Copy link
Author

@swift-ci test macOS

@augusto2112 augusto2112 merged commit adbc02c into swiftlang:stable/20211026 Feb 11, 2022
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