diff options
author | Snehasish Kumar <snehasishk@google.com> | 2021-04-22 17:38:13 -0700 |
---|---|---|
committer | Snehasish Kumar <snehasishk@google.com> | 2021-04-23 10:00:38 -0700 |
commit | 3da0aeea080f84ebc5e3059403f799469b93b773 (patch) | |
tree | b61980a65d45ea4949a80063633f5c6f78d41917 /llvm/lib/CodeGen/MachineFunctionSplitter.cpp | |
parent | df82fa8d9ba6891c0ad1061fc452ea9f271d8ad4 (diff) | |
download | llvm-3da0aeea080f84ebc5e3059403f799469b93b773.zip llvm-3da0aeea080f84ebc5e3059403f799469b93b773.tar.gz llvm-3da0aeea080f84ebc5e3059403f799469b93b773.tar.bz2 |
[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.
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunctionSplitter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunctionSplitter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineFunctionSplitter.cpp b/llvm/lib/CodeGen/MachineFunctionSplitter.cpp index 2bb69e0..0e0eb8b 100644 --- a/llvm/lib/CodeGen/MachineFunctionSplitter.cpp +++ b/llvm/lib/CodeGen/MachineFunctionSplitter.cpp @@ -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; |