[PATCH] D99173: Intrinsic::getName: require a Module argument

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 17 14:10:36 PDT 2021


efriedma added a comment.

I don't really have any opinion on the name; otherwise looks fine.



================
Comment at: llvm/include/llvm/IR/Intrinsics.h:66
   /// overloads are required, it is safe to use this version, but better to use
-  /// the StringRef version. A function type FT can be provided to avoid
-  /// computing it. It is used (or computed) if one of the types is based on an
-  /// unnamed type.
-  std::string getName(ID Id, ArrayRef<Type *> Tys, Module *M, FunctionType *FT);
+  /// the StringRef version.It is recommended to always provide M, as it is
+  /// mandatory to support overloads on unnamed types. If one of the types is
----------------
I'd prefer to just say "M" is mandatory, rather than "recommended"; getNameNoUnnamedTypes is still available if anyone really needs it.


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

https://reviews.llvm.org/D99173



More information about the llvm-commits mailing list