diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-13 17:11:24 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-13 17:11:24 +0000 |
commit | caaa7df2c78bbd40197823034c0275f3dcbd63e7 (patch) | |
tree | 7a0a65d87706be1009b4d0fa1c0e4bf4548a0f43 /lib/Lex/Preprocessor.cpp | |
parent | ed04c4cdca11119cac7d2fd65685444ce25f9e37 (diff) |
Using llvm::OwningPtr<> for CurLexer and CurTokenLexer. This makes both the ownership semantics of these objects explicit within the Preprocessor and also tightens up the code (explicit deletes not needed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 901bcd08ce..c65b546209 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -87,9 +87,6 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, Preprocessor::~Preprocessor() { assert(BacktrackPositions.empty() && "EnableBacktrack/Backtrack imbalance!"); - // Free any active lexers. - delete CurLexer; - while (!IncludeMacroStack.empty()) { delete IncludeMacroStack.back().TheLexer; delete IncludeMacroStack.back().TheTokenLexer; |