Remove Value::getNameLen

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77148 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2009-07-26 08:34:35 +00:00
parent 92fbbc7588
commit f0443c1eb4
6 changed files with 62 additions and 120 deletions

View File

@ -800,15 +800,11 @@ bool llvm::CannotBeNegativeZero(const Value *V, unsigned Depth) {
if (const CallInst *CI = dyn_cast<CallInst>(I))
if (const Function *F = CI->getCalledFunction()) {
if (F->isDeclaration()) {
switch (F->getNameLen()) {
case 3: // abs(x) != -0.0
if (!strcmp(F->getNameStart(), "abs")) return true;
break;
case 4: // abs[lf](x) != -0.0
if (!strcmp(F->getNameStart(), "absf")) return true;
if (!strcmp(F->getNameStart(), "absl")) return true;
break;
}
// abs(x) != -0.0
if (F->getName() == "abs") return true;
// abs[lf](x) != -0.0
if (F->getName() == "absf") return true;
if (F->getName() == "absl") return true;
}
}