Skip to content

[llvm] add missing #include of Compiler.h #141780

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
May 28, 2025

Conversation

andrurogerz
Copy link
Contributor

@andrurogerz andrurogerz commented May 28, 2025

Fixes a build break introduced in #136623. There were two files updated to reference the LLVM_ABI macro that were not updated to #include "llvm/Support/Compiler.h"

Failing build log here

@llvmbot llvmbot added the llvm:analysis Includes value tracking, cost tables and constant folding label May 28, 2025
@llvmbot
Copy link
Member

llvmbot commented May 28, 2025

@llvm/pr-subscribers-llvm-analysis

Author: Andrew Rogers (andrurogerz)

Changes

Fixes a build break introduced in #136623. There were two files updated to reference the LLVM_ABI macro that were not updated to #include "llvm/Support/Compiler.h"

Failing build: https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-Rthinlto/794/consoleFull#-471199310f80d942a-f672-4696-b0d9-c66cae8aa9dd


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

2 Files Affected:

  • (modified) llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h (+1)
  • (modified) llvm/include/llvm/Analysis/Passes.h (+2)
diff --git a/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h b/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
index 972ddd727d0ce..86f3db236ac2c 100644
--- a/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
+++ b/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h
@@ -19,6 +19,7 @@
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/Analysis/ScalarEvolution.h"
 #include "llvm/IR/InstVisitor.h"
+#include "llvm/Support/Compiler.h"
 
 // This class is used to get an estimate of the optimization effects that we
 // could get from complete loop unrolling. It comes from the fact that some
diff --git a/llvm/include/llvm/Analysis/Passes.h b/llvm/include/llvm/Analysis/Passes.h
index 52b798c4d2607..e1895db5653f6 100644
--- a/llvm/include/llvm/Analysis/Passes.h
+++ b/llvm/include/llvm/Analysis/Passes.h
@@ -14,6 +14,8 @@
 #ifndef LLVM_ANALYSIS_PASSES_H
 #define LLVM_ANALYSIS_PASSES_H
 
+#include "llvm/Support/Compiler.h"
+
 namespace llvm {
   class FunctionPass;
   class ImmutablePass;

Copy link
Contributor

@vgvassilev vgvassilev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@cachemeifyoucan
Copy link
Collaborator

LGTM

@compnerd compnerd merged commit b8dcf53 into llvm:main May 28, 2025
13 checks passed
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
Fixes a build break introduced in llvm#136623. There were two files updated
to reference the `LLVM_ABI` macro that were not updated to `#include
"llvm/Support/Compiler.h"`

Failing build log
[here](https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-Rthinlto/794/consoleFull#-471199310f80d942a-f672-4696-b0d9-c66cae8aa9dd)
@andrurogerz andrurogerz deleted the llvmdll-lib-analysis-break branch July 7, 2025 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:analysis Includes value tracking, cost tables and constant folding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants