[llvm] [Support] Move UndefPoisonKind enum to a shared header (PR #195523)

via llvm-commits llvm-commits at lists.llvm.org
Wed May 6 05:22:17 PDT 2026


================
@@ -23,6 +23,7 @@
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/Intrinsics.h"
 #include "llvm/Support/Compiler.h"
+#include "llvm/Support/UndefPoison.h"
----------------
levi42x wrote:

initially included it in `ValueTracking.h` thinking it was the standard way to provide the dependency to the source file. 
However, I realize now that since the enum is only used in the implementation and not in the header's public interface, moving the include to the `.cpp` files is better for minimizing header dependencies and compile times. I've updated the patch to keep the includes in the `.cpp` files only.

https://github.com/llvm/llvm-project/pull/195523


More information about the llvm-commits mailing list