diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-04-16 22:01:57 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-04-16 22:01:57 +0000 |
commit | ce1e8efc43760fa2bba06bb07e26217bc02d2a8c (patch) | |
tree | 399626326f0c63799dfe0da699f17e7f5eebdde4 | |
parent | c3987095259e2c80f0bb015e61b2b766db63b33f (diff) | |
download | external_llvm-ce1e8efc43760fa2bba06bb07e26217bc02d2a8c.zip external_llvm-ce1e8efc43760fa2bba06bb07e26217bc02d2a8c.tar.gz external_llvm-ce1e8efc43760fa2bba06bb07e26217bc02d2a8c.tar.bz2 |
Okay, yes there *is* a getKeyLength method on ValueName. And, it should be
used because we *do* want to allow nulls in names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36178 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AsmParser/llvmAsmParser.y | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AsmParser/llvmAsmParser.y b/lib/AsmParser/llvmAsmParser.y index 263ef4c..a0c2e25 100644 --- a/lib/AsmParser/llvmAsmParser.y +++ b/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 '" + |