summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/HeaderSearch.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-07-27 18:41:18 +0000
committerTed Kremenek <kremenek@apple.com>2011-07-27 18:41:18 +0000
commitae63d101ef8dc22bac45d1b1d1ad7e2db3011b17 (patch)
tree3c1fabec4fa9ae2b990e1cda3ce1041740309ede /clang/lib/Lex/HeaderSearch.cpp
parent43e0c4a8878b8778fb17202936607510704e796f (diff)
downloadbcm5719-llvm-ae63d101ef8dc22bac45d1b1d1ad7e2db3011b17.tar.gz
bcm5719-llvm-ae63d101ef8dc22bac45d1b1d1ad7e2db3011b17.zip
Change HeaderSearch::getTotalMemory() to use llvm::capacity_in_bytes().
llvm-svn: 136237
Diffstat (limited to 'clang/lib/Lex/HeaderSearch.cpp')
-rw-r--r--clang/lib/Lex/HeaderSearch.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Lex/HeaderSearch.cpp b/clang/lib/Lex/HeaderSearch.cpp
index 789c93f2318..11cb1ecd8cd 100644
--- a/clang/lib/Lex/HeaderSearch.cpp
+++ b/clang/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();
}
OpenPOWER on IntegriCloud