[Basic] Use std::optional::value_or (NFC) (#140172)

diff --git a/clang/lib/Basic/Targets/SystemZ.cpp b/clang/lib/Basic/Targets/SystemZ.cpp
index ce532b7..13b8623 100644
--- a/clang/lib/Basic/Targets/SystemZ.cpp
+++ b/clang/lib/Basic/Targets/SystemZ.cpp
@@ -188,8 +188,8 @@
     std::string Str("0x");
     unsigned int Librel = 0x40000000;
     Librel |= V.getMajor() << 24;
-    Librel |= (V.getMinor() ? V.getMinor().value() : 1) << 16;
-    Librel |= V.getSubminor() ? V.getSubminor().value() : 0;
+    Librel |= V.getMinor().value_or(1) << 16;
+    Librel |= V.getSubminor().value_or(0);
     Str += llvm::utohexstr(Librel);
 
     Builder.defineMacro("__TARGET_LIB__", Str.c_str());