forked from OSchip/llvm-project
Introduce Preprocessor::getTotalMemory() and use it in CIndex.cpp, no functionality change.
llvm-svn: 134103
This commit is contained in:
parent
dea8cb4fe3
commit
e379ee31c0
|
@ -770,6 +770,8 @@ public:
|
|||
|
||||
void PrintStats();
|
||||
|
||||
size_t getTotalMemory() const;
|
||||
|
||||
/// HandleMicrosoftCommentPaste - When the macro expander pastes together a
|
||||
/// comment (/##/) in microsoft mode, this method handles updating the current
|
||||
/// state, returning the token on the next source line.
|
||||
|
|
|
@ -225,6 +225,10 @@ Preprocessor::macro_begin(bool IncludeExternalMacros) const {
|
|||
return Macros.begin();
|
||||
}
|
||||
|
||||
size_t Preprocessor::getTotalMemory() const {
|
||||
return BP.getTotalMemory();
|
||||
}
|
||||
|
||||
Preprocessor::macro_iterator
|
||||
Preprocessor::macro_end(bool IncludeExternalMacros) const {
|
||||
if (IncludeExternalMacros && ExternalSource &&
|
||||
|
|
|
@ -5400,10 +5400,9 @@ CXTUResourceUsage clang_getCXTUResourceUsage(CXTranslationUnit TU) {
|
|||
|
||||
// How much memory is being used by the Preprocessor?
|
||||
Preprocessor &pp = astUnit->getPreprocessor();
|
||||
const llvm::BumpPtrAllocator &ppAlloc = pp.getPreprocessorAllocator();
|
||||
createCXTUResourceUsageEntry(*entries,
|
||||
CXTUResourceUsage_Preprocessor,
|
||||
ppAlloc.getTotalMemory());
|
||||
pp.getTotalMemory());
|
||||
|
||||
if (PreprocessingRecord *pRec = pp.getPreprocessingRecord()) {
|
||||
createCXTUResourceUsageEntry(*entries,
|
||||
|
|
Loading…
Reference in New Issue