[llvm-commits] CVS: llvm/tools/llvmc/CompilerDriver.cpp
Reid Spencer
reid at x10sys.com
Sun Apr 10 22:48:15 PDT 2005
Changes in directory llvm/tools/llvmc:
CompilerDriver.cpp updated: 1.26 -> 1.27
---
Log message:
Ensure that the arguments passed to sys::Program::ExecuteAndWait include
the program name as the first argument. Thanks go to Markus Oberhumer for
noticing this problem.
---
Diffs of the changes: (+3 -2)
CompilerDriver.cpp | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
Index: llvm/tools/llvmc/CompilerDriver.cpp
diff -u llvm/tools/llvmc/CompilerDriver.cpp:1.26 llvm/tools/llvmc/CompilerDriver.cpp:1.27
--- llvm/tools/llvmc/CompilerDriver.cpp:1.26 Sun Feb 13 17:10:34 2005
+++ llvm/tools/llvmc/CompilerDriver.cpp Mon Apr 11 00:48:04 2005
@@ -394,8 +394,9 @@
// Invoke the program
const char** Args = (const char**)
- alloca(sizeof(const char*)*(action->args.size()+1));
- for (unsigned i = 0; i != action->args.size(); ++i)
+ alloca(sizeof(const char*)*(action->args.size()+2));
+ Args[0] = action->program.toString().c_str();
+ for (unsigned i = 1; i != action->args.size(); ++i)
Args[i] = action->args[i].c_str();
Args[action->args.size()] = 0; // null terminate list.
if (isSet(TIME_ACTIONS_FLAG)) {
More information about the llvm-commits
mailing list