summaryrefslogtreecommitdiff
path: root/tools/llvm-ar
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-06 09:29:57 +0000
committerChris Lattner <sabre@nondot.org>2007-05-06 09:29:57 +0000
commit44dadffe4bd58ab32961ca5fe537e8ba69c09243 (patch)
tree745eccd4ec6ba93e89d8c2d992db470dbd025134 /tools/llvm-ar
parent4bcca0f2ac85c918fc8617e34b7642e5e5233460 (diff)
downloadllvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.gz
llvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.bz2
llvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.xz
switch tools to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ar')
-rw-r--r--tools/llvm-ar/llvm-ar.cpp21
1 files changed, 5 insertions, 16 deletions
diff --git a/tools/llvm-ar/llvm-ar.cpp b/tools/llvm-ar/llvm-ar.cpp
index 7f6afc6bee..d0601c66c1 100644
--- a/tools/llvm-ar/llvm-ar.cpp
+++ b/tools/llvm-ar/llvm-ar.cpp
@@ -13,9 +13,8 @@
//===----------------------------------------------------------------------===//
#include "llvm/Module.h"
-#include "llvm/Bytecode/Archive.h"
+#include "llvm/Bitcode/Archive.h"
#include "llvm/Support/CommandLine.h"
-#include "llvm/Support/Compressor.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/System/Signals.h"
#include <iostream>
@@ -364,14 +363,8 @@ bool doPrint(std::string* ErrMsg) {
if (Verbose)
std::cout << "Printing " << I->getPath().toString() << "\n";
- if (I->isCompressedBytecode())
- Compressor::decompressToStream(data+4,I->getSize()-4,std::cout);
- else if (I->isCompressed()) {
- Compressor::decompressToStream(data,I->getSize(),std::cout);
- } else {
- unsigned len = I->getSize();
- std::cout.write(data, len);
- }
+ unsigned len = I->getSize();
+ std::cout.write(data, len);
} else {
countDown--;
}
@@ -469,12 +462,8 @@ doExtract(std::string* ErrMsg) {
const char* data = reinterpret_cast<const char*>(I->getData());
unsigned len = I->getSize();
- // Write the data, making sure to uncompress things first
- if (I->isCompressed()) {
- Compressor::decompressToStream(data,len,file);
- } else {
- file.write(data,len);
- }
+ // Write the data.
+ file.write(data,len);
file.close();
// If we're supposed to retain the original modification times, etc. do so