diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-12-14 04:20:08 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-12-14 04:20:08 +0000 |
commit | 6da1e0d50fabbe3ab9e68d9640cc1ed2fd44ae6e (patch) | |
tree | 28199bbd9a6ae448314bcf5b1cc45a481e38683c /tools/gccld/gccld.cpp | |
parent | e2e2411f40af9611c3a0c00e21acbf86946b1fd4 (diff) |
For PR351:
* Change ExecWait calls to sys::Program::ExecuteAndWait
* Convert to use sys::Path where it makes sense
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18929 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld/gccld.cpp')
-rw-r--r-- | tools/gccld/gccld.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp index 3b31fe848d..938648a2e5 100644 --- a/tools/gccld/gccld.cpp +++ b/tools/gccld/gccld.cpp @@ -283,20 +283,19 @@ int main(int argc, char **argv, char **envp ) { sys::RemoveFileOnSignal(sys::Path(OutputFilename)); // Determine the locations of the llc and gcc programs. - std::string llc = FindExecutable("llc", argv[0]).toString(); - if (llc.empty()) + sys::Path llc = FindExecutable("llc", argv[0]); + if (llc.isEmpty()) return PrintAndReturn(argv[0], "Failed to find llc"); - std::string gcc = FindExecutable("gcc", argv[0]).toString(); - if (gcc.empty()) + sys::Path gcc = FindExecutable("gcc", argv[0]); + if (gcc.isEmpty()) return PrintAndReturn(argv[0], "Failed to find gcc"); // Generate an assembly language file for the bytecode. if (Verbose) std::cout << "Generating Assembly Code\n"; - GenerateAssembly(AssemblyFile, RealBytecodeOutput, llc, envp ); + GenerateAssembly(AssemblyFile, RealBytecodeOutput, llc); if (Verbose) std::cout << "Generating Native Code\n"; - GenerateNative(OutputFilename, AssemblyFile, Libraries, LibPaths, - gcc, envp ); + GenerateNative(OutputFilename, AssemblyFile, Libraries, gcc, envp ); // Remove the assembly language file. removeFile (AssemblyFile); @@ -308,19 +307,19 @@ int main(int argc, char **argv, char **envp ) { sys::RemoveFileOnSignal(sys::Path(OutputFilename)); // Determine the locations of the llc and gcc programs. - std::string llc = FindExecutable("llc", argv[0]).toString(); - if (llc.empty()) + sys::Path llc = FindExecutable("llc", argv[0]); + if (llc.isEmpty()) return PrintAndReturn(argv[0], "Failed to find llc"); - std::string gcc = FindExecutable("gcc", argv[0]).toString(); - if (gcc.empty()) + sys::Path gcc = FindExecutable("gcc", argv[0]); + if (gcc.isEmpty()) return PrintAndReturn(argv[0], "Failed to find gcc"); // Generate an assembly language file for the bytecode. if (Verbose) std::cout << "Generating Assembly Code\n"; - GenerateCFile(CFile, RealBytecodeOutput, llc, envp ); + GenerateCFile(CFile, RealBytecodeOutput, llc); if (Verbose) std::cout << "Generating Native Code\n"; - GenerateNative(OutputFilename, CFile, Libraries, LibPaths, gcc, envp ); + GenerateNative(OutputFilename, CFile, Libraries, gcc, envp ); // Remove the assembly language file. removeFile(CFile); |