[flang-commits] [flang] [flang][debug] Support derived types. (PR #99476)

Tom Eccles via flang-commits flang-commits at lists.llvm.org
Fri Jul 19 04:31:50 PDT 2024


https://github.com/tblah commented:

Style-wise, I would prefer something like
```
std::optional<std::pair<uint64_t, unsigned short>> getTypeSizeAndAlignment(...)
```
So that callers cannot forget to check for the error condition and we do not return anything if nothing is known.

It would be a pain to add the TODO message to every callsite. Maybe putting it in a wrapper called something like `getSizeAndAlignmentOrCrash` which unwraps the optional and prints the TODO message could be one approach.

I think this would be cleaner, but I am open to other ideas.

As for the rest, the code looks good, but please wait for review by somebody more familiar with derived types.

https://github.com/llvm/llvm-project/pull/99476


More information about the flang-commits mailing list