From a7938c74f16379704fbd38a3d82dfcb9345651ab Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 25 Jun 2022 21:42:52 -0700 Subject: [llvm] Don't use Optional::hasValue (NFC) This patch replaces Optional::hasValue with the implicit cast to bool in conditionals only. --- llvm/lib/Transforms/Utils/LoopPeel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Utils/LoopPeel.cpp') diff --git a/llvm/lib/Transforms/Utils/LoopPeel.cpp b/llvm/lib/Transforms/Utils/LoopPeel.cpp index 7f0852c..f093fea 100644 --- a/llvm/lib/Transforms/Utils/LoopPeel.cpp +++ b/llvm/lib/Transforms/Utils/LoopPeel.cpp @@ -719,9 +719,9 @@ TargetTransformInfo::PeelingPreferences llvm::gatherPeelingPreferences( } // User specifed values provided by argument. - if (UserAllowPeeling.hasValue()) + if (UserAllowPeeling) PP.AllowPeeling = *UserAllowPeeling; - if (UserAllowProfileBasedPeeling.hasValue()) + if (UserAllowProfileBasedPeeling) PP.PeelProfiledIterations = *UserAllowProfileBasedPeeling; return PP; -- cgit v1.1