[Mlir-commits] [mlir] ecfd547 - [mlir] Apply ClangTidy fix (NFC)
Adrian Kuegel
llvmlistbot at llvm.org
Thu Aug 31 23:53:19 PDT 2023
Author: Adrian Kuegel
Date: 2023-09-01T08:52:37+02:00
New Revision: ecfd547240dc619022b52019c3cc349899cb6bc0
URL: https://github.com/llvm/llvm-project/commit/ecfd547240dc619022b52019c3cc349899cb6bc0
DIFF: https://github.com/llvm/llvm-project/commit/ecfd547240dc619022b52019c3cc349899cb6bc0.diff
LOG: [mlir] Apply ClangTidy fix (NFC)
Prefer to use empty() instead of checking size().
Added:
Modified:
mlir/lib/Target/LLVM/ROCDL/Target.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Target/LLVM/ROCDL/Target.cpp b/mlir/lib/Target/LLVM/ROCDL/Target.cpp
index fe48f04fad434b..effb88554e8ee0 100644
--- a/mlir/lib/Target/LLVM/ROCDL/Target.cpp
+++ b/mlir/lib/Target/LLVM/ROCDL/Target.cpp
@@ -135,7 +135,7 @@ ArrayRef<std::string> SerializeGPUModuleBase::getFileList() const {
LogicalResult SerializeGPUModuleBase::appendStandardLibs() {
StringRef pathRef = getToolkitPath();
- if (pathRef.size()) {
+ if (!pathRef.empty()) {
SmallVector<char, 256> path;
path.insert(path.begin(), pathRef.begin(), pathRef.end());
llvm::sys::path::append(path, "amdgcn", "bitcode");
More information about the Mlir-commits
mailing list