projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb1d74e
)
Use a more optimal way to get the name of a function. Thanks, Chris.
author
Reid Spencer
<rspencer@reidspencer.com>
Mon, 16 Apr 2007 17:45:50 +0000
(17:45 +0000)
committer
Reid Spencer
<rspencer@reidspencer.com>
Mon, 16 Apr 2007 17:45:50 +0000
(17:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36143
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/AsmParser/llvmAsmParser.y
patch
|
blob
|
history
diff --git
a/lib/AsmParser/llvmAsmParser.y
b/lib/AsmParser/llvmAsmParser.y
index 88cc7d30dde38a8e499d60d0c82f95595168e49c..55440085426e3da6424c9d5f405f967785940788 100644
(file)
--- a/
lib/AsmParser/llvmAsmParser.y
+++ b/
lib/AsmParser/llvmAsmParser.y
@@
-2823,7
+2823,8
@@
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->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() + "'");