[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.y.cvs
Reid Spencer
reid at x10sys.com
Mon Apr 16 13:36:00 PDT 2007
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.cpp.cvs updated: 1.86 -> 1.87
llvmAsmParser.y.cvs updated: 1.87 -> 1.88
---
Log message:
Regenerate.
---
Diffs of the changes: (+6 -6)
llvmAsmParser.cpp.cvs | 6 +++---
llvmAsmParser.y.cvs | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.86 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.87
--- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.86 Mon Apr 16 12:47:06 2007
+++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Mon Apr 16 15:35:38 2007
@@ -5488,9 +5488,9 @@
// 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: llvm/lib/AsmParser/llvmAsmParser.y.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.87 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.88
--- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.87 Mon Apr 16 12:47:06 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Mon Apr 16 15:35:38 2007
@@ -2823,9 +2823,9 @@
// 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() + "'");
}
More information about the llvm-commits
mailing list