summaryrefslogtreecommitdiff
path: root/lib/Linker
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 09:29:13 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 09:29:13 +0000
commit4bcca0f2ac85c918fc8617e34b7642e5e5233460 (patch)
treeedde26d0727868dbdf64d84f457c084db5e9a250 /lib/Linker
parentc1d5624d71f7534cfc1bd51b76ead9cea99d3e8d (diff)
downloadllvm-4bcca0f2ac85c918fc8617e34b7642e5e5233460.tar.gz
llvm-4bcca0f2ac85c918fc8617e34b7642e5e5233460.tar.bz2
llvm-4bcca0f2ac85c918fc8617e34b7642e5e5233460.tar.xz
switch this to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36867 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r--lib/Linker/LinkArchives.cpp6
-rw-r--r--lib/Linker/Linker.cpp19
2 files changed, 8 insertions, 17 deletions
diff --git a/lib/Linker/LinkArchives.cpp b/lib/Linker/LinkArchives.cpp
index e6a3b8a523..416b2857db 100644
--- a/lib/Linker/LinkArchives.cpp
+++ b/lib/Linker/LinkArchives.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
//
-// This file contains routines to handle linking together LLVM bytecode files,
+// This file contains routines to handle linking together LLVM bitcode files,
// and to handle annoying things like static libraries.
//
//===----------------------------------------------------------------------===//
@@ -16,7 +16,7 @@
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/ADT/SetOperations.h"
-#include "llvm/Bytecode/Archive.h"
+#include "llvm/Bitcode/Archive.h"
#include "llvm/Config/config.h"
#include <memory>
#include <set>
@@ -96,7 +96,7 @@ Linker::LinkInArchive(const sys::Path &Filename, bool &is_native) {
// Open the archive file
verbose("Linking archive file '" + Filename.toString() + "'");
- // Find all of the symbols currently undefined in the bytecode program.
+ // Find all of the symbols currently undefined in the bitcode program.
// If all the symbols are defined, the program is complete, and there is
// no reason to link in any archive files.
std::set<std::string> UndefinedSymbols;
diff --git a/lib/Linker/Linker.cpp b/lib/Linker/Linker.cpp
index bfa30044dc..077bcd7ba6 100644
--- a/lib/Linker/Linker.cpp
+++ b/lib/Linker/Linker.cpp
@@ -13,16 +13,12 @@
#include "llvm/Linker.h"
#include "llvm/Module.h"
-#include "llvm/Bytecode/Reader.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Config/config.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Streams.h"
-#include "llvm/Support/Compressor.h"
using namespace llvm;
-static const bool Bitcode = false;
-
Linker::Linker(const std::string& progname, const std::string& modname, unsigned flags)
: Composite(0)
, LibPaths()
@@ -107,18 +103,13 @@ Linker::LoadObject(const sys::Path &FN) {
Module *Result = 0;
const std::string &FNS = FN.toString();
- if (Bitcode) {
- std::auto_ptr<MemoryBuffer> Buffer(
+ std::auto_ptr<MemoryBuffer> Buffer(
MemoryBuffer::getFileOrSTDIN(&FNS[0], FNS.size()));
- if (Buffer.get())
- Result = ParseBitcodeFile(Buffer.get(), &ParseErrorMessage);
- else
- ParseErrorMessage = "Error reading file '" + FNS + "'";
+ if (Buffer.get())
+ Result = ParseBitcodeFile(Buffer.get(), &ParseErrorMessage);
+ else
+ ParseErrorMessage = "Error reading file '" + FNS + "'";
- } else {
- Result = ParseBytecodeFile(FNS, Compressor::decompressToNewBuffer,
- &ParseErrorMessage);
- }
if (Result)
return std::auto_ptr<Module>(Result);
Error = "Bytecode file '" + FN.toString() + "' could not be loaded";