diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h index 9be0d98f310d..2de11ba5171e 100644 --- a/llvm/include/llvm/IR/Attributes.h +++ b/llvm/include/llvm/IR/Attributes.h @@ -855,8 +855,8 @@ public: // Iterators for target-dependent attributes. using td_type = std::pair; - using td_iterator = std::map::iterator; - using td_const_iterator = std::map::const_iterator; + using td_iterator = decltype(TargetDepAttrs)::iterator; + using td_const_iterator = decltype(TargetDepAttrs)::const_iterator; using td_range = iterator_range; using td_const_range = iterator_range; diff --git a/llvm/include/llvm/Remarks/RemarkLinker.h b/llvm/include/llvm/Remarks/RemarkLinker.h index c82c73d8c94f..7a53c30924b8 100644 --- a/llvm/include/llvm/Remarks/RemarkLinker.h +++ b/llvm/include/llvm/Remarks/RemarkLinker.h @@ -80,8 +80,7 @@ public: /// Return a collection of the linked unique remarks to iterate on. /// Ex: /// for (const Remark &R : RL.remarks() { [...] } - using iterator = - pointee_iterator>::iterator>; + using iterator = pointee_iterator; iterator_range remarks() const { return {Remarks.begin(), Remarks.end()};