[llvm] [AArch64][Subtarget] add missing direct include of Triple.h (PR #143362)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 03:12:44 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-aarch64
Author: Tomer Shafir (tomershafir)
<details>
<summary>Changes</summary>
`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
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:
``````````
</details>
https://github.com/llvm/llvm-project/pull/143362
More information about the llvm-commits
mailing list