Skip to content

Document Target and TargetData #4

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
Jan 9, 2017

Conversation

CodaFi
Copy link
Member

@CodaFi CodaFi commented Jan 9, 2017

There is an inconsistency here between the name of LLVMSizeOfTypeInBits and the LLVM documentation.

///
/// - returns: The size of the type in bytes.
public func sizeOfTypeInBits(_ type: IRType) -> Int {
return Int(LLVMSizeOfTypeInBits(llvm, type.asLLVM()))
Copy link
Member Author

Choose a reason for hiding this comment

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

"Bits, bytes, what's the difference"

  • LLVM

Copy link
Member

Choose a reason for hiding this comment

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

If LLVM's is named wrong, then maybe we should rename this method...

Copy link
Member Author

Choose a reason for hiding this comment

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

Trouble is, I'm not entirely sure which is actually correct.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, it's bits.

Copy link
Member

Choose a reason for hiding this comment

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

print(module.dataLayout.sizeOfTypeInBits(IntType.int64))
// 64

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, forgot to update the footer text.

}

/// The model generated code should follow. This enables particular styles of
Copy link
Member

Choose a reason for hiding this comment

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

I think this could benefit from 'that' or 'which'

@harlanhaskins
Copy link
Member

I'll merge it once you run jazzy again

@harlanhaskins harlanhaskins merged commit 2347434 into llvm-swift:master Jan 9, 2017
@CodaFi CodaFi deleted the target-acquired branch January 9, 2017 20:49
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