[cfe-commits] r136237 - /cfe/trunk/lib/Lex/HeaderSearch.cpp

Ted Kremenek kremenek at apple.com
Wed Jul 27 11:41:18 PDT 2011


Author: kremenek
Date: Wed Jul 27 13:41:18 2011
New Revision: 136237

URL: http://llvm.org/viewvc/llvm-project?rev=136237&view=rev
Log:
Change HeaderSearch::getTotalMemory() to use llvm::capacity_in_bytes().

Modified:
    cfe/trunk/lib/Lex/HeaderSearch.cpp

Modified: cfe/trunk/lib/Lex/HeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/HeaderSearch.cpp?rev=136237&r1=136236&r2=136237&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/HeaderSearch.cpp (original)
+++ cfe/trunk/lib/Lex/HeaderSearch.cpp Wed Jul 27 13:41:18 2011
@@ -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 @@
 
 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();
 }





More information about the cfe-commits mailing list