[Mlir-commits] [mlir] cc79d60 - [mlir] Use .empty() instead of checking size() == 0.
Adrian Kuegel
llvmlistbot at llvm.org
Fri Jan 14 03:00:05 PST 2022
Author: Adrian Kuegel
Date: 2022-01-14T11:58:52+01:00
New Revision: cc79d603c90e3b4768e7f7bd6a6d9289fbf7f6d1
URL: https://github.com/llvm/llvm-project/commit/cc79d603c90e3b4768e7f7bd6a6d9289fbf7f6d1
DIFF: https://github.com/llvm/llvm-project/commit/cc79d603c90e3b4768e7f7bd6a6d9289fbf7f6d1.diff
LOG: [mlir] Use .empty() instead of checking size() == 0.
Based on a finding by ClangTidy readability-container-size-empty check.
Added:
Modified:
mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp
Removed:
################################################################################
diff --git a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp
index 8f1d238110632..0c41fd2742293 100644
--- a/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp
+++ b/mlir/tools/mlir-vulkan-runner/VulkanRuntime.cpp
@@ -104,7 +104,7 @@ LogicalResult VulkanRuntime::countDeviceMemorySize() {
}
LogicalResult VulkanRuntime::initRuntime() {
- if (!resourceData.size()) {
+ if (resourceData.empty()) {
std::cerr << "Vulkan runtime needs at least one resource";
return failure();
}
More information about the Mlir-commits
mailing list