[llvm] [AArch64][Subtarget] add missing direct include of Triple.h (PR #143362)

Tomer Shafir via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 9 04:52:41 PDT 2025


https://github.com/tomershafir updated https://github.com/llvm/llvm-project/pull/143362

>From f5e1ca0547a030e10160e2283214325e9e1dfaf6 Mon Sep 17 00:00:00 2001
From: tomershafir <tomer.shafir8 at gmail.com>
Date: Mon, 9 Jun 2025 13:05:52 +0300
Subject: [PATCH] [AArch64][Subtarget] add missing direct include of Triple.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"
---
 llvm/lib/Target/AArch64/AArch64Subtarget.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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:



More information about the llvm-commits mailing list