[llvm-commits] CVS: llvm/tools/llvm-ld/llvm-ld.cpp
Reid Spencer
reid at x10sys.com
Sat Sep 25 09:00:17 PDT 2004
Changes in directory llvm/tools/llvm-ld:
llvm-ld.cpp updated: 1.1 -> 1.2
---
Log message:
Add some missing #includes
---
Diffs of the changes: (+8 -4)
Index: llvm/tools/llvm-ld/llvm-ld.cpp
diff -u llvm/tools/llvm-ld/llvm-ld.cpp:1.1 llvm/tools/llvm-ld/llvm-ld.cpp:1.2
--- llvm/tools/llvm-ld/llvm-ld.cpp:1.1 Sun Sep 12 20:27:53 2004
+++ llvm/tools/llvm-ld/llvm-ld.cpp Sat Sep 25 11:00:07 2004
@@ -26,6 +26,8 @@
#include "llvm/Bytecode/Reader.h"
#include "llvm/Bytecode/WriteBytecodePass.h"
#include "llvm/Target/TargetData.h"
+#include "llvm/Target/TargetMachine.h"
+#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Transforms/IPO.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Support/Linker.h"
@@ -82,6 +84,9 @@
Relink("r", cl::desc("Alias for -link-as-library"),
cl::aliasopt(LinkAsLibrary));
+ cl::opt<const TargetMachineRegistry::Entry*, false, TargetNameParser>
+ MachineArch("march", cl::desc("Architecture to generate assembly for:"));
+
cl::opt<bool>
Native("native",
cl::desc("Generate a native binary instead of a shell script"));
@@ -184,7 +189,7 @@
cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n");
sys::PrintStackTraceOnErrorSignal();
- std::string ModuleID("gccld-output");
+ std::string ModuleID("llvm-ld-output");
std::auto_ptr<Module> Composite(new Module(ModuleID));
// We always look first in the current directory when searching for libraries.
@@ -203,12 +208,11 @@
if (LinkFiles(argv[0], Composite.get(), InputFilenames, Verbose))
return 1; // Error already printed
+ // Link in all of the libraries next...
if (!LinkAsLibrary)
LinkLibraries(argv[0], Composite.get(), Libraries, LibPaths,
Verbose, Native);
- // Link in all of the libraries next...
-
// Create the output file.
std::string RealBytecodeOutput = OutputFilename;
if (!LinkAsLibrary) RealBytecodeOutput += ".bc";
@@ -218,7 +222,7 @@
"' for writing!");
// Ensure that the bytecode file gets removed from the disk if we get a
- // SIGINT signal.
+ // terminating signal.
sys::RemoveFileOnSignal(RealBytecodeOutput);
// Generate the bytecode file.
More information about the llvm-commits
mailing list