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

Chris Lattner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 16:59:33 PDT 2022


lattner added a comment.

Overall, this looks really great to me.  Please get River's review, then (when any feedback is incorporated) ping an LLVM forum for visibility.  This isn't normally needed but casting.h is very pervasive, so extra discussion is helpful.



================
Comment at: llvm/include/llvm/Support/Casting.h:18
+#include "llvm/ADT/Optional.h"
+#include "llvm/ADT/STLExtras.h"
 #include "llvm/Support/Compiler.h"
----------------
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.


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