mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
Make sure to null terminate argument lists!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20166 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -247,6 +247,7 @@ int llvm::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]);
|
||||
}
|
||||
@ -263,6 +264,7 @@ int llvm::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]);
|
||||
}
|
||||
|
||||
@ -322,6 +324,7 @@ int llvm::GenerateNative(const std::string &OutputFilename,
|
||||
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);
|
||||
|
Reference in New Issue
Block a user