[Mlir-commits] [mlir] cad2678 - [mlir] Prefer to use empty to check for emptiness (NFC)
Jacques Pienaar
llvmlistbot at llvm.org
Thu Aug 31 14:10:11 PDT 2023
Author: Jacques Pienaar
Date: 2023-08-31T14:10:03-07:00
New Revision: cad267831ec411d5386e43e2469e48364a758b46
URL: https://github.com/llvm/llvm-project/commit/cad267831ec411d5386e43e2469e48364a758b46
DIFF: https://github.com/llvm/llvm-project/commit/cad267831ec411d5386e43e2469e48364a758b46.diff
LOG: [mlir] Prefer to use empty to check for emptiness (NFC)
Added:
Modified:
mlir/lib/Target/LLVM/ModuleToObject.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Target/LLVM/ModuleToObject.cpp b/mlir/lib/Target/LLVM/ModuleToObject.cpp
index 57094510cd9549..b7594f4cd5bf5e 100644
--- a/mlir/lib/Target/LLVM/ModuleToObject.cpp
+++ b/mlir/lib/Target/LLVM/ModuleToObject.cpp
@@ -212,7 +212,7 @@ std::optional<SmallVector<char, 0>> ModuleToObject::run() {
auto libs = loadBitcodeFiles(*llvmModule, *targetMachine);
if (!libs)
return std::nullopt;
- if (libs->size())
+ if (!libs->empty())
if (failed(linkFiles(*llvmModule, std::move(*libs))))
return std::nullopt;
handleModulePostLink(*llvmModule, *targetMachine);
More information about the Mlir-commits
mailing list