Skip to content

Commit 70ef89b

Browse files
[AMDGPU] Use std::optional::value_or (NFC) (#140006)
1 parent 690a30f commit 70ef89b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ getIntegerPairAttribute(const Function &F, StringRef Name,
13621362
std::pair<unsigned, unsigned> Default,
13631363
bool OnlyFirstRequired) {
13641364
if (auto Attr = getIntegerPairAttribute(F, Name, OnlyFirstRequired))
1365-
return {Attr->first, Attr->second ? *(Attr->second) : Default.second};
1365+
return {Attr->first, Attr->second.value_or(Default.second)};
13661366
return Default;
13671367
}
13681368

0 commit comments

Comments
 (0)