[PATCH] D111770: [DebugInfo] When the enum type causes ODR violation, skip ODRUniquing

Yuanfang Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 22 14:39:28 PDT 2021


ychen marked 2 inline comments as done.
ychen added a comment.

In D111770#3081290 <https://reviews.llvm.org/D111770#3081290>, @probinson wrote:

> I'm not a verifier expert, but I'm also not convinced the verifier change is doing quite the right thing.  Yes, it finds the case we ran into, but it seems like it's just checking for that one bogus case where the containing scope is incorrectly an enum.  It seems to me that proper scope-checking should be looking for the tag to be something that we agree should be allowed to be a scope, rather than looking for the tag to be one thing (of many?) that we agree should not be a scope.

Yeah, I think the function name "verifyScopeOperand" is misleading in that it was not meant to check scope operand in general, but only for when an ODR type is the scope operand. So I renamed it to "verifyODRTypeAsScopeOperand" instead and add a TODO for the general case.  And all of the supported tags for DICompositeType, I'm only sure that enum could not be a scope. The modified unit test does the basic checking that mismatched tags do not unique with each other. Does this sound good to you?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111770



More information about the llvm-commits mailing list