diff options
author | Chris Lattner <sabre@nondot.org> | 2008-04-19 23:09:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-04-19 23:09:31 +0000 |
commit | aa39197431a0a0b1326ecf6b3be6a11f6e2f8503 (patch) | |
tree | d0c1bb58f1f4594fd501f4465a61ddc96e6d5e64 /lib/Lex/Preprocessor.cpp | |
parent | 6bdafbfec5ecc50151b1b66732b168a79cc47531 (diff) |
simplify ownership of the predefines buffer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49973 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 370244b8f6..9240a0aa7f 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -72,8 +72,6 @@ Preprocessor::Preprocessor(Diagnostic &diags, const LangOptions &opts, // This gets unpoisoned where it is allowed. (Ident__VA_ARGS__ = getIdentifierInfo("__VA_ARGS__"))->setIsPoisoned(); - Predefines = 0; - // Initialize the pragma handlers. PragmaHandlers = new PragmaNamespace(0); RegisterBuiltinPragmas(); @@ -112,8 +110,6 @@ Preprocessor::~Preprocessor() { delete ScratchBuf; delete Callbacks; - - delete [] Predefines; } /// Diag - Forwarding function for diagnostics. This emits a diagnostic at @@ -463,7 +459,7 @@ void Preprocessor::EnterMainSourceFile() { InitializePredefinedMacros(*this, PrologFile); // Add on the predefines from the driver. - PrologFile.insert(PrologFile.end(), Predefines,Predefines+strlen(Predefines)); + PrologFile.insert(PrologFile.end(), Predefines.begin(), Predefines.end()); // Memory buffer must end with a null byte! PrologFile.push_back(0); |