[clang-doc] Fix bitcode writer for access specifiers
authorDiego Astiazaran <diegoaat97@gmail.com>
Thu, 15 Aug 2019 23:04:27 +0000 (23:04 +0000)
committerDiego Astiazaran <diegoaat97@gmail.com>
Thu, 15 Aug 2019 23:04:27 +0000 (23:04 +0000)
commit6a29ae4bde963b4f271bd9c0dfb0edd4c0de893c
tree01dc5ba80a5a4769e609e483c9f45aff436bc53c
parent75344955fcd43b67cedec8d5b29ad3419b5aaa81
[clang-doc] Fix bitcode writer for access specifiers

Bitcode writer was not emitting the corresponding record for the Access attribute of a FunctionInfo. This has been added.
AS_none was being used as the default value for any AcesssSpecifier attribute
(in FunctionInfo and MemberTypeInfo), this has been changed to AS_public
because this is the enum value that evaluates to 0.
The bitcode writer doesn't write values that are 0 so if an attribute
was set to AS_public, this value is not written and after reading the
bitcode it would have the default value which is AS_none. This is why
the default value is now AS_public.

Differential Revision: https://reviews.llvm.org/D66151

llvm-svn: 369063
clang-tools-extra/clang-doc/BitcodeWriter.cpp
clang-tools-extra/clang-doc/Representation.h
clang-tools-extra/clang-doc/Serialize.cpp
clang-tools-extra/clang-doc/YAMLGenerator.cpp
clang-tools-extra/test/clang-doc/single-file-public.cpp
clang-tools-extra/unittests/clang-doc/BitcodeTest.cpp
clang-tools-extra/unittests/clang-doc/HTMLGeneratorTest.cpp
clang-tools-extra/unittests/clang-doc/MDGeneratorTest.cpp
clang-tools-extra/unittests/clang-doc/SerializeTest.cpp
clang-tools-extra/unittests/clang-doc/YAMLGeneratorTest.cpp