[OPENMP50]Basic support for uses_allocators clause.
Summary: Added parsing/sema/serialization supoprt for uses_allocators clause.
Reviewers: jdoerfert
Subscribers: yaxunl, guansong, arphaman, cfe-commits, caomhin
Tags: #clang
Differential Revision: https://reviews.llvm.org/D78577
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index 748ac06..462f275 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -6651,6 +6651,18 @@
Record.AddSourceLocation(C->getKindKwLoc());
}
+void OMPClauseWriter::VisitOMPUsesAllocatorsClause(OMPUsesAllocatorsClause *C) {
+ Record.push_back(C->getNumberOfAllocators());
+ Record.AddSourceLocation(C->getLParenLoc());
+ for (unsigned I = 0, E = C->getNumberOfAllocators(); I < E; ++I) {
+ OMPUsesAllocatorsClause::Data Data = C->getAllocatorData(I);
+ Record.AddStmt(Data.Allocator);
+ Record.AddStmt(Data.AllocatorTraits);
+ Record.AddSourceLocation(Data.LParenLoc);
+ Record.AddSourceLocation(Data.RParenLoc);
+ }
+}
+
void ASTRecordWriter::writeOMPTraitInfo(const OMPTraitInfo *TI) {
writeUInt32(TI->Sets.size());
for (const auto &Set : TI->Sets) {