[flang-commits] [flang] [flang] Stop using Operation::getAttrs (NFC) (PR #223049)
Mehdi Amini via flang-commits
flang-commits at lists.llvm.org
Wed Sep 23 16:00:07 PDT 2026
================
@@ -3861,11 +3873,7 @@ struct GlobalOpConversion : public fir::FIROpConversion<fir::GlobalOp> {
// Apply all non-Fir::GlobalOp attributes to the LLVM::GlobalOp, preserving
// them; whilst taking care not to apply attributes that are lowered in
// other ways.
- llvm::SmallDenseSet<llvm::StringRef> elidedAttrsSet(
- global.getAttributeNames().begin(), global.getAttributeNames().end());
- for (auto &attr : global->getAttrs())
- if (!elidedAttrsSet.contains(attr.getName().strref()))
- g->setAttr(attr.getName(), attr.getValue());
+ g->setDiscardableAttrs(global->getDiscardableAttrDictionary());
----------------
joker-eph wrote:
Don't forget to approve this one if there isn't anything else to do here :)
(I'll rebase after landing the one above of course)
https://github.com/llvm/llvm-project/pull/223049
More information about the flang-commits
mailing list