Open joelimgu opened 7 months ago
Not the maintainer, but wanted to note a few things:
DataLayout.h
/DataLayout.cpp
files. getTypeStoreSize
and getTypeAllocSize
for exampleI've taken into account your comments, and added some tests, the CI is not working on the repo bc a maintainer needs to allow it but it runs on my repo for all llvm versions now. Let me know if you have any other remarks, I am happy to apply them!
If not we'll wait for the owner to respond and hopefully merge it if everything is ok! (I might need to clean the git history a bit I've made a mess).
This pull requests continues the work of @langston-barrett in #34 . I have taken into account the concerns you expressed in that pull request and rebased it to the current main branch.
I was not able to to address this concern: Can we have a comment pointing to the upstream function this is a port of, similar to how you did for getTypeSizeInBits? as I am not sure if this function is equivalent to the llvm function I have been able to identify (https://llvm.org/doxygen/DataLayout_8cpp_source.html#l00553).
And I would like feedback on how to deal with Type::TargetExtType as we don't have access to the type's data as explained in the enum.
I am no expert on llvm so any feedback is appreciated.
As a last note, I've seen the confusion between bits and bites multiple times in the code (I've hopefully fixed them), but upon successful validation of this code, a bit and byte types should be created moving forward.