Skip to content

Commit ffd9cfa

Browse files
committed
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.
1 parent 5d5f61f commit ffd9cfa

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

llvm/include/llvm/Support/AArch64TargetParser.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
#define LLVM_SUPPORT_AARCH64TARGETPARSERCOMMON_H
1616

1717
#include "llvm/ADT/StringRef.h"
18-
#include "llvm/ADT/Triple.h"
1918
#include "llvm/Support/ARMTargetParser.h"
2019
#include <vector>
2120

2221
// FIXME:This should be made into class design,to avoid dupplication.
2322
namespace llvm {
23+
24+
class Triple;
25+
2426
namespace AArch64 {
2527

2628
// Arch extension modifiers for CPUs.

llvm/include/llvm/Support/ARMTargetParser.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
#define LLVM_SUPPORT_ARMTARGETPARSER_H
1616

1717
#include "llvm/ADT/StringRef.h"
18-
#include "llvm/ADT/Triple.h"
1918
#include "llvm/Support/ARMBuildAttributes.h"
2019
#include <vector>
2120

2221
namespace llvm {
22+
23+
class Triple;
24+
2325
namespace ARM {
2426

2527
// Arch extension modifiers for CPUs.

llvm/lib/Support/AArch64TargetParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
//===----------------------------------------------------------------------===//
1313

1414
#include "llvm/Support/AArch64TargetParser.h"
15-
#include "llvm/ADT/StringRef.h"
1615
#include "llvm/ADT/StringSwitch.h"
16+
#include "llvm/ADT/Triple.h"
1717
#include <cctype>
1818

1919
using namespace llvm;

llvm/lib/Support/ARMTargetParser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
#include "llvm/Support/ARMTargetParser.h"
1515
#include "llvm/ADT/StringSwitch.h"
16+
#include "llvm/ADT/Triple.h"
1617
#include <cctype>
1718

1819
using namespace llvm;

0 commit comments

Comments
 (0)