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 | f1c388110958c5c0079d3526ce8ac8b2244fd9e0 (patch) | |
| tree | d42e7ea0548af966ee0b70696b38c55cea005d3b | |
| parent | ae63d101ef8dc22bac45d1b1d1ad7e2db3011b17 (diff) | |
| download | bcm5719-llvm-f1c388110958c5c0079d3526ce8ac8b2244fd9e0.tar.gz bcm5719-llvm-f1c388110958c5c0079d3526ce8ac8b2244fd9e0.zip | |
Change PreprocessingRecord::getTotalMemory() to use llvm::capacity_in_bytes().
llvm-svn: 136238
| -rw-r--r-- | clang/lib/Lex/PreprocessingRecord.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Lex/PreprocessingRecord.cpp b/clang/lib/Lex/PreprocessingRecord.cpp index 2646c04dd55..307c8aad2cb 100644 --- a/clang/lib/Lex/PreprocessingRecord.cpp +++ b/clang/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); } |

