[ADT] Fix IWYU for hashing-adjacent files (#194297)
Add explicit includes so these files keep building after we trim transitive includes from xxhash.h. For example, FoldingSet.cpp calls llvm::uninitialized_copy, which is declared in llvm/ADT/STLExtras.h and today reaches the file only transitively. Also drop the vestigial `#include "llvm/ADT/Hashing.h"` from llvm/ADT/STLExtras.h — no name from Hashing.h is used there.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "support/Context.h"
|
||||
#include "llvm/ADT/FunctionExtras.h"
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/StringMap.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
#include <functional>
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/PointerUnion.h"
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace clang {
|
||||
class CXXBaseSpecifier;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#ifndef LLVM_ADT_FOLDINGSET_H
|
||||
#define LLVM_ADT_FOLDINGSET_H
|
||||
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/STLForwardCompat.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
#define LLVM_ADT_STLEXTRAS_H
|
||||
|
||||
#include "llvm/ADT/ADL.h"
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/STLForwardCompat.h"
|
||||
#include "llvm/ADT/STLFunctionalExtras.h"
|
||||
#include "llvm/ADT/iterator.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef LLVM_ADT_STABLEHASHING_H
|
||||
#define LLVM_ADT_STABLEHASHING_H
|
||||
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/xxhash.h"
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "llvm/ADT/DenseMap.h"
|
||||
#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/Hashing.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/SmallVector.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/ADT/FoldingSet.h"
|
||||
#include "llvm/ADT/STLExtras.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/Allocator.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Support/xxhash.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
Reference in New Issue
Block a user