mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-30 19:35:54 +00:00
Use a more optimal way to get the name of a function. Thanks, Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36143 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
eb1d74e0c8
commit
5b35fbe6b9
@ -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() + "'");
|
||||
|
Loading…
x
Reference in New Issue
Block a user