This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Add new DI Flag IsZeroSize for D101237 [[no_unique_address]]
Changes PlannedPublic

Authored by jankratochvil on Jun 9 2021, 8:00 AM.

Details

Reviewers
aprantl
deadalnix
Summary

It is non-trivial as I have tried to reuse the ReservedBit4 so posting as a separate patch for D101237.

Diff Detail

Event Timeline

jankratochvil created this revision.Jun 9 2021, 8:00 AM
jankratochvil requested review of this revision.Jun 9 2021, 8:00 AM

DICompositeType has a "SizeInBits" field - can that be used to specify a size of 0, instead of adding a new flag to convey this?

In C and Swift we express zero-sized types by just setting their bitsize to 0. Why doesn't this work for OCaml?

deadalnix added inline comments.Oct 14 2021, 8:39 AM
llvm/include/llvm-c/DebugInfo.h
34

If you change the C API, please make sure you add a note about it. It would also be preferable to add a test case.

Other already have asked question about the approach here, so I won't double down there.

jankratochvil planned changes to this revision.Oct 14 2021, 8:48 AM