aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/BasicBlockSections.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2022-06-20 10:38:12 -0700
committerKazu Hirata <kazu@google.com>2022-06-20 10:38:12 -0700
commite0e687a615c1fdb6ba034fc2e48b0834a372706f (patch)
tree79455a1fe4a3d455cbd304ca0c7c77dde47e1f61 /llvm/lib/CodeGen/BasicBlockSections.cpp
parente363c5963dc3ad5d9492d3f37055ad56a84411a5 (diff)
downloadllvm-e0e687a615c1fdb6ba034fc2e48b0834a372706f.zip
llvm-e0e687a615c1fdb6ba034fc2e48b0834a372706f.tar.gz
llvm-e0e687a615c1fdb6ba034fc2e48b0834a372706f.tar.bz2
[llvm] Don't use Optional::hasValue (NFC)
Diffstat (limited to 'llvm/lib/CodeGen/BasicBlockSections.cpp')
-rw-r--r--llvm/lib/CodeGen/BasicBlockSections.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/BasicBlockSections.cpp b/llvm/lib/CodeGen/BasicBlockSections.cpp
index 38ba651..0c28bfb 100644
--- a/llvm/lib/CodeGen/BasicBlockSections.cpp
+++ b/llvm/lib/CodeGen/BasicBlockSections.cpp
@@ -221,7 +221,7 @@ assignSections(MachineFunction &MF,
// set every basic block's section ID equal to its number (basic block
// id). This further ensures that basic blocks are ordered canonically.
MBB.setSectionID({static_cast<unsigned int>(MBB.getNumber())});
- } else if (FuncBBClusterInfo[MBB.getNumber()].hasValue())
+ } else if (FuncBBClusterInfo[MBB.getNumber()])
MBB.setSectionID(FuncBBClusterInfo[MBB.getNumber()]->ClusterID);
else {
// BB goes into the special cold section if it is not specified in the