[llvm] 47359fb - Drop a StringMap.h include, NFC
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 15:45:41 PDT 2020
Author: Reid Kleckner
Date: 2020-03-11T15:45:34-07:00
New Revision: 47359fbd2e8810c37bc79d42ed752b3fbb3034b3
URL: https://github.com/llvm/llvm-project/commit/47359fbd2e8810c37bc79d42ed752b3fbb3034b3
DIFF: https://github.com/llvm/llvm-project/commit/47359fbd2e8810c37bc79d42ed752b3fbb3034b3.diff
LOG: Drop a StringMap.h include, NFC
$ diff -u <(sort thedeps-before.txt) <(sort thedeps-after.txt) \
| grep '^[-+] ' | sort | uniq -c | sort -nr
231 - llvm/include/llvm/ADT/StringMap.h
171 - llvm/include/llvm/Support/AllocatorBase.h
142 - llvm/include/llvm/Support/PointerLikeTypeTraits.h
Added:
Modified:
llvm/include/llvm/Support/Host.h
llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
llvm/lib/Object/ArchiveWriter.cpp
llvm/lib/Support/FoldingSet.cpp
llvm/lib/Support/Host.cpp
llvm/tools/dsymutil/BinaryHolder.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Support/Host.h b/llvm/include/llvm/Support/Host.h
index 44f543c363db..d4ef389450cc 100644
--- a/llvm/include/llvm/Support/Host.h
+++ b/llvm/include/llvm/Support/Host.h
@@ -13,11 +13,13 @@
#ifndef LLVM_SUPPORT_HOST_H
#define LLVM_SUPPORT_HOST_H
-#include "llvm/ADT/StringMap.h"
-
#include <string>
namespace llvm {
+class MallocAllocator;
+class StringRef;
+template <typename ValueTy, typename AllocatorTy> class StringMap;
+
namespace sys {
/// getDefaultTargetTriple() - Return the default target triple the compiler
@@ -50,7 +52,7 @@ namespace sys {
/// all valid LLVM feature names.
///
/// \return - True on success.
- bool getHostCPUFeatures(StringMap<bool> &Features);
+ bool getHostCPUFeatures(StringMap<bool, MallocAllocator> &Features);
/// Get the number of physical cores (as opposed to logical cores returned
/// from thread::hardware_concurrency(), which includes hyperthreads).
diff --git a/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h b/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
index 91b1d5a22387..06d4787fc43c 100644
--- a/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
+++ b/llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
@@ -13,6 +13,8 @@
#ifndef LIB_EXECUTIONENGINE_JITLINK_MACHOLINKGRAPHBUILDER_H
#define LIB_EXECUTIONENGINE_JITLINK_MACHOLINKGRAPHBUILDER_H
+#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/StringMap.h"
#include "llvm/ExecutionEngine/JITLink/JITLink.h"
#include "EHFrameSupportImpl.h"
diff --git a/llvm/lib/Object/ArchiveWriter.cpp b/llvm/lib/Object/ArchiveWriter.cpp
index 13dafb58f472..7e3416feba49 100644
--- a/llvm/lib/Object/ArchiveWriter.cpp
+++ b/llvm/lib/Object/ArchiveWriter.cpp
@@ -12,6 +12,7 @@
#include "llvm/Object/ArchiveWriter.h"
#include "llvm/ADT/ArrayRef.h"
+#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Magic.h"
#include "llvm/IR/LLVMContext.h"
diff --git a/llvm/lib/Support/FoldingSet.cpp b/llvm/lib/Support/FoldingSet.cpp
index ce6f196e1060..6f67bb3fcd90 100644
--- a/llvm/lib/Support/FoldingSet.cpp
+++ b/llvm/lib/Support/FoldingSet.cpp
@@ -13,6 +13,7 @@
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Hashing.h"
+#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Host.h"
diff --git a/llvm/lib/Support/Host.cpp b/llvm/lib/Support/Host.cpp
index 2fb0c2541652..d7558faed784 100644
--- a/llvm/lib/Support/Host.cpp
+++ b/llvm/lib/Support/Host.cpp
@@ -11,9 +11,9 @@
//===----------------------------------------------------------------------===//
#include "llvm/Support/Host.h"
-#include "llvm/Support/TargetParser.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/SmallVector.h"
+#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/ADT/Triple.h"
@@ -21,6 +21,7 @@
#include "llvm/Support/Debug.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
+#include "llvm/Support/TargetParser.h"
#include "llvm/Support/raw_ostream.h"
#include <assert.h>
#include <string.h>
diff --git a/llvm/tools/dsymutil/BinaryHolder.h b/llvm/tools/dsymutil/BinaryHolder.h
index 0376d1e78643..223626ac8cdc 100644
--- a/llvm/tools/dsymutil/BinaryHolder.h
+++ b/llvm/tools/dsymutil/BinaryHolder.h
@@ -14,6 +14,7 @@
#define LLVM_TOOLS_DSYMUTIL_BINARYHOLDER_H
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Object/Archive.h"
#include "llvm/Object/Error.h"
More information about the llvm-commits
mailing list