Skip to content

Commit c015321

Browse files
[clang] Remove unused includes (NFC) (#144285)
These are identified by misc-include-cleaner. I've filtered out those that break builds. Also, I'm staying away from llvm-config.h, config.h, and Compiler.h, which likely cause platform- or compiler-specific build failures.
1 parent 7a4a83b commit c015321

20 files changed

+0
-29
lines changed

clang/lib/Analysis/UnsafeBufferUsage.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
#include "llvm/ADT/SmallSet.h"
3131
#include "llvm/ADT/SmallVector.h"
3232
#include "llvm/ADT/StringRef.h"
33-
#include "llvm/Support/Casting.h"
3433
#include <cstddef>
3534
#include <optional>
3635
#include <queue>

clang/lib/Basic/LangOptions.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
//===----------------------------------------------------------------------===//
1212

1313
#include "clang/Basic/LangOptions.h"
14-
#include "llvm/ADT/SmallString.h"
1514
#include "llvm/Support/Path.h"
1615

1716
using namespace clang;

clang/lib/CodeGen/CGBuiltin.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "CGDebugInfo.h"
1818
#include "CGObjCRuntime.h"
1919
#include "CGOpenCLRuntime.h"
20-
#include "CGPointerAuthInfo.h"
2120
#include "CGRecordLayout.h"
2221
#include "CGValue.h"
2322
#include "CodeGenFunction.h"

clang/lib/CodeGen/CGHLSLRuntime.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
#include "llvm/Support/Alignment.h"
3636
#include "llvm/Support/ErrorHandling.h"
3737
#include "llvm/Support/FormatVariadic.h"
38-
#include <utility>
3938

4039
using namespace clang;
4140
using namespace CodeGen;

clang/lib/Edit/EditedSource.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
#include "clang/Edit/FileOffset.h"
1717
#include "clang/Lex/Lexer.h"
1818
#include "llvm/ADT/STLExtras.h"
19-
#include "llvm/ADT/SmallString.h"
2019
#include "llvm/ADT/StringRef.h"
2120
#include "llvm/ADT/Twine.h"
22-
#include <algorithm>
2321
#include <cassert>
2422
#include <tuple>
2523
#include <utility>

clang/lib/ExtractAPI/ExtractAPIConsumer.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include "llvm/ADT/StringRef.h"
4444
#include "llvm/Support/Casting.h"
4545
#include "llvm/Support/Error.h"
46-
#include "llvm/Support/FileSystem.h"
4746
#include "llvm/Support/MemoryBuffer.h"
4847
#include "llvm/Support/Path.h"
4948
#include "llvm/Support/Regex.h"

clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@
1919
#include "llvm/ADT/STLExtras.h"
2020
#include "llvm/ADT/STLFunctionalExtras.h"
2121
#include "llvm/ADT/SmallVector.h"
22-
#include "llvm/Support/Casting.h"
2322
#include "llvm/Support/Compiler.h"
2423
#include "llvm/Support/Path.h"
2524
#include "llvm/Support/VersionTuple.h"
2625
#include "llvm/Support/raw_ostream.h"
2726
#include <iterator>
2827
#include <optional>
29-
#include <type_traits>
3028

3129
using namespace clang;
3230
using namespace clang::extractapi;

clang/lib/InstallAPI/DiagnosticBuilderWrappers.cpp

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

99
#include "DiagnosticBuilderWrappers.h"
1010
#include "llvm/ADT/STLExtras.h"
11-
#include "llvm/ADT/SmallString.h"
1211
#include "llvm/Support/raw_ostream.h"
1312
#include "llvm/TextAPI/Platform.h"
1413

clang/lib/InstallAPI/DirectoryScanner.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include "clang/InstallAPI/DirectoryScanner.h"
1010
#include "llvm/ADT/StringRef.h"
1111
#include "llvm/ADT/StringSwitch.h"
12-
#include "llvm/TextAPI/DylibReader.h"
1312

1413
using namespace llvm;
1514
using namespace llvm::MachO;

clang/lib/InstallAPI/FileList.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "clang/InstallAPI/FileList.h"
10-
#include "clang/Basic/DiagnosticFrontend.h"
119
#include "clang/InstallAPI/FileList.h"
1210
#include "llvm/ADT/StringSwitch.h"
1311
#include "llvm/Support/Error.h"

0 commit comments

Comments
 (0)