summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PreprocessingRecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/PreprocessingRecord.cpp')
-rw-r--r--clang/lib/Lex/PreprocessingRecord.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Lex/PreprocessingRecord.cpp b/clang/lib/Lex/PreprocessingRecord.cpp
index 55ae5dc2335..2646c04dd55 100644
--- a/clang/lib/Lex/PreprocessingRecord.cpp
+++ b/clang/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();
+}
OpenPOWER on IntegriCloud