mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-05 12:31:33 +00:00
Eliminate trailing spaces at end-of-line
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21372 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f586ba4ed
commit
704448f83b
@ -130,7 +130,7 @@ static void dumpArgs(const char **args) {
|
|||||||
static inline void addPass(PassManager &PM, Pass *P) {
|
static inline void addPass(PassManager &PM, Pass *P) {
|
||||||
// Add the pass to the pass manager...
|
// Add the pass to the pass manager...
|
||||||
PM.add(P);
|
PM.add(P);
|
||||||
|
|
||||||
// If we are verifying all of the intermediate steps, add the verifier...
|
// If we are verifying all of the intermediate steps, add the verifier...
|
||||||
if (Verify) PM.add(createVerifierPass());
|
if (Verify) PM.add(createVerifierPass());
|
||||||
}
|
}
|
||||||
@ -144,12 +144,12 @@ static bool isBytecodeLibrary(const sys::Path &FullPath) {
|
|||||||
if (FullPath.isArchive() ) {
|
if (FullPath.isArchive() ) {
|
||||||
std::string ErrorMessage;
|
std::string ErrorMessage;
|
||||||
Archive* ar = Archive::OpenAndLoadSymbols( FullPath, &ErrorMessage );
|
Archive* ar = Archive::OpenAndLoadSymbols( FullPath, &ErrorMessage );
|
||||||
return ar->isBytecodeArchive();
|
return ar->isBytecodeArchive();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool isBytecodeLPath(const std::string &LibPath) {
|
static bool isBytecodeLPath(const std::string &LibPath) {
|
||||||
bool isBytecodeLPath = false;
|
bool isBytecodeLPath = false;
|
||||||
|
|
||||||
// Make sure the -L path has a '/' character
|
// Make sure the -L path has a '/' character
|
||||||
@ -174,7 +174,7 @@ static bool isBytecodeLPath(const std::string &LibPath) {
|
|||||||
|
|
||||||
if ( File->isDirectory() )
|
if ( File->isDirectory() )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::string path = File->toString();
|
std::string path = File->toString();
|
||||||
std::string dllsuffix = sys::Path::GetDLLSuffix();
|
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
|
if ( path.find(dllsuffix, path.size()-dllsuffix.size()) == std::string::npos
|
||||||
&& path.find(".a", path.size()-2) == std::string::npos )
|
&& path.find(".a", path.size()-2) == std::string::npos )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Finally, check to see if the file is a true bytecode file
|
// Finally, check to see if the file is a true bytecode file
|
||||||
if (isBytecodeLibrary(*File))
|
if (isBytecodeLibrary(*File))
|
||||||
isBytecodeLPath = true;
|
isBytecodeLPath = true;
|
||||||
@ -391,7 +391,7 @@ int llvm::GenerateNative(const std::string &OutputFilename,
|
|||||||
args.push_back("-o");
|
args.push_back("-o");
|
||||||
args.push_back(OutputFilename.c_str());
|
args.push_back(OutputFilename.c_str());
|
||||||
args.push_back(InputFilename.c_str());
|
args.push_back(InputFilename.c_str());
|
||||||
|
|
||||||
if (Shared) args.push_back("-shared");
|
if (Shared) args.push_back("-shared");
|
||||||
if (!RPath.empty()) {
|
if (!RPath.empty()) {
|
||||||
std::string rp = "-Wl,-rpath," + RPath;
|
std::string rp = "-Wl,-rpath," + RPath;
|
||||||
@ -401,7 +401,7 @@ int llvm::GenerateNative(const std::string &OutputFilename,
|
|||||||
std::string so = "-Wl,-soname," + SOName;
|
std::string so = "-Wl,-soname," + SOName;
|
||||||
args.push_back(so.c_str());
|
args.push_back(so.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add in the libpaths to find the libraries.
|
// Add in the libpaths to find the libraries.
|
||||||
//
|
//
|
||||||
// Note:
|
// Note:
|
||||||
|
@ -46,9 +46,9 @@ namespace {
|
|||||||
OutputFilename("o", cl::desc("Override output filename"), cl::init("a.out"),
|
OutputFilename("o", cl::desc("Override output filename"), cl::init("a.out"),
|
||||||
cl::value_desc("filename"));
|
cl::value_desc("filename"));
|
||||||
|
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
Verbose("v", cl::desc("Print information about actions taken"));
|
Verbose("v", cl::desc("Print information about actions taken"));
|
||||||
|
|
||||||
cl::list<std::string>
|
cl::list<std::string>
|
||||||
LibPaths("L", cl::desc("Specify a library search path"), cl::Prefix,
|
LibPaths("L", cl::desc("Specify a library search path"), cl::Prefix,
|
||||||
cl::value_desc("directory"));
|
cl::value_desc("directory"));
|
||||||
@ -77,29 +77,29 @@ namespace {
|
|||||||
Relink("r", cl::desc("Alias for -link-as-library"),
|
Relink("r", cl::desc("Alias for -link-as-library"),
|
||||||
cl::aliasopt(LinkAsLibrary));
|
cl::aliasopt(LinkAsLibrary));
|
||||||
|
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
Native("native",
|
Native("native",
|
||||||
cl::desc("Generate a native binary instead of a shell script"));
|
cl::desc("Generate a native binary instead of a shell script"));
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
NativeCBE("native-cbe",
|
NativeCBE("native-cbe",
|
||||||
cl::desc("Generate a native binary with the C backend and GCC"));
|
cl::desc("Generate a native binary with the C backend and GCC"));
|
||||||
|
|
||||||
cl::opt<bool>
|
cl::opt<bool>
|
||||||
SaveTemps("save-temps",
|
SaveTemps("save-temps",
|
||||||
cl::desc("Do not delete temporary files"));
|
cl::desc("Do not delete temporary files"));
|
||||||
|
|
||||||
cl::opt<std::string>
|
cl::opt<std::string>
|
||||||
RPath("rpath",
|
RPath("rpath",
|
||||||
cl::desc("Set runtime shared library search path (requires -native or"
|
cl::desc("Set runtime shared library search path (requires -native or"
|
||||||
" -native-cbe)"),
|
" -native-cbe)"),
|
||||||
cl::Prefix, cl::value_desc("directory"));
|
cl::Prefix, cl::value_desc("directory"));
|
||||||
|
|
||||||
cl::opt<std::string>
|
cl::opt<std::string>
|
||||||
SOName("soname",
|
SOName("soname",
|
||||||
cl::desc("Set internal name of shared library (requires -native or"
|
cl::desc("Set internal name of shared library (requires -native or"
|
||||||
" -native-cbe)"),
|
" -native-cbe)"),
|
||||||
cl::Prefix, cl::value_desc("name"));
|
cl::Prefix, cl::value_desc("name"));
|
||||||
|
|
||||||
// Compatibility options that are ignored but supported by LD
|
// Compatibility options that are ignored but supported by LD
|
||||||
cl::opt<std::string>
|
cl::opt<std::string>
|
||||||
CO4("version-script", cl::Hidden, cl::desc("Compatibility option: ignored"));
|
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.
|
// Remove the bytecode language file.
|
||||||
sys::Path(RealBytecodeOutput).destroyFile();
|
sys::Path(RealBytecodeOutput).destroyFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (NativeCBE) {
|
} else if (NativeCBE) {
|
||||||
sys::Path CFile (OutputFilename);
|
sys::Path CFile (OutputFilename);
|
||||||
CFile.appendSuffix("cbe.c");
|
CFile.appendSuffix("cbe.c");
|
||||||
@ -352,7 +352,7 @@ int main(int argc, char **argv, char **envp ) {
|
|||||||
|
|
||||||
} else if (!LinkAsLibrary) {
|
} else if (!LinkAsLibrary) {
|
||||||
EmitShellScript(argv);
|
EmitShellScript(argv);
|
||||||
|
|
||||||
// Make the bytecode file readable and directly executable in LLEE
|
// Make the bytecode file readable and directly executable in LLEE
|
||||||
sys::Path(RealBytecodeOutput).makeExecutable();
|
sys::Path(RealBytecodeOutput).makeExecutable();
|
||||||
sys::Path(RealBytecodeOutput).makeReadable();
|
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...
|
// Make the output, whether native or script, executable as well...
|
||||||
sys::Path(OutputFilename).makeExecutable();
|
sys::Path(OutputFilename).makeExecutable();
|
||||||
|
|
||||||
} catch (const char*msg) {
|
} catch (const char*msg) {
|
||||||
std::cerr << argv[0] << ": " << msg << "\n";
|
std::cerr << argv[0] << ": " << msg << "\n";
|
||||||
exitCode = 1;
|
exitCode = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user