[llvm] [llvm/IR] Fix module build issue following e57308b063bb (NFC) (PR #94580)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 5 23:02:09 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Med Ismail Bennani (medismailben)

<details>
<summary>Changes</summary>

This patch fixes a build issue following e57308b063bb when enabling module build (`-DLLVM_ENABLE_MODULES=On`).

With that change, we failed to build the LLVM_IR module since `GEPNoWrapFlags` wasn't defined prior to using it.

This patch addresses that issue by including the right header in `llvm/IR/Constant.h` which is also included by most headers in the LLVM_IR module. This should ensure that we can always build it.

---
Full diff: https://github.com/llvm/llvm-project/pull/94580.diff


1 Files Affected:

- (modified) llvm/include/llvm/IR/Constant.h (+1) 


``````````diff
diff --git a/llvm/include/llvm/IR/Constant.h b/llvm/include/llvm/IR/Constant.h
index d3171acf7b9ac..12a6211e505bd 100644
--- a/llvm/include/llvm/IR/Constant.h
+++ b/llvm/include/llvm/IR/Constant.h
@@ -13,6 +13,7 @@
 #ifndef LLVM_IR_CONSTANT_H
 #define LLVM_IR_CONSTANT_H
 
+#include "llvm/IR/GEPNoWrapFlags.h"
 #include "llvm/IR/User.h"
 #include "llvm/IR/Value.h"
 #include "llvm/Support/Casting.h"

``````````

</details>


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


More information about the llvm-commits mailing list