From: Reid Spencer Date: Mon, 16 Apr 2007 20:35:38 +0000 (+0000) Subject: Regenerate. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=36fdde18c311805224044dcfa0d566e24a75b1a2;p=oota-llvm.git Regenerate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36156 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs index d031c3b35f1..c8f7599b80c 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(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 55440085426..263ef4c6ecc 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(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() + "'"); }