[cfe-commits] r116864 - /cfe/trunk/lib/Lex/PPDirectives.cpp
Ted Kremenek
kremenek at apple.com
Tue Oct 19 14:40:34 PDT 2010
Author: kremenek
Date: Tue Oct 19 16:40:34 2010
New Revision: 116864
URL: http://llvm.org/viewvc/llvm-project?rev=116864&view=rev
Log:
Revert most of r116862. It isn't quite the right fix for a memory leak in Preprocessor.
Modified:
cfe/trunk/lib/Lex/PPDirectives.cpp
Modified: cfe/trunk/lib/Lex/PPDirectives.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PPDirectives.cpp?rev=116864&r1=116863&r2=116864&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PPDirectives.cpp (original)
+++ cfe/trunk/lib/Lex/PPDirectives.cpp Tue Oct 19 16:40:34 2010
@@ -58,11 +58,7 @@
/// be reused for allocating new MacroInfo objects.
void Preprocessor::ReleaseMacroInfo(MacroInfo *MI) {
MICache.push_back(MI);
- // We need to call 'Destroy' as opposed to 'FreeArgumentList' because
- // the MICache object will get reused with a placement new. This does
- // not cause the underlying SmallVector to get it's memory released, so
- // we need to call Destroy() here.
- MI->Destroy();
+ MI->FreeArgumentList();
}
More information about the cfe-commits
mailing list