diff options
author | Julie Hockett <juliehockett@google.com> | 2019-06-24 19:31:02 +0000 |
---|---|---|
committer | Julie Hockett <juliehockett@google.com> | 2019-06-24 19:31:02 +0000 |
commit | b1f01e27ec0cea2f28eaa2026aa1e63a3b2ae0f0 (patch) | |
tree | c35282329e294ecf439e4908611a8a61345ac6e9 /clang-tools-extra/clang-doc/BitcodeReader.cpp | |
parent | ea08248b2bc9ab6cd14cfd1a05c4fb0fae49e97a (diff) | |
download | bcm5719-llvm-b1f01e27ec0cea2f28eaa2026aa1e63a3b2ae0f0.tar.gz bcm5719-llvm-b1f01e27ec0cea2f28eaa2026aa1e63a3b2ae0f0.zip |
[clang-doc] Add basic support for templates and typedef
In serialize::parseBases(...), when a base record is a template
specialization, the specialization was used as the parent. It should be
the base template so there is only one file generated for this record.
When the specialized template is implicitly declared the reference USR
corresponded to the GlobalNamespace's USR, this will now be the base
template's USR.
More information about templates will be added later.
In serialize::emiInfo(RecorDecl*, ...), typedef records were not handled
and the name was empty. This is now handled and a IsTypeDef attribute is
added to RecordInfo struct.
In serialize::emitInfo(CXXMethodDecl*, ...), template specialization is
handled like in serialize::parseBases(...).
Bitcode writer and reader are modified to handle the new attribute of
RecordInfo.
Submitted on behalf of Diego Astiazarán (diegoaat97@gmail.com)
Differential Revision: https://reviews.llvm.org/D63367
llvm-svn: 364222
Diffstat (limited to 'clang-tools-extra/clang-doc/BitcodeReader.cpp')
-rw-r--r-- | clang-tools-extra/clang-doc/BitcodeReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-doc/BitcodeReader.cpp b/clang-tools-extra/clang-doc/BitcodeReader.cpp index 04e5d7d24f1..4489daf3d92 100644 --- a/clang-tools-extra/clang-doc/BitcodeReader.cpp +++ b/clang-tools-extra/clang-doc/BitcodeReader.cpp @@ -167,6 +167,8 @@ llvm::Error parseRecord(Record R, unsigned ID, llvm::StringRef Blob, return decodeRecord(R, I->Loc, Blob); case RECORD_TAG_TYPE: return decodeRecord(R, I->TagType, Blob); + case RECORD_IS_TYPE_DEF: + return decodeRecord(R, I->IsTypeDef, Blob); default: return llvm::make_error<llvm::StringError>( "Invalid field for RecordInfo.\n", llvm::inconvertibleErrorCode()); |