mirror of
https://github.com/intel/llvm.git
synced 2026-02-02 18:18:09 +08:00
Serialization support for TagDecl::IsCompleteDefinitionRequired
Requested by Richard Smith in post-commit review of r186262 llvm-svn: 186266
This commit is contained in:
@@ -2578,7 +2578,9 @@ public:
|
||||
|
||||
void setCompleteDefinition(bool V) { IsCompleteDefinition = V; }
|
||||
|
||||
void setCompleteDefinitionRequired() { IsCompleteDefinitionRequired = true; }
|
||||
void setCompleteDefinitionRequired(bool V = true) {
|
||||
IsCompleteDefinitionRequired = V;
|
||||
}
|
||||
|
||||
// FIXME: Return StringRef;
|
||||
const char *getKindName() const {
|
||||
|
||||
@@ -443,6 +443,7 @@ ASTDeclReader::RedeclarableResult ASTDeclReader::VisitTagDecl(TagDecl *TD) {
|
||||
TD->setCompleteDefinition(Record[Idx++]);
|
||||
TD->setEmbeddedInDeclarator(Record[Idx++]);
|
||||
TD->setFreeStanding(Record[Idx++]);
|
||||
TD->setCompleteDefinitionRequired(Record[Idx++]);
|
||||
TD->setRBraceLoc(ReadSourceLocation(Record, Idx));
|
||||
|
||||
if (Record[Idx++]) { // hasExtInfo
|
||||
|
||||
@@ -220,6 +220,7 @@ void ASTDeclWriter::VisitTagDecl(TagDecl *D) {
|
||||
Record.push_back(D->isCompleteDefinition());
|
||||
Record.push_back(D->isEmbeddedInDeclarator());
|
||||
Record.push_back(D->isFreeStanding());
|
||||
Record.push_back(D->isCompleteDefinitionRequired());
|
||||
Writer.AddSourceLocation(D->getRBraceLoc(), Record);
|
||||
Record.push_back(D->hasExtInfo());
|
||||
if (D->hasExtInfo())
|
||||
@@ -1448,6 +1449,7 @@ void ASTWriter::WriteDeclsBlockAbbrevs() {
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isCompleteDefinition
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // EmbeddedInDeclarator
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsFreeStanding
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsCompleteDefinitionRequired
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SourceLocation
|
||||
Abv->Add(BitCodeAbbrevOp(0)); // hasExtInfo
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypedefNameAnonDecl
|
||||
@@ -1495,6 +1497,7 @@ void ASTWriter::WriteDeclsBlockAbbrevs() {
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // isCompleteDefinition
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // EmbeddedInDeclarator
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsFreeStanding
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::Fixed, 1)); // IsCompleteDefinitionRequired
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // SourceLocation
|
||||
Abv->Add(BitCodeAbbrevOp(0)); // hasExtInfo
|
||||
Abv->Add(BitCodeAbbrevOp(BitCodeAbbrevOp::VBR, 6)); // TypedefNameAnonDecl
|
||||
|
||||
Reference in New Issue
Block a user