[PATCH] D99173: Intrinsic::getName: require a Module argument
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 9 14:02:35 PDT 2021
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: llvm/lib/IR/Function.cpp:862
+ !any_of(Tys, [](Type *T) { return isa<PointerType>(T); })) &&
+ "Intrinsic overloading on pointer types need to proved a Module");
bool HasUnnamedType = false;
----------------
proved -> provide
================
Comment at: llvm/lib/IR/Function.cpp:867-868
Result += "." + getMangledTypeStr(Ty, HasUnnamedType);
- }
assert((M || !HasUnnamedType) && "unnamed types need a module");
if (M && HasUnnamedType) {
if (!FT)
----------------
... would be more obvious here, I think.
================
Comment at: llvm/lib/IR/Function.cpp:870
if (!FT)
- FT = getType(M->getContext(), Id, Tys);
+ FT = Intrinsic::getType(M->getContext(), Id, Tys);
else
----------------
Why do we need the `Intrinsic::` prefix now? Just a style change?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99173/new/
https://reviews.llvm.org/D99173
More information about the llvm-commits
mailing list