summaryrefslogtreecommitdiffstats
path: root/clang/tools
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-07-26 23:46:11 +0000
committerTed Kremenek <kremenek@apple.com>2011-07-26 23:46:11 +0000
commitfbcce6fba31fa8ae689e99358e25f6a736aee286 (patch)
treedd880cd6064f3d7916d11aad832dd6e5ca67d9c7 /clang/tools
parent120992ad81034687bc9fe76f6a76b60d6c4539b0 (diff)
downloadbcm5719-llvm-fbcce6fba31fa8ae689e99358e25f6a736aee286.tar.gz
bcm5719-llvm-fbcce6fba31fa8ae689e99358e25f6a736aee286.zip
clang_getCXTUResourceUsage: report memory used by HeaderSearch.
This required converting the StringMaps to use a BumpPtrAllocator. I measured the compile time and saw no observable regression. llvm-svn: 136190
Diffstat (limited to 'clang/tools')
-rw-r--r--clang/tools/libclang/CIndex.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/tools/libclang/CIndex.cpp b/clang/tools/libclang/CIndex.cpp
index 6b073f56a95..829649a7795 100644
--- a/clang/tools/libclang/CIndex.cpp
+++ b/clang/tools/libclang/CIndex.cpp
@@ -5458,6 +5458,9 @@ const char *clang_getTUResourceUsageName(CXTUResourceUsageKind kind) {
case CXTUResourceUsage_SourceManager_DataStructures:
str = "SourceManager: data structures and tables";
break;
+ case CXTUResourceUsage_Preprocessor_HeaderSearch:
+ str = "Preprocessor: header search tables";
+ break;
}
return str;
}
@@ -5543,6 +5546,9 @@ CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU) {
pRec->getTotalMemory());
}
+ createCXTUResourceUsageEntry(*entries,
+ CXTUResourceUsage_Preprocessor_HeaderSearch,
+ pp.getHeaderSearchInfo().getTotalMemory());
CXTUResourceUsage usage = { (void*) entries.get(),
(unsigned) entries->size(),
OpenPOWER on IntegriCloud