[llvm] [AST] Don't merge memory locations in AliasSetTracker (PR #65731)
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 9 13:15:55 PDT 2023
================
@@ -207,66 +118,21 @@ class AliasSet : public ilist_node<AliasSet> {
// Alias Set iteration - Allow access to all of the pointers which are part of
// this alias set.
- class iterator;
- iterator begin() const { return iterator(PtrList); }
- iterator end() const { return iterator(); }
- bool empty() const { return PtrList == nullptr; }
+ using iterator = std::vector<MemoryLocation>::const_iterator;
+ iterator begin() const { return MemoryLocs.begin(); }
+ iterator end() const { return MemoryLocs.end(); }
----------------
jdoerfert wrote:
Would it reduce the casts for the user if we had non-const iterators?
https://github.com/llvm/llvm-project/pull/65731
More information about the llvm-commits
mailing list