Add a little wrapper header that is put around bc files when emitting
authorChris Lattner <sabre@nondot.org>
Wed, 9 Jul 2008 05:14:23 +0000 (05:14 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 9 Jul 2008 05:14:23 +0000 (05:14 +0000)
commit6fa6a32e4e2fdbb77c82fd7f64a7232cdcac994e
tree914c16b89dfc2af72fe4eb3a213c4db392be03c2
parentb02b8af3780e4e7942cb6e5d25260a608076fe6d
Add a little wrapper header that is put around bc files when emitting
bc files for modules with a target triple that indicates they are for
darwin.  The reader unconditionally handles this, and the writer could
turn this on for more targets if we care.

This change has two benefits for darwin:

1) it allows us to encode the cpu type of the file in an easy to read
   place that doesn't require decoding the bc file.
2) it works around a bug (IMO) in darwin's AR where it is incapable of
   handling files that are not a multiple of 8 bytes long.  BC files
   are only guaranteed to be multiples of 4 bytes long.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53275 91177308-0d34-0410-b5e6-96231b3b80d8
docs/BitCodeFormat.html
include/llvm/Bitcode/BitstreamWriter.h
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/System/Path.cpp