[NFC] Use std::size(x) Instead of ArrayRef(x).size
authorserge-sans-paille <sguelton@mozilla.com>
Thu, 5 Jan 2023 14:25:47 +0000 (15:25 +0100)
committerserge-sans-paille <sguelton@mozilla.com>
Thu, 5 Jan 2023 14:27:32 +0000 (15:27 +0100)
This is equivalent for all kind of `x` accepted by ArrayRef.

llvm/include/llvm/Bitstream/BitstreamWriter.h

index 3070593f5e6d49846c13862bcef5262a8f5465cb..37c9bc9053970183f75092e5a4f2966f95960fbc 100644 (file)
@@ -485,7 +485,7 @@ public:
     if (!Abbrev) {
       // If we don't have an abbrev to use, emit this in its fully unabbreviated
       // form.
-      auto Count = static_cast<uint32_t>(ArrayRef(Vals).size());
+      auto Count = static_cast<uint32_t>(std::size(Vals));
       EmitCode(bitc::UNABBREV_RECORD);
       EmitVBR(Code, 6);
       EmitVBR(Count, 6);