[PATCH] D100668: [ADT] Add STLShims.h and llvm::disjunction

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 16 14:04:06 PDT 2021


dblaikie added a comment.

I don't think "shim" is the right term here - if anything I'd think things like our range-based adapters to standard algorithms (llvm::sort(R, C) -> std::sort(R.begin(), R.end(), C)) is a "shim" in the sense of the word that I know of - a thin adapter ( https://en.wikipedia.org/wiki/Shim_(computing) - "a shim is a library that transparently intercepts API calls and changes the arguments passed, handles the operation itself or redirects the operation elsewhere.").

These are STL reimplementations, though that's a bit of a mouthful. STLCompat.h, perhaps?



================
Comment at: llvm/include/llvm/ADT/STLShims.h:22
+
+#define SHIM(IDENT) IDENT // NOLINT(readability-identifer-naming)
+
----------------
I'm not sure this macro is adding value - what's the motivation for it compared to a comment pointing out that a given thing is intended to be equivalent to the standard entity of the same name?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100668



More information about the llvm-commits mailing list