summaryrefslogtreecommitdiff
path: root/tools/llvm-as
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-as
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-as')
-rw-r--r--tools/llvm-as/Makefile2
-rw-r--r--tools/llvm-as/llvm-as.cpp23
2 files changed, 5 insertions, 20 deletions
diff --git a/tools/llvm-as/Makefile b/tools/llvm-as/Makefile
index ce2ab9438a..c86b900b22 100644
--- a/tools/llvm-as/Makefile
+++ b/tools/llvm-as/Makefile
@@ -9,7 +9,7 @@
LEVEL = ../..
TOOLNAME = llvm-as
-LINK_COMPONENTS := asmparser bcwriter bitwriter
+LINK_COMPONENTS := asmparser bitwriter
REQUIRES_EH := 1
include $(LEVEL)/Makefile.common
diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp
index a7463b532e..e4c7344776 100644
--- a/tools/llvm-as/llvm-as.cpp
+++ b/tools/llvm-as/llvm-as.cpp
@@ -9,15 +9,14 @@
//
// This utility may be invoked in the following manner:
// llvm-as --help - Output information about command line switches
-// llvm-as [options] - Read LLVM asm from stdin, write bytecode to stdout
-// llvm-as [options] x.ll - Read LLVM asm from the x.ll file, write bytecode
+// llvm-as [options] - Read LLVM asm from stdin, write bitcode to stdout
+// llvm-as [options] x.ll - Read LLVM asm from the x.ll file, write bitcode
// to the x.bc file.
//
//===----------------------------------------------------------------------===//
#include "llvm/Module.h"
#include "llvm/Assembly/Parser.h"
-#include "llvm/Bytecode/Writer.h"
#include "llvm/Analysis/Verifier.h"
#include "llvm/Bitcode/ReaderWriter.h"
#include "llvm/Support/CommandLine.h"
@@ -44,17 +43,9 @@ static cl::opt<bool>
DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
static cl::opt<bool>
-NoCompress("disable-compression", cl::init(true),
- cl::desc("Don't compress the generated bytecode"));
-
-static cl::opt<bool>
DisableVerify("disable-verify", cl::Hidden,
cl::desc("Do not run verifier on input LLVM (dangerous!)"));
-static cl::opt<bool>
-EnableBitcode("bitcode", cl::desc("Emit bitcode"));
-
-
int main(int argc, char **argv) {
llvm_shutdown_obj X; // Call llvm_shutdown() on exit.
cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
@@ -134,14 +125,8 @@ int main(int argc, char **argv) {
return 1;
}
- if (Force || !CheckBytecodeOutputToConsole(Out,true)) {
- if (EnableBitcode) {
- WriteBitcodeToFile(M.get(), *Out);
- } else {
- OStream L(*Out);
- WriteBytecodeToFile(M.get(), L, !NoCompress);
- }
- }
+ if (Force || !CheckBytecodeOutputToConsole(Out,true))
+ WriteBitcodeToFile(M.get(), *Out);
} catch (const std::string& msg) {
cerr << argv[0] << ": " << msg << "\n";
exitCode = 1;