Driver: CCC_ADD_ARGS could end up using dangling pointers.

llvm-svn: 68805
This commit is contained in:
Daniel Dunbar 2009-04-10 18:32:59 +00:00
parent a53274e5ba
commit 8b723e299c
2 changed files with 1 additions and 3 deletions

View File

@ -109,8 +109,6 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
// FIXME: What are we going to do with -V and -b?
// FIXME: Handle CCC_ADD_ARGS.
// FIXME: This stuff needs to go into the Compilation, not the
// driver.
bool CCCPrintOptions = false, CCCPrintActions = false;

View File

@ -86,8 +86,8 @@ int main(int argc, const char **argv) {
llvm::OwningPtr<Compilation> C;
// Handle CCC_ADD_ARGS, a comma separated list of extra arguments.
std::set<std::string> SavedStrings;
if (const char *Cur = ::getenv("CCC_ADD_ARGS")) {
std::set<std::string> SavedStrings;
std::vector<const char*> StringPointers;
// FIXME: Driver shouldn't take extra initial argument.