forked from OSchip/llvm-project
Don't return 0 if the len == 5, let the assert handle that case.
Thanks, Chris. llvm-svn: 36139
This commit is contained in:
parent
17a2ef6803
commit
78d71f168c
|
@ -231,7 +231,7 @@ unsigned Function::getIntrinsicID(bool noAssert) const {
|
|||
unsigned Len = ValName->getKeyLength();
|
||||
const char *Name = ValName->getKeyData();
|
||||
|
||||
if (Len <= 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l'
|
||||
if (Len < 5 || Name[4] != '.' || Name[0] != 'l' || Name[1] != 'l'
|
||||
|| Name[2] != 'v' || Name[3] != 'm')
|
||||
return 0; // All intrinsics start with 'llvm.'
|
||||
|
||||
|
|
Loading…
Reference in New Issue