[cfe-commits] r136238 - /cfe/trunk/lib/Lex/PreprocessingRecord.cpp

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


Author: kremenek
Date: Wed Jul 27 13:41:20 2011
New Revision: 136238

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

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

Modified: cfe/trunk/lib/Lex/PreprocessingRecord.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PreprocessingRecord.cpp?rev=136238&r1=136237&r2=136238&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PreprocessingRecord.cpp (original)
+++ cfe/trunk/lib/Lex/PreprocessingRecord.cpp Wed Jul 27 13:41:20 2011
@@ -16,6 +16,7 @@
 #include "clang/Lex/Token.h"
 #include "clang/Basic/IdentifierTable.h"
 #include "llvm/Support/ErrorHandling.h"
+#include "llvm/Support/Capacity.h"
 
 using namespace clang;
 
@@ -177,7 +178,7 @@
 
 size_t PreprocessingRecord::getTotalMemory() const {
   return BumpAlloc.getTotalMemory()
-    + MacroDefinitions.getMemorySize()
-    + PreprocessedEntities.capacity()
-    + LoadedPreprocessedEntities.capacity();
+    + llvm::capacity_in_bytes(MacroDefinitions)
+    + llvm::capacity_in_bytes(PreprocessedEntities)
+    + llvm::capacity_in_bytes(LoadedPreprocessedEntities);
 }





More information about the cfe-commits mailing list