[llvm-commits] CVS: llvm/tools/gccld/gccld.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Wed Nov 5 16:14:01 PST 2003
Changes in directory llvm/tools/gccld:
gccld.cpp updated: 1.60 -> 1.61
---
Log message:
Do not assume the first file is a bytecode file. Instead, construct a dummy
Module and link things into that.
Also, fix a typo in an error message.
---
Diffs of the changes: (+3 -5)
Index: llvm/tools/gccld/gccld.cpp
diff -u llvm/tools/gccld/gccld.cpp:1.60 llvm/tools/gccld/gccld.cpp:1.61
--- llvm/tools/gccld/gccld.cpp:1.60 Wed Nov 5 00:05:21 2003
+++ llvm/tools/gccld/gccld.cpp Wed Nov 5 16:13:00 2003
@@ -215,10 +215,8 @@
int main(int argc, char **argv, char **envp) {
cl::ParseCommandLineOptions(argc, argv, " llvm linker for GCC\n");
- std::string ErrorMessage;
- std::auto_ptr<Module> Composite(LoadObject(InputFilenames[0], ErrorMessage));
- if (Composite.get() == 0)
- return PrintAndReturn(argv[0], ErrorMessage);
+ std::string ModuleID ("gccld-output");
+ std::auto_ptr<Module> Composite(new Module(ModuleID));
// We always look first in the current directory when searching for libraries.
LibPaths.insert(LibPaths.begin(), ".");
@@ -257,7 +255,7 @@
// Generate the bytecode file.
if (GenerateBytecode(Composite.get(), Strip, !NoInternalize, &Out)) {
Out.close();
- return PrintAndReturn(argv[0], "error generating bytcode");
+ return PrintAndReturn(argv[0], "error generating bytecode");
}
// Close the bytecode file.
More information about the llvm-commits
mailing list