[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.y
Reid Spencer
reid at x10sys.com
Mon Apr 16 10:46:11 PDT 2007
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.y updated: 1.340 -> 1.341
---
Log message:
Use a more optimal way to get the name of a function. Thanks, Chris.
---
Diffs of the changes: (+2 -1)
llvmAsmParser.y | 3 ++-
1 files changed, 2 insertions(+), 1 deletion(-)
Index: llvm/lib/AsmParser/llvmAsmParser.y
diff -u llvm/lib/AsmParser/llvmAsmParser.y:1.340 llvm/lib/AsmParser/llvmAsmParser.y:1.341
--- llvm/lib/AsmParser/llvmAsmParser.y:1.340 Mon Apr 16 01:55:42 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y Mon Apr 16 12:45:50 2007
@@ -2823,7 +2823,8 @@
// Check for call to invalid intrinsic to avoid crashing later.
if (Function *theF = dyn_cast<Function>(V)) {
- if (theF->hasName() && 0 == strncmp(theF->getName().c_str(), "llvm.", 5)&&
+ if (theF->hasName() &&
+ 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