diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-15 16:40:40 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-15 16:40:40 +0000 |
| commit | ec4d626ce2f86e0a2a87f996b23c501f14ba86a8 (patch) | |
| tree | 2fe0e7458197e61d81ec7587795c3cbc76a5ec39 /lib/Lex/Preprocessor.cpp | |
| parent | d1572b6b7001666531620c8a47b59de12539b2d8 (diff) | |
| download | clang-ec4d626ce2f86e0a2a87f996b23c501f14ba86a8.tar.gz clang-ec4d626ce2f86e0a2a87f996b23c501f14ba86a8.tar.bz2 clang-ec4d626ce2f86e0a2a87f996b23c501f14ba86a8.tar.xz | |
Preprocessor: Clarify the ownership of the IncludeMacroStack with unique_ptr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
| -rw-r--r-- | lib/Lex/Preprocessor.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 2125d180e8..d85df38ea7 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -143,11 +143,7 @@ Preprocessor::Preprocessor(IntrusiveRefCntPtr<PreprocessorOptions> PPOpts, Preprocessor::~Preprocessor() { assert(BacktrackPositions.empty() && "EnableBacktrack/Backtrack imbalance!"); - while (!IncludeMacroStack.empty()) { - delete IncludeMacroStack.back().TheLexer; - delete IncludeMacroStack.back().TheTokenLexer; - IncludeMacroStack.pop_back(); - } + IncludeMacroStack.clear(); // Free any macro definitions. for (MacroInfoChain *I = MIChainHead ; I ; I = I->Next) |
