[Lldb-commits] [PATCH] D143958: [NFC][IR] Make Module::getAliasList() private

Arthur Eubanks via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 13 16:17:06 PST 2023


aeubanks added inline comments.


================
Comment at: llvm/include/llvm/IR/Module.h:566
 
+  /// Detaches \p Alias from the list but does not delete it.
+  void removeAlias(GlobalAlias *Alias) { AliasList.remove(Alias); }
----------------
use the imperative `Detach` instead of `Detaches` (same below)


================
Comment at: llvm/include/llvm/IR/Module.h:573
+  /// Inserts \p Alias into the alias list before \p Where and takes ownership.
+  void insertAlias(AliasListType::iterator Where, GlobalAlias *Alias) {
+    AliasList.insert(Where, Alias);
----------------
vporpo wrote:
> aeubanks wrote:
> > this isn't used outside tests, remove?
> Isn't it better to keep it for completeness? I don't feel strongly about it though, either way is fine with me.
I think it's better to add it only if we actually use it. Besides, I don't think people generally care about the order of aliases.


================
Comment at: llvm/include/llvm/IR/Module.h:576
+  }
+  // Please use alias_size() to get the size of AliasList.
+  // Please use aliases() to get a range of all tha Alias objects in AliasList.
----------------
I'd drop the `Please`


================
Comment at: llvm/include/llvm/IR/Module.h:577
+  // Please use alias_size() to get the size of AliasList.
+  // Please use aliases() to get a range of all tha Alias objects in AliasList.
+
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143958



More information about the lldb-commits mailing list