[cfe-commits] r155207 - /cfe/trunk/lib/Driver/Driver.cpp
Chad Rosier
mcrosier at apple.com
Fri Apr 20 10:21:42 PDT 2012
Author: mcrosier
Date: Fri Apr 20 12:21:42 2012
New Revision: 155207
URL: http://llvm.org/viewvc/llvm-project?rev=155207&view=rev
Log:
When generating the clang crash diagnostic script, strip out the -o flag.
Add a FIXME comment.
rdar://11283560
Modified:
cfe/trunk/lib/Driver/Driver.cpp
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=155207&r1=155206&r2=155207&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Fri Apr 20 12:21:42 2012
@@ -491,8 +491,8 @@
} else {
// Strip -D, -F, and -I.
// FIXME: This doesn't work with quotes (e.g., -D "foo bar").
- std::string Flag[3] = {"-D ", "-F", "-I "};
- for (unsigned i = 0; i < 3; ++i) {
+ std::string Flag[4] = {"-D ", "-F", "-I ", "-o "};
+ for (unsigned i = 0; i < 4; ++i) {
size_t I = 0, E = 0;
do {
I = Cmd.find(Flag[i], I);
@@ -503,6 +503,7 @@
Cmd.erase(I, E - I + 1);
} while(1);
}
+ // FIXME: Append the new filename with correct preprocessed suffix.
ScriptOS << Cmd;
Diag(clang::diag::note_drv_command_failed_diag_msg) << Script;
}
More information about the cfe-commits
mailing list