Skip to content

Commit f0b8069

Browse files
authored
[flang][cuda][NFC] Simplify IsCUDAShared (#157931)
1 parent 262c7b7 commit f0b8069

File tree

1 file changed

+2
-4
lines changed
  • flang/include/flang/Semantics

1 file changed

+2
-4
lines changed

flang/include/flang/Semantics/tools.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,8 @@ inline bool IsCUDADevice(const Symbol &sym) {
235235

236236
inline bool IsCUDAShared(const Symbol &sym) {
237237
if (const auto *details{sym.GetUltimate().detailsIf<ObjectEntityDetails>()}) {
238-
if (details->cudaDataAttr() &&
239-
*details->cudaDataAttr() == common::CUDADataAttr::Shared) {
240-
return true;
241-
}
238+
return details->cudaDataAttr() &&
239+
*details->cudaDataAttr() == common::CUDADataAttr::Shared;
242240
}
243241
return false;
244242
}

0 commit comments

Comments
 (0)