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

Jeroen Dobbelaere via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 28 07:11:33 PDT 2021


jeroen.dobbelaere marked an inline comment as done.
jeroen.dobbelaere added inline comments.


================
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
----------------
efriedma wrote:
> I'd prefer to just say "M" is mandatory, rather than "recommended"; getNameNoUnnamedTypes is still available if anyone really needs it.
I removed the mentioning of M in the documentation and added an assertion check.



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

https://reviews.llvm.org/D99173



More information about the llvm-commits mailing list