Skip to content

Commit f0bab78

Browse files
committed
Triple.h - reduce Twine.h include to forward declarations. NFC.
Move include down to a number of other files that had an implicit dependency on the Twine class.
1 parent bb26838 commit f0bab78

File tree

9 files changed

+12
-1
lines changed

9 files changed

+12
-1
lines changed

clang/lib/Basic/IdentifierTable.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "llvm/ADT/SmallString.h"
2424
#include "llvm/ADT/StringMap.h"
2525
#include "llvm/ADT/StringRef.h"
26+
#include "llvm/ADT/Twine.h"
2627
#include "llvm/Support/Allocator.h"
2728
#include "llvm/Support/ErrorHandling.h"
2829
#include "llvm/Support/raw_ostream.h"

clang/lib/Basic/Targets/Mips.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "clang/Basic/TargetInfo.h"
1717
#include "clang/Basic/TargetOptions.h"
1818
#include "llvm/ADT/Triple.h"
19+
#include "llvm/ADT/Twine.h"
1920
#include "llvm/Support/Compiler.h"
2021

2122
namespace clang {

llvm/include/llvm/ADT/Triple.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
#ifndef LLVM_ADT_TRIPLE_H
1010
#define LLVM_ADT_TRIPLE_H
1111

12-
#include "llvm/ADT/Twine.h"
12+
#include "llvm/ADT/StringRef.h"
13+
#include <cassert>
1314

1415
// Some system headers or GCC predefined macros conflict with identifiers in
1516
// this file. Undefine them here.
@@ -19,6 +20,7 @@
1920

2021
namespace llvm {
2122

23+
class Twine;
2224
class VersionTuple;
2325

2426
/// Triple - Helper class for working with autoconf configuration names. For

llvm/include/llvm/Support/TargetRegistry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "llvm/ADT/Optional.h"
2323
#include "llvm/ADT/StringRef.h"
2424
#include "llvm/ADT/Triple.h"
25+
#include "llvm/ADT/Twine.h"
2526
#include "llvm/ADT/iterator_range.h"
2627
#include "llvm/Support/CodeGen.h"
2728
#include "llvm/Support/ErrorHandling.h"

llvm/lib/MC/MCSectionELF.cpp

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

99
#include "llvm/MC/MCSectionELF.h"
1010
#include "llvm/ADT/Triple.h"
11+
#include "llvm/ADT/Twine.h"
1112
#include "llvm/BinaryFormat/ELF.h"
1213
#include "llvm/MC/MCAsmInfo.h"
1314
#include "llvm/MC/MCExpr.h"

llvm/lib/Support/Triple.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@
1111
#include "llvm/ADT/SmallString.h"
1212
#include "llvm/ADT/StringExtras.h"
1313
#include "llvm/ADT/StringSwitch.h"
14+
#include "llvm/ADT/Twine.h"
1415
#include "llvm/Support/ErrorHandling.h"
1516
#include "llvm/Support/Host.h"
1617
#include "llvm/Support/SwapByteOrder.h"
1718
#include "llvm/Support/TargetParser.h"
1819
#include "llvm/Support/VersionTuple.h"
1920
#include <cassert>
2021
#include <cstring>
22+
2123
using namespace llvm;
2224

2325
StringRef Triple::getArchTypeName(ArchType Kind) {

llvm/unittests/ADT/TripleTest.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "llvm/ADT/Triple.h"
10+
#include "llvm/ADT/Twine.h"
1011
#include "llvm/Support/VersionTuple.h"
1112
#include "gtest/gtest.h"
1213

llvm/unittests/Frontend/OpenMPContextTest.cpp

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

99
#include "llvm/Frontend/OpenMP/OMPConstants.h"
1010
#include "llvm/Frontend/OpenMP/OMPContext.h"
11+
#include "llvm/ADT/Twine.h"
1112
#include "gtest/gtest.h"
1213

1314
using namespace llvm;

llvm/unittests/Support/ThreadPool.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "llvm/ADT/STLExtras.h"
1313
#include "llvm/ADT/SmallVector.h"
1414
#include "llvm/ADT/Triple.h"
15+
#include "llvm/ADT/Twine.h"
1516
#include "llvm/Support/Host.h"
1617
#include "llvm/Support/TargetSelect.h"
1718
#include "llvm/Support/Threading.h"

0 commit comments

Comments
 (0)