aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/ADT/DenseMapTest.cpp
diff options
context:
space:
mode:
authorElliot Goodrich <elliotgoodrich@gmail.com>2023-06-22 06:49:43 +0100
committerElliot Goodrich <elliotgoodrich@gmail.com>2023-06-22 06:50:54 +0100
commitcea0eea28e71204bf8543ca94dbf185cbf597ca5 (patch)
tree471bac58f4173cd11b1df3437fdca2779a303a16 /llvm/unittests/ADT/DenseMapTest.cpp
parent791c3cb7e6b43149349be2b0411ccb52d32ad087 (diff)
downloadllvm-cea0eea28e71204bf8543ca94dbf185cbf597ca5.zip
llvm-cea0eea28e71204bf8543ca94dbf185cbf597ca5.tar.gz
llvm-cea0eea28e71204bf8543ca94dbf185cbf597ca5.tar.bz2
[llvm] Split out DenseMapInfo<variant> specialization
Remove the `DenseMapInfo<std::variant<Ts...>>` variant out from `llvm/ADT/DenseMapInfo.h` into a separate header `llvm/ADT/DenseMapInfoVariant.h` This allows us to remove the `<variant>` include, which is being transitively and unncessary included in all translation units that include `llvm/ADT/DenseMap.h`. There have been similar changes to move out specializations for * `APInt.h` fd7e309e02fd226b0390888388ed732608e52c73 and * `StringRef.h`/`ArrayRef.h` 983565a6fe4a9f40c7caf82b65c650c20dbcc104 to reduce the compilation time. As we are unable to move the specialization into `<variant>`, we create a separate `DenseMapInfoVariant.h` header that can be used by anyone who needs this specialization. This reduces the total number of preprocessing tokens across the LLVM source files in lib from (roughly) 1,964,876,961 to 1,936,551,496 - a reduction of ~1.44%. This should result in a small improvement in compilation time. Differential Revision: https://reviews.llvm.org/D150997
Diffstat (limited to 'llvm/unittests/ADT/DenseMapTest.cpp')
-rw-r--r--llvm/unittests/ADT/DenseMapTest.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/unittests/ADT/DenseMapTest.cpp b/llvm/unittests/ADT/DenseMapTest.cpp
index ba5cd4c..94764a8 100644
--- a/llvm/unittests/ADT/DenseMapTest.cpp
+++ b/llvm/unittests/ADT/DenseMapTest.cpp
@@ -8,6 +8,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseMapInfo.h"
+#include "llvm/ADT/DenseMapInfoVariant.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <map>