aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-04-16 20:35:38 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-04-16 20:35:38 +0000
commit36fdde18c311805224044dcfa0d566e24a75b1a2 (patch)
treefcb8c70df02afc66fb66de44d747593b18547df7
parent43e607303be9c3162c1d06af180efb3bdafadc02 (diff)
Regenerate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36156 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/AsmParser/llvmAsmParser.cpp.cvs6
-rw-r--r--lib/AsmParser/llvmAsmParser.y.cvs6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs
index d031c3b35f..c8f7599b80 100644
--- a/lib/AsmParser/llvmAsmParser.cpp.cvs
+++ b/lib/AsmParser/llvmAsmParser.cpp.cvs
@@ -5488,9 +5488,9 @@ yyreduce:
// Check for call to invalid intrinsic to avoid crashing later.
if (Function *theF = dyn_cast<Function>(V)) {
- if (theF->hasName() &&
- 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) &&
- !theF->getIntrinsicID(true))
+ if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&&
+ (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) &&
+ !theF->getIntrinsicID(true))
GEN_ERROR("Call to invalid LLVM intrinsic function '" +
theF->getName() + "'");
}
diff --git a/lib/AsmParser/llvmAsmParser.y.cvs b/lib/AsmParser/llvmAsmParser.y.cvs
index 5544008542..263ef4c6ec 100644
--- a/lib/AsmParser/llvmAsmParser.y.cvs
+++ b/lib/AsmParser/llvmAsmParser.y.cvs
@@ -2823,9 +2823,9 @@ 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() &&
- 0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5) &&
- !theF->getIntrinsicID(true))
+ if (theF->hasName() && (strlen(theF->getValueName()->getKeyData()) >= 5)&&
+ (0 == strncmp(theF->getValueName()->getKeyData(), "llvm.", 5)) &&
+ !theF->getIntrinsicID(true))
GEN_ERROR("Call to invalid LLVM intrinsic function '" +
theF->getName() + "'");
}