diff --git a/llvm/tools/gccld/GenerateCode.cpp b/llvm/tools/gccld/GenerateCode.cpp index 1f1a261248f0..f0466ddd3342 100644 --- a/llvm/tools/gccld/GenerateCode.cpp +++ b/llvm/tools/gccld/GenerateCode.cpp @@ -130,7 +130,7 @@ static void dumpArgs(const char **args) { static inline void addPass(PassManager &PM, Pass *P) { // Add the pass to the pass manager... PM.add(P); - + // If we are verifying all of the intermediate steps, add the verifier... if (Verify) PM.add(createVerifierPass()); } @@ -144,12 +144,12 @@ static bool isBytecodeLibrary(const sys::Path &FullPath) { if (FullPath.isArchive() ) { std::string ErrorMessage; Archive* ar = Archive::OpenAndLoadSymbols( FullPath, &ErrorMessage ); - return ar->isBytecodeArchive(); + return ar->isBytecodeArchive(); } return false; } -static bool isBytecodeLPath(const std::string &LibPath) { +static bool isBytecodeLPath(const std::string &LibPath) { bool isBytecodeLPath = false; // Make sure the -L path has a '/' character @@ -174,7 +174,7 @@ static bool isBytecodeLPath(const std::string &LibPath) { if ( File->isDirectory() ) continue; - + std::string path = File->toString(); std::string dllsuffix = sys::Path::GetDLLSuffix(); @@ -183,7 +183,7 @@ static bool isBytecodeLPath(const std::string &LibPath) { if ( path.find(dllsuffix, path.size()-dllsuffix.size()) == std::string::npos && path.find(".a", path.size()-2) == std::string::npos ) continue; - + // Finally, check to see if the file is a true bytecode file if (isBytecodeLibrary(*File)) isBytecodeLPath = true; @@ -391,7 +391,7 @@ int llvm::GenerateNative(const std::string &OutputFilename, args.push_back("-o"); args.push_back(OutputFilename.c_str()); args.push_back(InputFilename.c_str()); - + if (Shared) args.push_back("-shared"); if (!RPath.empty()) { std::string rp = "-Wl,-rpath," + RPath; @@ -401,7 +401,7 @@ int llvm::GenerateNative(const std::string &OutputFilename, std::string so = "-Wl,-soname," + SOName; args.push_back(so.c_str()); } - + // Add in the libpaths to find the libraries. // // Note: diff --git a/llvm/tools/gccld/gccld.cpp b/llvm/tools/gccld/gccld.cpp index 98e7dea32588..2cf5efbe7bd7 100644 --- a/llvm/tools/gccld/gccld.cpp +++ b/llvm/tools/gccld/gccld.cpp @@ -46,9 +46,9 @@ namespace { OutputFilename("o", cl::desc("Override output filename"), cl::init("a.out"), cl::value_desc("filename")); - cl::opt + cl::opt Verbose("v", cl::desc("Print information about actions taken")); - + cl::list LibPaths("L", cl::desc("Specify a library search path"), cl::Prefix, cl::value_desc("directory")); @@ -77,29 +77,29 @@ namespace { Relink("r", cl::desc("Alias for -link-as-library"), cl::aliasopt(LinkAsLibrary)); - cl::opt + cl::opt Native("native", cl::desc("Generate a native binary instead of a shell script")); - cl::opt + cl::opt NativeCBE("native-cbe", cl::desc("Generate a native binary with the C backend and GCC")); - cl::opt + cl::opt SaveTemps("save-temps", cl::desc("Do not delete temporary files")); - + cl::opt RPath("rpath", cl::desc("Set runtime shared library search path (requires -native or" " -native-cbe)"), cl::Prefix, cl::value_desc("directory")); - + cl::opt SOName("soname", cl::desc("Set internal name of shared library (requires -native or" " -native-cbe)"), cl::Prefix, cl::value_desc("name")); - + // Compatibility options that are ignored but supported by LD cl::opt CO4("version-script", cl::Hidden, cl::desc("Compatibility option: ignored")); @@ -317,7 +317,7 @@ int main(int argc, char **argv, char **envp ) { // Remove the bytecode language file. sys::Path(RealBytecodeOutput).destroyFile(); } - + } else if (NativeCBE) { sys::Path CFile (OutputFilename); CFile.appendSuffix("cbe.c"); @@ -352,7 +352,7 @@ int main(int argc, char **argv, char **envp ) { } else if (!LinkAsLibrary) { EmitShellScript(argv); - + // Make the bytecode file readable and directly executable in LLEE sys::Path(RealBytecodeOutput).makeExecutable(); sys::Path(RealBytecodeOutput).makeReadable(); @@ -360,7 +360,7 @@ int main(int argc, char **argv, char **envp ) { // Make the output, whether native or script, executable as well... sys::Path(OutputFilename).makeExecutable(); - + } catch (const char*msg) { std::cerr << argv[0] << ": " << msg << "\n"; exitCode = 1;