[PATCH] D134362: [clang] Fix interaction between asm labels and inline builtins
Nick Desaulniers via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 21 15:08:24 PDT 2022
nickdesaulniers accepted this revision.
nickdesaulniers added a comment.
This revision is now accepted and ready to land.
Please make sure to mark comments as "Done" in phab to help reviewers skip over stale feedback.
================
Comment at: clang/lib/CodeGen/CGExpr.cpp:5055-5059
+ std::string FDInlineName;
+ if (auto *A = FD->getAttr<AsmLabelAttr>())
+ FDInlineName = (A->getLabel() + ".inline").str();
+ else
+ FDInlineName = (FD->getName() + ".inline").str();
----------------
Might be able to DRY this up slightly more:
```
auto *A = FD->getAttr<AsmLabelAttr>();
StringRef Ident = A ? A->getLabel() : FD->getName();
std::string FDInlineName = (Ident + ".inline").str();
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134362/new/
https://reviews.llvm.org/D134362
More information about the cfe-commits
mailing list