diff options
author | Chris Lattner <sabre@nondot.org> | 2005-02-13 23:10:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-02-13 23:10:45 +0000 |
commit | 7456e3ce3874ed99807a1394011c4b0c6e2ecaa0 (patch) | |
tree | 7377143158b818527bc7bc080e6121ba5f56eb48 /tools/llvm-ld/llvm-ld.cpp | |
parent | ed5fa58a07d0383c239ab98d532f8f6047fbb215 (diff) |
Conform to the documented interface by null terminating argument lists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20167 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld/llvm-ld.cpp')
-rw-r--r-- | tools/llvm-ld/llvm-ld.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index f8287f8e8d..f19c079029 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -225,6 +225,7 @@ static int GenerateAssembly(const std::string &OutputFilename, args.push_back( "-o"); args.push_back( OutputFilename.c_str() ); args.push_back( InputFilename.c_str() ); + args.push_back(0); return sys::Program::ExecuteAndWait(llc,&args[0]); } @@ -241,6 +242,7 @@ static int GenerateCFile(const std::string &OutputFile, args.push_back( "-o"); args.push_back( OutputFile.c_str() ); args.push_back( InputFile.c_str() ); + args.push_back(0); return sys::Program::ExecuteAndWait(llc, &args[0]); } @@ -300,6 +302,7 @@ static int GenerateNative(const std::string &OutputFilename, args.push_back("-l"); args.push_back(Libraries[index].c_str()); } + args.push_back(0); // Run the compiler to assembly and link together the program. return sys::Program::ExecuteAndWait(gcc, &args[0], (const char**)clean_env); |