Regenerate.
authorReid Spencer <rspencer@reidspencer.com>
Mon, 16 Apr 2007 20:35:38 +0000 (20:35 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 16 Apr 2007 20:35:38 +0000 (20:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36156 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/llvmAsmParser.cpp.cvs
lib/AsmParser/llvmAsmParser.y.cvs

index d031c3b35f1caa23d351318127e56de673509c3f..c8f7599b80cc5b9b47b12a1bcc6cde3f30ddd297 100644 (file)
@@ -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() + "'");
     }
index 55440085426e3da6424c9d5f405f967785940788..263ef4c6eccb208764effac73023cd1eb9a2031f 100644 (file)
@@ -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() + "'");
     }