[PATCH] D105604: Generate DW_TAG_class_type when calling DIBuilder::createClassType().

Koutheir Attouchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 17:33:20 PDT 2021


koutheir added a comment.

> What's the motivation behind this change?

Correctness.

> Most language frontends are not using this API but instead use createReplaceableCompositeType() to deal with recursive data structures.

At a certain point, I considered using this API. If you believe the API should never be used, then maybe it should be deprecated then removed.

> However, we still need to be careful, since this has the potential to break many downstream language frontends that rely on the current behavior.

The current behavior produces wrong metadata, as far as DWARF is concerned. Relying on the old behavior will break things, but it also means producing correct metadata in the future.

> Also, the patch would need a testcase.

Once the reviewers agree this change makes sense, I'll create a small test case to avoid future regressions, and update this patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105604/new/

https://reviews.llvm.org/D105604



More information about the llvm-commits mailing list