Skip to content

Commit 658a4fd

Browse files
committed
[mlir] Apply ClangTidy fix (NFC)
Prefer to use .empty() instead of checking size().
1 parent 2a603de commit 658a4fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Target/LLVM/NVVM/Target.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ ArrayRef<std::string> SerializeGPUModuleBase::getFileList() const {
122122
// Try to append `libdevice` from a CUDA toolkit installation.
123123
LogicalResult SerializeGPUModuleBase::appendStandardLibs() {
124124
StringRef pathRef = getToolkitPath();
125-
if (pathRef.size()) {
125+
if (!pathRef.empty()) {
126126
SmallVector<char, 256> path;
127127
path.insert(path.begin(), pathRef.begin(), pathRef.end());
128128
pathRef = StringRef(path.data(), path.size());

0 commit comments

Comments
 (0)