[SCCP] Use the `hasAddressTaken()` version defined in `Function`.

Instead of using the SCCP homegrown one. We should eventually
make the private SCCP version disappear, but that wont' be today.
PR33143 tracks this issue.

Add braces for consistency while here. No functional change intended.

llvm-svn: 303706
This commit is contained in:
Davide Italiano 2017-05-23 23:59:23 +00:00
parent f664a24aa3
commit c4861adad9
1 changed files with 2 additions and 1 deletions

View File

@ -1779,8 +1779,9 @@ static bool runIPSCCP(Module &M, const DataLayout &DL,
// arguments and return value aggressively, and can assume it is not called
// unless we see evidence to the contrary.
if (F.hasLocalLinkage()) {
if (AddressIsTaken(&F))
if (F.hasAddressTaken()) {
AddressTakenFunctions.insert(&F);
}
else {
Solver.AddArgumentTrackedFunction(&F);
continue;