llvm.org GIT mirror llvm / 17be679
default to emiting an uncompressed .bc file git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33420 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
10 changed file(s) with 12 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
2626 bool CompressFile;
2727 public:
2828 WriteBytecodePass()
29 : Out(&cout), DeleteStream(false), CompressFile(true) {}
30 WriteBytecodePass(OStream *o, bool DS = false, bool CF = true)
29 : Out(&cout), DeleteStream(false), CompressFile(false) {}
30 WriteBytecodePass(OStream *o, bool DS = false, bool CF = false)
3131 : Out(o), DeleteStream(DS), CompressFile(CF) {}
3232
3333 inline ~WriteBytecodePass() {
2222 /// stream. If compress is set to true, try to use compression when writing
2323 /// out the file. This can never fail if M is a well-formed module.
2424 void WriteBytecodeToFile(const Module *M, OStream &Out,
25 bool compress = true);
25 bool compress = false);
2626 } // End llvm namespace
2727
2828 #endif
5656 if (!Out.good()) return true;
5757 try {
5858 OStream L(Out);
59 WriteBytecodeToFile(M ? M : Program, L, /*compression=*/true);
59 WriteBytecodeToFile(M ? M : Program, L, /*compression=*/false);
6060 } catch (...) {
6161 return true;
6262 }
5353 cl::desc("Strip debugger symbol info from translation unit"));
5454
5555 cl::opt
56 NoCompress("disable-compression", cl::init(false),
56 NoCompress("disable-compression", cl::init(true),
5757 cl::desc("Don't compress the generated bytecode"));
5858
5959 cl::opt TF("traditional-format", cl::Hidden,
4141 cl::desc("Do not run any optimization passes"));
4242
4343 cl::opt
44 NoCompress("disable-compression", cl::init(false),
44 NoCompress("disable-compression", cl::init(true),
4545 cl::desc("Don't compress the generated bytecode"));
4646 }
4747
4242 DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
4343
4444 static cl::opt
45 NoCompress("disable-compression", cl::init(false),
45 NoCompress("disable-compression", cl::init(true),
4646 cl::desc("Don't compress the generated bytecode"));
4747
4848 static cl::opt
7373 static cl::optNativeCBE("native-cbe",
7474 cl::desc("Generate a native binary with the C backend and GCC"));
7575
76 static cl::optDisableCompression("disable-compression",cl::init(false),
76 static cl::optDisableCompression("disable-compression", cl::init(true),
7777 cl::desc("Disable writing of compressed bytecode files"));
7878
7979 static cl::list PostLinkOpts("post-link-opts",
4242 static cl::opt
4343 DumpAsm("d", cl::desc("Print assembly as linked"), cl::Hidden);
4444
45 static cl::opt NoCompress("disable-compression", cl::init(false),
45 static cl::opt NoCompress("disable-compression", cl::init(true),
4646 cl::desc("Don't compress the generated bytecode"));
4747
4848 // LoadFile - Read the specified bytecode file in and return it. This routine
363363 tempFileName += "0.bc";
364364 std::ofstream Out(tempFileName.c_str(), io_mode);
365365 OStream L(Out);
366 WriteBytecodeToFile(bigOne, L, true);
366 WriteBytecodeToFile(bigOne, L);
367367 }
368368
369369 // Strip leading underscore because it was added to match names
417417 tempFileName += "1.bc";
418418 std::ofstream Out(tempFileName.c_str(), io_mode);
419419 OStream L(Out);
420 WriteBytecodeToFile(bigOne, L, true);
420 WriteBytecodeToFile(bigOne, L);
421421 }
422422
423423 targetTriple = bigOne->getTargetTriple();
4040 static cl::list
4141 PassList(cl::desc("Optimizations available:"));
4242
43 static cl::opt NoCompress("disable-compression", cl::init(false),
43 static cl::opt NoCompress("disable-compression", cl::init(true),
4444 cl::desc("Don't compress the generated bytecode"));
4545
4646 // Other command line options...