summaryrefslogtreecommitdiffstats
path: root/clang
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-10 18:32:59 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-10 18:32:59 +0000
commit8b723e299cdffec3378773f886598c86f0f1b125 (patch)
tree4ddf741b93eed554aea9d14e72cd7eab58cf1fe8 /clang
parenta53274e5ba97b8b623ecdf63c197a15d00e633d4 (diff)
downloadbcm5719-llvm-8b723e299cdffec3378773f886598c86f0f1b125.tar.gz
bcm5719-llvm-8b723e299cdffec3378773f886598c86f0f1b125.zip
Driver: CCC_ADD_ARGS could end up using dangling pointers.
llvm-svn: 68805
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Driver/Driver.cpp2
-rw-r--r--clang/tools/driver/driver.cpp2
2 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index f9a82ff78d4..8768629625d 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -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;
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp
index 3c75bb0d185..94fcf7cc567 100644
--- a/clang/tools/driver/driver.cpp
+++ b/clang/tools/driver/driver.cpp
@@ -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.
OpenPOWER on IntegriCloud