diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-07-26 21:17:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-07-26 21:17:24 +0000 |
commit | 91d1bd6ede1d101a2e49719250c33154b39e0016 (patch) | |
tree | 7c549d6ee31d9ba17121d511a141765eafc695a6 /lib/Lex/PreprocessingRecord.cpp | |
parent | bb9d3f1b00aabf3156a431b2a0db21509b235505 (diff) |
Report more memory using in Preprocessor::getTotalMemory() and PreprocessingRecord::getTotalMemory().
Most of the memory was already reported; but now we report more memory from side data structures.
Fixes <rdar://problem/9379717>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PreprocessingRecord.cpp')
-rw-r--r-- | lib/Lex/PreprocessingRecord.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp index 55ae5dc233..2646c04dd5 100644 --- a/lib/Lex/PreprocessingRecord.cpp +++ b/lib/Lex/PreprocessingRecord.cpp @@ -174,3 +174,10 @@ void PreprocessingRecord::InclusionDirective( File, SourceRange(HashLoc, EndLoc)); PreprocessedEntities.push_back(ID); } + +size_t PreprocessingRecord::getTotalMemory() const { + return BumpAlloc.getTotalMemory() + + MacroDefinitions.getMemorySize() + + PreprocessedEntities.capacity() + + LoadedPreprocessedEntities.capacity(); +} |