hoy added a comment. In D98799#2757959 <https://reviews.llvm.org/D98799#2757959>, @dblaikie wrote:
>> I took another look. I think the divergence comes from >> getAs<FunctionProtoType> vs hasPrototype. The debug data generation uses >> hasPrototype while getAs<FunctionProtoType> is used as overloadable >> attribute processing as long as unique linkage name processing before this >> change. More specifically, the following function definition is represented >> by FunctionProtoType while it does not hasPrototype. > > Ah, sorry, maybe I'm coming around to this - so you're saying that the test > in `ItaniumMangleContextImpl::isUniqueInternalLinkageDecl` must match the > check in `CGDebugInfo::collectFunctionDeclProps` And when they diverge > something bad happens? (could you refresh me on what that breaks - something > crashes in ObjectiveC test cases? Or the tests fail?) > > I wonder whether we should change both of them then? Yes, from AutoFDO point of view they should match, since both ELF symbol names and debug names are used to generate profiles. The current patch unifies them but it causes divergence from overloadable. Previously, `ItaniumMangleContextImpl::isUniqueInternalLinkageDecl` was consistent with overloadable. I tried to unify in the other way so that all the three places are consistent, i.e, using `FD->getType()->getAs<FunctionProtoType>()` everywhere and it caused the following tests to fail: Clang :: CodeGenCXX/cp-blocks-linetables.cpp Clang :: CodeGenCXX/debug-info-block-invocation-linkage-name.cpp Clang :: CodeGenCXX/debug-info-blocks.cpp Clang :: CodeGenObjCXX/nested-ehlocation.mm Clang :: CodeGenObjCXX/property-objects.mm Clang :: CodeGenObjCXX/synthesized-property-cleanup.mm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98799/new/ https://reviews.llvm.org/D98799 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits