[Lldb-commits] [lldb] 3bf8558 - [lldb][NFC] Remove ClangExternalASTSourceCommon::g_TotalSizeOfMetadata
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Wed Dec 11 05:06:05 PST 2019
Author: Raphael Isemann
Date: 2019-12-11T14:05:43+01:00
New Revision: 3bf8558fbb2f3e9348bf1f5aafb64d8095ad6420
URL: https://github.com/llvm/llvm-project/commit/3bf8558fbb2f3e9348bf1f5aafb64d8095ad6420
DIFF: https://github.com/llvm/llvm-project/commit/3bf8558fbb2f3e9348bf1f5aafb64d8095ad6420.diff
LOG: [lldb][NFC] Remove ClangExternalASTSourceCommon::g_TotalSizeOfMetadata
Turns out this counter is doing literally nothing beside counting.
Added:
Modified:
lldb/source/Symbol/ClangExternalASTSourceCommon.cpp
Removed:
################################################################################
diff --git a/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp b/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp
index 2309bc60d617..9c58969dc46e 100644
--- a/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp
+++ b/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp
@@ -13,8 +13,6 @@
using namespace lldb_private;
-static uint64_t g_TotalSizeOfMetadata = 0;
-
typedef llvm::DenseMap<clang::ExternalASTSource *,
ClangExternalASTSourceCommon *>
ASTSourceMap;
@@ -44,7 +42,6 @@ ClangExternalASTSourceCommon::Lookup(clang::ExternalASTSource *source) {
ClangExternalASTSourceCommon::ClangExternalASTSourceCommon()
: clang::ExternalASTSource() {
- g_TotalSizeOfMetadata += m_metadata.size();
std::unique_lock<std::mutex> guard;
GetSourceMap(guard)[this] = this;
}
@@ -52,7 +49,6 @@ ClangExternalASTSourceCommon::ClangExternalASTSourceCommon()
ClangExternalASTSourceCommon::~ClangExternalASTSourceCommon() {
std::unique_lock<std::mutex> guard;
GetSourceMap(guard).erase(this);
- g_TotalSizeOfMetadata -= m_metadata.size();
}
ClangASTMetadata *
@@ -65,10 +61,7 @@ ClangExternalASTSourceCommon::GetMetadata(const void *object) {
void ClangExternalASTSourceCommon::SetMetadata(const void *object,
ClangASTMetadata &metadata) {
- uint64_t orig_size = m_metadata.size();
m_metadata[object] = metadata;
- uint64_t new_size = m_metadata.size();
- g_TotalSizeOfMetadata += (new_size - orig_size);
}
bool ClangExternalASTSourceCommon::HasMetadata(const void *object) {
More information about the lldb-commits
mailing list