llvm-6502/lib/Bitcode/Writer
Tobias Grosser e7bc5bb862 Make .bc en/decoding of AttrKind stable
The bitcode representation attribute kinds are encoded into / decoded from
should be independent of the current set of LLVM attributes and their position
in the AttrKind enum. This patch explicitly encodes attributes to fixed bitcode
values.

With this patch applied, LLVM does not silently misread attributes written by
LLVM 3.3. We also enhance the decoding slightly such that an error message is
printed if an unknown AttrKind encoding was dected.

Bonus: Dropping bitcode attributes from AttrKind is now easy, as old AttrKinds
       do not need to be kept to support the Bitcode reader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187186 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-26 04:16:55 +00:00
..
BitcodeWriter.cpp Make .bc en/decoding of AttrKind stable 2013-07-26 04:16:55 +00:00
BitcodeWriterPass.cpp Code Custodian: 2012-11-25 15:23:39 +00:00
BitWriter.cpp Add a wrapper for open. 2013-07-16 19:44:17 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile
ValueEnumerator.cpp Whitespace cleanup 2013-04-01 02:28:07 +00:00
ValueEnumerator.h Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size. 2013-07-11 16:22:38 +00:00