summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PPDirectives.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-10-19 21:40:34 +0000
committerTed Kremenek <kremenek@apple.com>2010-10-19 21:40:34 +0000
commit60ba93cd62b36cfa625b2ec08bc30690d5d95dd9 (patch)
tree92ac4f2a0ed8f5ac38748342fed85d233e4d9694 /clang/lib/Lex/PPDirectives.cpp
parent3ed6338ff2da9836e33bac15bab480718de7caaa (diff)
downloadbcm5719-llvm-60ba93cd62b36cfa625b2ec08bc30690d5d95dd9.tar.gz
bcm5719-llvm-60ba93cd62b36cfa625b2ec08bc30690d5d95dd9.zip
Revert most of r116862. It isn't quite the right fix for a memory leak in Preprocessor.
llvm-svn: 116864
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index 9138af064f2..b958d9e489f 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -58,11 +58,7 @@ MacroInfo *Preprocessor::CloneMacroInfo(const MacroInfo &MacroToClone) {
/// 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();
}
OpenPOWER on IntegriCloud