forked from OSchip/llvm-project
[NFC] Use hasSection instead of getSection().empty()
Use the optimized check hasSection() instead of calling getSection().empty(). Originally suggested in D101004, but was dropped in the commit.
This commit is contained in:
parent
df82fa8d9b
commit
3da0aeea08
|
@ -101,7 +101,7 @@ bool MachineFunctionSplitter::runOnMachineFunction(MachineFunction &MF) {
|
|||
// since the split part may not be placed in a contiguous region. It may also
|
||||
// be more beneficial to augment the linker to ensure contiguous layout of
|
||||
// split functions within the same section as specified by the attribute.
|
||||
if (!MF.getFunction().getSection().empty() ||
|
||||
if (MF.getFunction().hasSection() ||
|
||||
MF.getFunction().hasFnAttribute("implicit-section-name"))
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue