aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BasicBlockSections.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-26 18:31:51 -0700
committerKazu Hirata <kazu@google.com>2022-06-26 18:31:51 -0700
commitd08f34b592ff06ccb1f36da88ec09aa926427a4d (patch)
tree0ea2a2b1752648cad4e0499547bc0918a303847d /llvm/lib/CodeGen/BasicBlockSections.cpp
parenteb9d21d65c65f6867ef4f142a86a4a2e4e1c4ac1 (diff)
downloadllvm-d08f34b592ff06ccb1f36da88ec09aa926427a4d.zip
llvm-d08f34b592ff06ccb1f36da88ec09aa926427a4d.tar.gz
llvm-d08f34b592ff06ccb1f36da88ec09aa926427a4d.tar.bz2
[llvm] Don't use Optional::hasValue (NFC)
This patch replaces Optional::hasValue with the implicit cast to bool in conditionals only.
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
-rw-r--r--llvm/lib/CodeGen/BasicBlockSections.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp
index e6f4e39..b6b018c 100644
--- a/llvm/lib/CodeGen/BasicBlockSections.cpp
+++ b/llvm/lib/CodeGen/BasicBlockSections.cpp
@@ -234,9 +234,8 @@ assignSections(MachineFunction &MF,
// If we already have one cluster containing eh_pads, this must be updated
// to ExceptionSectionID. Otherwise, we set it equal to the current
// section ID.
- EHPadsSectionID = EHPadsSectionID.hasValue()
- ? MBBSectionID::ExceptionSectionID
- : MBB.getSectionID();
+ EHPadsSectionID = EHPadsSectionID ? MBBSectionID::ExceptionSectionID
+ : MBB.getSectionID();
}
}