diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-07-27 18:41:20 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-07-27 18:41:20 +0000 |
commit | e3c20a8cf8b5fdbd88c416a25452179a5a9f3b56 (patch) | |
tree | 59795e20075c89cc1d43647e1c5d6350051a3b7a /lib/Lex/PreprocessingRecord.cpp | |
parent | eabea45e23abc07e917f0d4bce15054ce75623ef (diff) |
Change PreprocessingRecord::getTotalMemory() to use llvm::capacity_in_bytes().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PreprocessingRecord.cpp')
-rw-r--r-- | lib/Lex/PreprocessingRecord.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp index 2646c04dd5..307c8aad2c 100644 --- a/lib/Lex/PreprocessingRecord.cpp +++ b/lib/Lex/PreprocessingRecord.cpp @@ -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 @@ void PreprocessingRecord::InclusionDirective( 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); } |