diff options
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.cpp.cvs')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.cpp.cvs | 6 |
1 files changed, 3 insertions, 3 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() + "'"); } |