Skip to content

[llvm] include Compiler.h in a few headers where it was missed #144464

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2025

Conversation

andrurogerz
Copy link
Contributor

Add missing #include "llvm/Support/Compiler.h" in a few LLVM headers that use the LLVM_ABI macro.

@andrurogerz andrurogerz marked this pull request as ready for review June 17, 2025 03:23
@llvmbot
Copy link
Member

llvmbot commented Jun 17, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Andrew Rogers (andrurogerz)

Changes

Add missing #include "llvm/Support/Compiler.h" in a few LLVM headers that use the LLVM_ABI macro.


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

3 Files Affected:

  • (modified) llvm/include/llvm/Option/OptSpecifier.h (+2)
  • (modified) llvm/include/llvm/Transforms/IPO.h (+2)
  • (modified) llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h (+2)
diff --git a/llvm/include/llvm/Option/OptSpecifier.h b/llvm/include/llvm/Option/OptSpecifier.h
index dc6acae7fc002..cb87fbd17ec1c 100644
--- a/llvm/include/llvm/Option/OptSpecifier.h
+++ b/llvm/include/llvm/Option/OptSpecifier.h
@@ -9,6 +9,8 @@
 #ifndef LLVM_OPTION_OPTSPECIFIER_H
 #define LLVM_OPTION_OPTSPECIFIER_H
 
+#include "llvm/Support/Compiler.h"
+
 namespace llvm {
 namespace opt {
 
diff --git a/llvm/include/llvm/Transforms/IPO.h b/llvm/include/llvm/Transforms/IPO.h
index 56b30968ffd77..7523ae66429ac 100644
--- a/llvm/include/llvm/Transforms/IPO.h
+++ b/llvm/include/llvm/Transforms/IPO.h
@@ -14,6 +14,8 @@
 #ifndef LLVM_TRANSFORMS_IPO_H
 #define LLVM_TRANSFORMS_IPO_H
 
+#include "llvm/Support/Compiler.h"
+
 namespace llvm {
 
 class ModulePass;
diff --git a/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h b/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h
index ab0bd3a5a9962..f20ae1809aa56 100644
--- a/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h
+++ b/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h
@@ -14,6 +14,8 @@
 #ifndef LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
 #define LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
 
+#include "llvm/Support/Compiler.h"
+
 namespace llvm {
 
 template <typename T> class ArrayRef;

@fahadnayyar fahadnayyar self-requested a review June 17, 2025 04:29
@fahadnayyar
Copy link
Contributor

I'm curious if there's a way to check if this change would unblock the GreenDragon bot failure. I'm concerned that it might introduce other regression issues in the GreenDragon bots. I wonder if we could try some PR testing to see if the bots don't regress further after this.

@compnerd compnerd merged commit 02b78ff into llvm:main Jun 17, 2025
11 checks passed
@andrurogerz andrurogerz deleted the missing-compiler.h branch June 17, 2025 15:22
ajaden-codes pushed a commit to Jaddyen/llvm-project that referenced this pull request Jun 17, 2025
…144464)

Add missing `#include "llvm/Support/Compiler.h"` in a few LLVM headers
that use the `LLVM_ABI` macro.
fschlimb pushed a commit to fschlimb/llvm-project that referenced this pull request Jun 18, 2025
…144464)

Add missing `#include "llvm/Support/Compiler.h"` in a few LLVM headers
that use the `LLVM_ABI` macro.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants