Modified the check for intrinsic functions. All intrinsic functions have to

be at least 6 characters, since something must follow the "llvm." string in the
function name.
This seems to fix an assertion failure with the SingleSource tests, too.

llvm-svn: 8418
This commit is contained in:
John Criswell 2003-09-09 16:36:09 +00:00
parent e35b8fabc4
commit 0641f1fad7

View File

@ -159,7 +159,7 @@ void Function::dropAllReferences() {
/// llvm/Intrinsics.h.
///
unsigned Function::getIntrinsicID() const {
if (getName().size() <= 5 || getName()[4] != '.' || getName()[0] != 'l' ||
if (getName().size() <= 6 || getName()[4] != '.' || getName()[0] != 'l' ||
getName()[1] != 'l' || getName()[2] != 'v' || getName()[3] != 'm')
return 0; // All intrinsics start with 'llvm.'