summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp')
-rw-r--r--contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp b/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp
index 2eeb090..007ecee 100644
--- a/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp
+++ b/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp
@@ -159,9 +159,18 @@ void ASTStmtReader::VisitLabelStmt(LabelStmt *S) {
S->setIdentLoc(ReadSourceLocation(Record, Idx));
}
+void ASTStmtReader::VisitAttributedStmt(AttributedStmt *S) {
+ VisitStmt(S);
+ AttrVec Attrs;
+ Reader.ReadAttributes(F, Attrs, Record, Idx);
+ S->Attrs = Attrs;
+ S->SubStmt = Reader.ReadSubStmt();
+ S->AttrLoc = ReadSourceLocation(Record, Idx);
+}
+
void ASTStmtReader::VisitIfStmt(IfStmt *S) {
VisitStmt(S);
- S->setConditionVariable(Reader.getContext(),
+ S->setConditionVariable(Reader.getContext(),
ReadDeclAs<VarDecl>(Record, Idx));
S->setCond(Reader.ReadSubExpr());
S->setThen(Reader.ReadSubStmt());
@@ -1630,6 +1639,10 @@ Stmt *ASTReader::ReadStmtFromStream(ModuleFile &F) {
S = new (Context) LabelStmt(Empty);
break;
+ case STMT_ATTRIBUTED:
+ S = new (Context) AttributedStmt(Empty);
+ break;
+
case STMT_IF:
S = new (Context) IfStmt(Empty);
break;
OpenPOWER on IntegriCloud