[PATCH] D138374: [ADT] Remove deprecated `llvm::array_lengthof`

Joe Loser via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 20 10:56:54 PST 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG35df882274e9: [ADT] Remove deprecated `llvm::array_lengthof` (authored by jloser).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138374/new/

https://reviews.llvm.org/D138374

Files:
  llvm/include/llvm/ADT/STLArrayExtras.h


Index: llvm/include/llvm/ADT/STLArrayExtras.h
===================================================================
--- llvm/include/llvm/ADT/STLArrayExtras.h
+++ /dev/null
@@ -1,38 +0,0 @@
-//===- llvm/ADT/STLArrayExtras.h - additions to <array> ---------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file contains some templates that are useful if you are working with the
-// STL at all.
-//
-// No library is required when using these functions.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_ADT_STLARRAYEXTRAS_H
-#define LLVM_ADT_STLARRAYEXTRAS_H
-
-#include <cstddef>
-
-#include "llvm/Support/Compiler.h"
-
-namespace llvm {
-
-//===----------------------------------------------------------------------===//
-//     Extra additions for arrays
-//===----------------------------------------------------------------------===//
-
-/// Find the length of an array.
-template <class T, std::size_t N>
-LLVM_DEPRECATED("Use std::size instead.", "std::size")
-constexpr inline size_t array_lengthof(T (&)[N]) {
-  return N;
-}
-
-} // end namespace llvm
-
-#endif // LLVM_ADT_STLARRAYEXTRAS_H


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D138374.476762.patch
Type: text/x-patch
Size: 1425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221120/5b69c72a/attachment.bin>


More information about the llvm-commits mailing list