[llvm] ffd9cfa - AArch6/ARMTargetParser.h - move Triple.h dependency down to cpp file. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 03:11:49 PDT 2020


Author: Simon Pilgrim
Date: 2020-05-08T11:10:28+01:00
New Revision: ffd9cfa740c80416f07e39457ce571933de79613

URL: https://github.com/llvm/llvm-project/commit/ffd9cfa740c80416f07e39457ce571933de79613
DIFF: https://github.com/llvm/llvm-project/commit/ffd9cfa740c80416f07e39457ce571933de79613.diff

LOG: AArch6/ARMTargetParser.h - move Triple.h dependency down to cpp file. NFC.

Reduce Triple.h include to a forward declaration in the header. Only the implementations in the cpp files need the actual Triple class definition.

Added: 
    

Modified: 
    llvm/include/llvm/Support/AArch64TargetParser.h
    llvm/include/llvm/Support/ARMTargetParser.h
    llvm/lib/Support/AArch64TargetParser.cpp
    llvm/lib/Support/ARMTargetParser.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/AArch64TargetParser.h b/llvm/include/llvm/Support/AArch64TargetParser.h
index f8b0c2d4b244..a1d9543fcc58 100644
--- a/llvm/include/llvm/Support/AArch64TargetParser.h
+++ b/llvm/include/llvm/Support/AArch64TargetParser.h
@@ -15,12 +15,14 @@
 #define LLVM_SUPPORT_AARCH64TARGETPARSERCOMMON_H
 
 #include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Triple.h"
 #include "llvm/Support/ARMTargetParser.h"
 #include <vector>
 
 // FIXME:This should be made into class design,to avoid dupplication.
 namespace llvm {
+
+class Triple;
+
 namespace AArch64 {
 
 // Arch extension modifiers for CPUs.

diff  --git a/llvm/include/llvm/Support/ARMTargetParser.h b/llvm/include/llvm/Support/ARMTargetParser.h
index a378f739315c..322e89e3d063 100644
--- a/llvm/include/llvm/Support/ARMTargetParser.h
+++ b/llvm/include/llvm/Support/ARMTargetParser.h
@@ -15,11 +15,13 @@
 #define LLVM_SUPPORT_ARMTARGETPARSER_H
 
 #include "llvm/ADT/StringRef.h"
-#include "llvm/ADT/Triple.h"
 #include "llvm/Support/ARMBuildAttributes.h"
 #include <vector>
 
 namespace llvm {
+
+class Triple;
+
 namespace ARM {
 
 // Arch extension modifiers for CPUs.

diff  --git a/llvm/lib/Support/AArch64TargetParser.cpp b/llvm/lib/Support/AArch64TargetParser.cpp
index cce2d8208296..a6de44605675 100644
--- a/llvm/lib/Support/AArch64TargetParser.cpp
+++ b/llvm/lib/Support/AArch64TargetParser.cpp
@@ -12,8 +12,8 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/Support/AArch64TargetParser.h"
-#include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/ADT/Triple.h"
 #include <cctype>
 
 using namespace llvm;

diff  --git a/llvm/lib/Support/ARMTargetParser.cpp b/llvm/lib/Support/ARMTargetParser.cpp
index 2c581248e183..56a91f7dc787 100644
--- a/llvm/lib/Support/ARMTargetParser.cpp
+++ b/llvm/lib/Support/ARMTargetParser.cpp
@@ -13,6 +13,7 @@
 
 #include "llvm/Support/ARMTargetParser.h"
 #include "llvm/ADT/StringSwitch.h"
+#include "llvm/ADT/Triple.h"
 #include <cctype>
 
 using namespace llvm;


        


More information about the llvm-commits mailing list