Attached patch implements -emit-bc option, linking LLVM bitcode writer
directly to clang so that one can produce LLVM bitcode without going
through llvm-as.
If output file is given, bitcode is written to the file. If output
file is not given, the extension is replaced by .bc.
This patch was done mainly by copying similar codes around the
codebase. Please review.
emit-bc.txt (4.83 KB)