From c9696322bd7b5220b6d4346272b767fdf6eaa698 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 18 Sep 2022 11:01:56 -0700 Subject: [PATCH] [BOLT] Use x.empty() instead of llvm::empty(x) (NFC) I'm planning to deprecate and eventually remove llvm::empty. Note that no use of llvm::empty requires the ability of llvm::empty to determine the emptiness from begin/end only. --- bolt/include/bolt/Core/BinaryFunction.h | 2 +- bolt/lib/Core/BinaryEmitter.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bolt/include/bolt/Core/BinaryFunction.h b/bolt/include/bolt/Core/BinaryFunction.h index 96633f5901e5..7b189426308d 100644 --- a/bolt/include/bolt/Core/BinaryFunction.h +++ b/bolt/include/bolt/Core/BinaryFunction.h @@ -1878,7 +1878,7 @@ public: MCSymbol *getLSDASymbol(const FragmentNum F) { if (F.get() < LSDASymbols.size() && LSDASymbols[F.get()] != nullptr) return LSDASymbols[F.get()]; - if (llvm::empty(getCallSites(F))) + if (getCallSites(F).empty()) return nullptr; if (F.get() >= LSDASymbols.size()) diff --git a/bolt/lib/Core/BinaryEmitter.cpp b/bolt/lib/Core/BinaryEmitter.cpp index 98c994333d93..96d6d8ea860f 100644 --- a/bolt/lib/Core/BinaryEmitter.cpp +++ b/bolt/lib/Core/BinaryEmitter.cpp @@ -886,7 +886,7 @@ void BinaryEmitter::emitCFIInstruction(const MCCFIInstruction &Inst) const { void BinaryEmitter::emitLSDA(BinaryFunction &BF, const FunctionFragment &FF) { const BinaryFunction::CallSitesRange Sites = BF.getCallSites(FF.getFragmentNum()); - if (llvm::empty(Sites)) + if (Sites.empty()) return; // Calculate callsite table size. Size of each callsite entry is: