aaron.ballman added subscribers: akhuang, bwyma, zturner. aaron.ballman added a comment.
In D146595#4225702 <https://reviews.llvm.org/D146595#4225702>, @aprantl wrote: > In D146595#4225630 <https://reviews.llvm.org/D146595#4225630>, @aaron.ballman > wrote: > >> It's less about other debug formats and more about user experience. My two >> big concerns are: 1) writing multiple attributes to do the same thing is >> somewhat user-hostile unless "the same thing" is actually different in some >> way users will care about, 2) we have a policy that user-facing attributes >> that do nothing are diagnosed as being ignored, so if we don't support >> Windows for this attribute, then compiling on that platform is going to >> generate a pile of "attribute ignored" warnings. If we can support the >> attribute with PDB as well, that solves both of my big concerns because it >> makes this attribute generally useful (which is what we aim for with >> attributes when possible). > > That's a valid concern. However, in its current form it would still get > lowered into LLVM IR, and LLVM may or may not silently ignore the attribute > when lowering to PDB. It could be argued that that's even worse than warning > about an ignored attribute. I just wanted to point this out. That's the same for basically any LLVM IR metadata/attributes. We try our best from the FE to warn users if we know something is going to be ignored, but we don't have a diagnostic that is *guaranteed* to fire if the attribute doesn't do anything useful (then you run into all sorts of fun situations like: what if the attribute that does nothing is written on a function that is never called and so it's dead code stripped away?). >> I don't want to sign y'all up for more work you can't easily do yourself, so >> I don't want to block on support for Windows unless it turns out to be >> completely trivial to support. But from a review POV, I'd like to hear back >> from someone who knows something about PDB to validate that the attribute >> doesn't require a breaking change for support there (like going from taking >> no args to requiring an arg for some reason, basically). If we don't think >> breaking changes should be needed, then I think documentation + diagnostics >> will be sufficient for me. >> >> I did have two questions though: >> What happens when stepping into the attributed function through a function >> pointer? >> Are there any special situations where a function cannot/should not be >> marked with the attribute (virtual functions, lambda, blocks)? > > @rnk Do you happen to know anything about how PDB handles these? CC @akhuang @zturner @bwyma as other folks who might have ideas here as well (or know folks who do). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146595/new/ https://reviews.llvm.org/D146595 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits