Skip to content

Commit 0f0fd62

Browse files
[Basic] Use std::optional::value_or (NFC) (#140172)
1 parent af083d0 commit 0f0fd62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Basic/Targets/SystemZ.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ void SystemZTargetInfo::getTargetDefines(const LangOptions &Opts,
188188
std::string Str("0x");
189189
unsigned int Librel = 0x40000000;
190190
Librel |= V.getMajor() << 24;
191-
Librel |= (V.getMinor() ? V.getMinor().value() : 1) << 16;
192-
Librel |= V.getSubminor() ? V.getSubminor().value() : 0;
191+
Librel |= V.getMinor().value_or(1) << 16;
192+
Librel |= V.getSubminor().value_or(0);
193193
Str += llvm::utohexstr(Librel);
194194

195195
Builder.defineMacro("__TARGET_LIB__", Str.c_str());

0 commit comments

Comments
 (0)