This adds support for embedding bitcode in a binary during LTO. The libLTO gains supports the -lto-embed-bitcode flag. The option allows users of the LTO library to embed a bitcode section. For example, LLD can pass the option via ld.lld -mllvm=-lto-embed-bitcode.
This feature allows doing something comparable to clang -c -fembed-bitcode, but on the (LTO) linker level. Having bitcode alongside native code has many use-cases. To give an example, the MacOS linker can create a -bitcode_bundle section containing bitcode. Also, having this feature built into LLVM is an alternative to 3rd party tools such as wllvm or gllvm. As with these tools, this feature simplifies creating "whole-program" llvm bitcode files, but in contrast to wllvm/gllvm it does not rely on a specific llvm frontend/driver.
moved to llvm/lib/Bitcode/Writer/BitcodeWriter.cpp