summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-11-05 22:13:00 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-11-05 22:13:00 +0000
commit00cc86a8fcb8daabceab3cd8ca29d6f47c5091ee (patch)
treebbea8cc41f1687af087a7a33125c6468e1a0428f /tools
parent3b3640a3733c6ecdba4a8ca2ca9d28a6ce957769 (diff)
downloadllvm-00cc86a8fcb8daabceab3cd8ca29d6f47c5091ee.tar.gz
llvm-00cc86a8fcb8daabceab3cd8ca29d6f47c5091ee.tar.bz2
llvm-00cc86a8fcb8daabceab3cd8ca29d6f47c5091ee.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9748 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r--tools/gccld/gccld.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/gccld/gccld.cpp b/tools/gccld/gccld.cpp
index dd1c92f38c..45163f4396 100644
--- a/tools/gccld/gccld.cpp
+++ b/tools/gccld/gccld.cpp
@@ -215,10 +215,8 @@ void RemoveEnv(const char * name, char ** const envp) {
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 @@ int main(int argc, char **argv, char **envp) {
// 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.