diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-07-27 18:41:18 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-07-27 18:41:18 +0000 |
commit | eabea45e23abc07e917f0d4bce15054ce75623ef (patch) | |
tree | ec4208f57d06d0486ee4a7d75b46693e0f829cff /lib/Lex/HeaderSearch.cpp | |
parent | 6e36c12404269eb4909e85d3be69f78d36d1d297 (diff) |
Change HeaderSearch::getTotalMemory() to use llvm::capacity_in_bytes().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/HeaderSearch.cpp')
-rw-r--r-- | lib/Lex/HeaderSearch.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 789c93f231..11cb1ecd8c 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -18,6 +18,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include "llvm/ADT/SmallString.h" +#include "llvm/Support/Capacity.h" #include <cstdio> using namespace clang; @@ -544,8 +545,8 @@ bool HeaderSearch::ShouldEnterIncludeFile(const FileEntry *File, bool isImport){ size_t HeaderSearch::getTotalMemory() const { return SearchDirs.capacity() - + FileInfo.capacity() - + HeaderMaps.capacity() + + llvm::capacity_in_bytes(FileInfo) + + llvm::capacity_in_bytes(HeaderMaps) + LookupFileCache.getAllocator().getTotalMemory() + FrameworkMap.getAllocator().getTotalMemory(); } |