diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-14 00:33:13 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-14 00:33:13 +0000 |
commit | c202b2809ac814bcae8553cd772ec4901fdb8441 (patch) | |
tree | 62ba003fd9543a7e7e961b6b08b09ed314c5a040 /clang/lib/Serialization/ASTWriterStmt.cpp | |
parent | 0fcd749a5186b1d3b1c75cfe028df3cfaba6989f (diff) | |
download | bcm5719-llvm-c202b2809ac814bcae8553cd772ec4901fdb8441.tar.gz bcm5719-llvm-c202b2809ac814bcae8553cd772ec4901fdb8441.zip |
Add an AttributedStmt type to represent a statement with C++11 attributes
attached. Since we do not support any attributes which appertain to a statement
(yet), testing of this is necessarily quite minimal.
Patch by Alexander Kornienko!
llvm-svn: 154723
Diffstat (limited to 'clang/lib/Serialization/ASTWriterStmt.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTWriterStmt.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriterStmt.cpp b/clang/lib/Serialization/ASTWriterStmt.cpp index 827caa026a4..1e312114631 100644 --- a/clang/lib/Serialization/ASTWriterStmt.cpp +++ b/clang/lib/Serialization/ASTWriterStmt.cpp @@ -106,6 +106,14 @@ void ASTStmtWriter::VisitLabelStmt(LabelStmt *S) { Code = serialization::STMT_LABEL; } +void ASTStmtWriter::VisitAttributedStmt(AttributedStmt *S) { + VisitStmt(S); + Writer.WriteAttributes(S->getAttrs(), Record); + Writer.AddStmt(S->getSubStmt()); + Writer.AddSourceLocation(S->getAttrLoc(), Record); + Code = serialization::STMT_ATTRIBUTED; +} + void ASTStmtWriter::VisitIfStmt(IfStmt *S) { VisitStmt(S); Writer.AddDeclRef(S->getConditionVariable(), Record); |