};
/// Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
+ /// Note, this version is for intrinsics with no overloads. Use the other
+ /// version of getName if overloads are required.
StringRef getName(ID id);
/// Return the LLVM name for an intrinsic, such as "llvm.ppc.altivec.lvx".
+ /// Note, this version of getName supports overloads, but is less efficient
+ /// than the StringRef version of this function. If no overloads are
+ /// requried, it is safe to use this version, but better to use the StringRef
+ /// version.
std::string getName(ID id, ArrayRef<Type*> Tys);
/// Return the function type for an intrinsic.
StringRef Intrinsic::getName(ID id) {
assert(id < num_intrinsics && "Invalid intrinsic ID!");
+ assert(!isOverloaded(id) &&
+ "This version of getName does not support overloading");
return IntrinsicNameTable[id];
}