[PATCH] D43267: MIRParser: Accept overloaded intrinsic names w/o type suffixes

Roman Tereshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 14:30:46 PST 2018


rtereshin added a comment.

Ping



================
Comment at: lib/IR/Function.cpp:528
-  bool IsPrefixMatch = Name.size() > strlen(NameTable[Idx]);
-  return IsPrefixMatch == isOverloaded(ID) ? ID : Intrinsic::not_intrinsic;
 }
----------------
This would return `not_intrinsic` if it's an exact match, but the intrinsic happens to be overloaded.


================
Comment at: lib/IR/Function.cpp:530
+  bool IsExactMatch = Name.size() == MatchSize;
+  return IsExactMatch || isOverloaded(ID) ? ID : Intrinsic::not_intrinsic;
 }
----------------
If it's an exact match, this will return the `ID` regardless of the intrinsic being overloaded or not.


Repository:
  rL LLVM

https://reviews.llvm.org/D43267





More information about the llvm-commits mailing list