aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Preprocessor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r--lib/Lex/Preprocessor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp
index a5e86bdfe7..4431684216 100644
--- a/lib/Lex/Preprocessor.cpp
+++ b/lib/Lex/Preprocessor.cpp
@@ -228,7 +228,13 @@ Preprocessor::macro_begin(bool IncludeExternalMacros) const {
}
size_t Preprocessor::getTotalMemory() const {
- return BP.getTotalMemory() + MacroExpandedTokens.capacity()*sizeof(Token);
+ return BP.getTotalMemory()
+ + MacroExpandedTokens.capacity()
+ + Predefines.capacity() /* Predefines buffer. */
+ + Macros.getMemorySize()
+ + PragmaPushMacroInfo.getMemorySize()
+ + PoisonReasons.getMemorySize()
+ + CommentHandlers.capacity();
}
Preprocessor::macro_iterator