[PATCH] D123901: [LLVM][Casting.h] Update dyn_cast machinery to provide more control over how the casting is performed.

Aman LaChapelle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 17:03:33 PDT 2022


bzcheeseman added inline comments.


================
Comment at: llvm/include/llvm/Support/Casting.h:18
+#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Compiler.h"
----------------
lattner wrote:
> Is there any reasonable way to avoid STLExtras.h?  It is a heavy weight header that pulls in tons of stuff, and Casting.h is used roughly everywhere.
> 
> Optional is nearly but not quite as bad, and is more core to what you're doing here, so ok.
I was using is_detected in an earlier iteration, but it's now been removed, so I think I can remove this too. Thanks for catching it!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123901



More information about the llvm-commits mailing list