[PATCH] D141324: [clang] extend external_source_symbol attribute with the USR clause

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 19 12:49:33 PST 2023


erichkeane added inline comments.


================
Comment at: clang/utils/TableGen/ClangAttrEmitter.cpp:3318
+    for (const auto &Spelling : Attr->getValueAsListOfDefs("Spellings")) {
+      if (Spelling->getValueAsString("Variety") == Variety ||
+          Spelling->getValueAsString("Variety") == "Clang") {
----------------
arphaman wrote:
> erichkeane wrote:
> > Why is this =="Clang" specific?  Since you've added the Version to the spelling, I'd anticipate us to just be able to grab it for the current spelling.  I wouldn't want an individual spelling here to override it, particularly since with this change Clang could potentially override the standards version.
> I needed it since there's no specific "Clang" variety that's being called for this function. Otherwise the "GNU" variety passed to the function doesn't match "Clang" variety in the record. What's the best way to compute the current spelling in this case?
Hmm... that is strange.  I would have expected this to be called for each of the individual spellings, it doesn't really make sense that it wouldn't pick it up from the base 'Spellings'.  I've unfortunately not debugged this code generation in a while.  BUT, we care about the 'version' on a per-spelling basis, so it would presumably need to 'pick' an actual spelling.


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

https://reviews.llvm.org/D141324



More information about the cfe-commits mailing list