This patch adds a helper method to determine if a nonvirtual base has an entry in the LLVM struct. Such a base may not have an entry
if the base does not have any fields/bases itself that would change the size of the struct. This utility method is useful for other frontends (Polygeist) that use Clang as an API to generate code.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm not against this, I guess... but clang/lib/CodeGen/CGRecordLayout.h isn't an installed header; it's not clear to me how you're using this.
Comment Actions
Polygeist is a (hopefully soon to be LLVM incubator project: https://discourse.llvm.org/t/rfc-polygeist-llvm-incubator-proposal/60890), that, among other things, is a Clang-based C/C++ frontend for MLIR. As such, we kind of expect to be built alongside clang and borrow the header. As the project gets closer to upstream, hopefully the include sharing will actually be more explicit (and will be made an upstream PR regardless after some other technical debt and paper deadlines).
The relevant code that needs this from our side is here, if curious: https://github.com/wsmoses/Polygeist/pull/198/files