diff options
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 00d3d56e2e..3fa76fa161 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -95,9 +95,9 @@ Preprocessor::~Preprocessor() { // Free any macro definitions. for (llvm::DenseMap<IdentifierInfo*, MacroInfo*>::iterator I = Macros.begin(), E = Macros.end(); I != E; ++I) { - // Free the macro definition. - delete I->second; - I->second = 0; + // We don't need to free the MacroInfo objects directly. These + // will be released when the BumpPtrAllocator 'BP' object gets + // destroyed. I->first->setHasMacroDefinition(false); } |