[DSE] Minor style cleanup. NFC.

llvm-svn: 272922
This commit is contained in:
Chad Rosier 2016-06-16 17:06:04 +00:00
parent d09a21682f
commit 624fee55bc
1 changed files with 5 additions and 12 deletions

View File

@ -111,22 +111,15 @@ static bool hasMemoryWrite(Instruction *I, const TargetLibraryInfo &TLI) {
}
if (auto CS = CallSite(I)) {
if (Function *F = CS.getCalledFunction()) {
if (TLI.has(LibFunc::strcpy) &&
F->getName() == TLI.getName(LibFunc::strcpy)) {
StringRef FnName = F->getName();
if (TLI.has(LibFunc::strcpy) && FnName == TLI.getName(LibFunc::strcpy))
return true;
}
if (TLI.has(LibFunc::strncpy) &&
F->getName() == TLI.getName(LibFunc::strncpy)) {
if (TLI.has(LibFunc::strncpy) && FnName == TLI.getName(LibFunc::strncpy))
return true;
}
if (TLI.has(LibFunc::strcat) &&
F->getName() == TLI.getName(LibFunc::strcat)) {
if (TLI.has(LibFunc::strcat) && FnName == TLI.getName(LibFunc::strcat))
return true;
}
if (TLI.has(LibFunc::strncat) &&
F->getName() == TLI.getName(LibFunc::strncat)) {
if (TLI.has(LibFunc::strncat) && FnName == TLI.getName(LibFunc::strncat))
return true;
}
}
}
return false;