mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Okay, yes there *is* a getKeyLength method on ValueName. And, it should be
used because we *do* want to allow nulls in names. llvm-svn: 36178
This commit is contained in:
parent
279c95b9a7
commit
52d73dba41
@ -2823,7 +2823,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
|
|||||||
|
|
||||||
// Check for call to invalid intrinsic to avoid crashing later.
|
// Check for call to invalid intrinsic to avoid crashing later.
|
||||||
if (Function *theF = dyn_cast<Function>(V)) {
|
if (Function *theF = dyn_cast<Function>(V)) {
|
||||||
if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&&
|
if (theF->hasName() && (theF->getValueName()->getKeyLength() >= 5) &&
|
||||||
(0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) &&
|
(0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) &&
|
||||||
!theF->getIntrinsicID(true))
|
!theF->getIntrinsicID(true))
|
||||||
GEN_ERROR("Call to invalid LLVM intrinsic function '" +
|
GEN_ERROR("Call to invalid LLVM intrinsic function '" +
|
||||||
|
Loading…
Reference in New Issue
Block a user