Skip to content

[AArch64][Subtarget] add missing direct include of Triple.h #143362

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

Conversation

tomershafir
Copy link
Contributor

AArch64Subtarget.h uses the complete type of Triple, but had only forward declared the class, which happend to be included through the following bottom-up path for example: "llvm/TargetParser/Triple.h"
"llvm/MC/MCSubtargetInfo.h"
"llvm/CodeGen/TargetSubtargetInfo.h"

`AArch64Subtarget.h` uses the complete type of `Triple`, but had only forward declared the class, which happend to be included through the following bottom-up path for example:
"llvm/TargetParser/Triple.h"
"llvm/MC/MCSubtargetInfo.h"
"llvm/CodeGen/TargetSubtargetInfo.h"
@llvmbot
Copy link
Member

llvmbot commented Jun 9, 2025

@llvm/pr-subscribers-backend-aarch64

Author: Tomer Shafir (tomershafir)

Changes

AArch64Subtarget.h uses the complete type of Triple, but had only forward declared the class, which happend to be included through the following bottom-up path for example: "llvm/TargetParser/Triple.h"
"llvm/MC/MCSubtargetInfo.h"
"llvm/CodeGen/TargetSubtargetInfo.h"


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

1 Files Affected:

  • (modified) llvm/lib/Target/AArch64/AArch64Subtarget.h (+1-1)
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.h b/llvm/lib/Target/AArch64/AArch64Subtarget.h
index f5ffc72cae537..3a9a37426bb93 100644
--- a/llvm/lib/Target/AArch64/AArch64Subtarget.h
+++ b/llvm/lib/Target/AArch64/AArch64Subtarget.h
@@ -26,6 +26,7 @@
 #include "llvm/CodeGen/RegisterBankInfo.h"
 #include "llvm/CodeGen/TargetSubtargetInfo.h"
 #include "llvm/IR/DataLayout.h"
+#include "llvm/TargetParser/Triple.h"
 
 #define GET_SUBTARGETINFO_HEADER
 #include "AArch64GenSubtargetInfo.inc"
@@ -33,7 +34,6 @@
 namespace llvm {
 class GlobalValue;
 class StringRef;
-class Triple;
 
 class AArch64Subtarget final : public AArch64GenSubtargetInfo {
 public:

Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

LGTM

@tomershafir tomershafir force-pushed the aarch64-subtarget-add-missing-direct-include branch from 33ad4c6 to f5e1ca0 Compare June 9, 2025 11:55
@tomershafir
Copy link
Contributor Author

@davemgreen can you pls merge? I dont have access yet

@davemgreen davemgreen merged commit 4c55505 into llvm:main Jun 9, 2025
15 checks passed
@tomershafir tomershafir deleted the aarch64-subtarget-add-missing-direct-include branch June 9, 2025 13:35
rorth pushed a commit to rorth/llvm-project that referenced this pull request Jun 11, 2025
)

`AArch64Subtarget.h` uses the complete type of `Triple`, but had only
forward declared the class, which happend to be included through the
following bottom-up path for example: "llvm/TargetParser/Triple.h"
"llvm/MC/MCSubtargetInfo.h"
"llvm/CodeGen/TargetSubtargetInfo.h"
DhruvSrivastavaX pushed a commit to DhruvSrivastavaX/lldb-for-aix that referenced this pull request Jun 12, 2025
)

`AArch64Subtarget.h` uses the complete type of `Triple`, but had only
forward declared the class, which happend to be included through the
following bottom-up path for example: "llvm/TargetParser/Triple.h"
"llvm/MC/MCSubtargetInfo.h"
"llvm/CodeGen/TargetSubtargetInfo.h"
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
)

`AArch64Subtarget.h` uses the complete type of `Triple`, but had only
forward declared the class, which happend to be included through the
following bottom-up path for example: "llvm/TargetParser/Triple.h"
"llvm/MC/MCSubtargetInfo.h"
"llvm/CodeGen/TargetSubtargetInfo.h"
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.

3 participants