summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-ld
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-13 23:10:45 +0000
committerChris Lattner <sabre@nondot.org>2005-02-13 23:10:45 +0000
commit9db0eccc4237e325fff4d159daa4b1000ff8b00c (patch)
tree1fc58620fafe7854cd35a96acc8a85d4583ad88c /llvm/tools/llvm-ld
parent61a31c9fe2d83e129c9f5884acd01bb534cb427c (diff)
downloadbcm5719-llvm-9db0eccc4237e325fff4d159daa4b1000ff8b00c.tar.gz
bcm5719-llvm-9db0eccc4237e325fff4d159daa4b1000ff8b00c.zip
Conform to the documented interface by null terminating argument lists!
llvm-svn: 20167
Diffstat (limited to 'llvm/tools/llvm-ld')
-rw-r--r--llvm/tools/llvm-ld/llvm-ld.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-ld/llvm-ld.cpp b/llvm/tools/llvm-ld/llvm-ld.cpp
index f8287f8e8d4..f19c0790298 100644
--- a/llvm/tools/llvm-ld/llvm-ld.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud