-
Notifications
You must be signed in to change notification settings - Fork 57
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
Conversation
/// | ||
/// - returns: The size of the type in bytes. | ||
public func sizeOfTypeInBits(_ type: IRType) -> Int { | ||
return Int(LLVMSizeOfTypeInBits(llvm, type.asLLVM())) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, it's bits.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
cfcda96
to
84ed41c
Compare
} | ||
|
||
/// The model generated code should follow. This enables particular styles of |
There was a problem hiding this comment.
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'
84ed41c
to
2a27103
Compare
2a27103
to
3b6ac21
Compare
I'll merge it once you run jazzy again |
There is an inconsistency here between the name of
LLVMSizeOfTypeInBits
and the LLVM documentation.