summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-16 22:01:57 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-16 22:01:57 +0000
commit9c9741e8642a35bf91608247e8bd702bfabbebdc (patch)
tree73f95543e8b69edc18593c9aa76a99eeb26776be
parent6f3a548ff403d0e778d39c5643be96ac5552b5d6 (diff)
downloadbcm5719-llvm-9c9741e8642a35bf91608247e8bd702bfabbebdc.tar.gz
bcm5719-llvm-9c9741e8642a35bf91608247e8bd702bfabbebdc.zip
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
-rw-r--r--llvm/lib/AsmParser/llvmAsmParser.y2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/AsmParser/llvmAsmParser.y b/llvm/lib/AsmParser/llvmAsmParser.y
index 263ef4c6ecc..a0c2e25bc5b 100644
--- a/llvm/lib/AsmParser/llvmAsmParser.y
+++ b/llvm/lib/AsmParser/llvmAsmParser.y
@@ -2823,7 +2823,7 @@ InstVal : ArithmeticOps Types ValueRef ',' ValueRef {
// Check for call to invalid intrinsic to avoid crashing later.
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)) &&
!theF->getIntrinsicID(true))
GEN_ERROR("Call to invalid LLVM intrinsic function '" +
OpenPOWER on IntegriCloud