Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Serialization/ASTWriterStmt.cpp
//===--- ASTWriterStmt.cpp - Statement and Expression Serialization -------===// | //===--- ASTWriterStmt.cpp - Statement and Expression Serialization -------===// | ||||
Lint: Lint: clang-format not found in user's PATH; not linting file. | |||||
// | // | ||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||||
// See https://llvm.org/LICENSE.txt for license information. | // See https://llvm.org/LICENSE.txt for license information. | ||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||||
// | // | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
/// | /// | ||||
▲ Show 20 Lines • Show All 2,153 Lines • ▼ Show 20 Lines | if (E->hasAssociatedStmt()) | ||||
Record.AddStmt(E->getAssociatedStmt()); | Record.AddStmt(E->getAssociatedStmt()); | ||||
} | } | ||||
void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) { | void ASTStmtWriter::VisitOMPLoopDirective(OMPLoopDirective *D) { | ||||
VisitStmt(D); | VisitStmt(D); | ||||
Record.push_back(D->getNumClauses()); | Record.push_back(D->getNumClauses()); | ||||
Record.push_back(D->getCollapsedNumber()); | Record.push_back(D->getCollapsedNumber()); | ||||
VisitOMPExecutableDirective(D); | VisitOMPExecutableDirective(D); | ||||
if (isOpenMPLoopTransformationDirective(D->getDirectiveKind())) | |||||
return; | |||||
Record.AddStmt(D->getIterationVariable()); | Record.AddStmt(D->getIterationVariable()); | ||||
Record.AddStmt(D->getLastIteration()); | Record.AddStmt(D->getLastIteration()); | ||||
Record.AddStmt(D->getCalcLastIteration()); | Record.AddStmt(D->getCalcLastIteration()); | ||||
Record.AddStmt(D->getPreCond()); | Record.AddStmt(D->getPreCond()); | ||||
Record.AddStmt(D->getCond()); | Record.AddStmt(D->getCond()); | ||||
Record.AddStmt(D->getInit()); | Record.AddStmt(D->getInit()); | ||||
Record.AddStmt(D->getInc()); | Record.AddStmt(D->getInc()); | ||||
Record.AddStmt(D->getPreInits()); | Record.AddStmt(D->getPreInits()); | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | void ASTStmtWriter::VisitOMPParallelDirective(OMPParallelDirective *D) { | ||||
Code = serialization::STMT_OMP_PARALLEL_DIRECTIVE; | Code = serialization::STMT_OMP_PARALLEL_DIRECTIVE; | ||||
} | } | ||||
void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) { | void ASTStmtWriter::VisitOMPSimdDirective(OMPSimdDirective *D) { | ||||
VisitOMPLoopDirective(D); | VisitOMPLoopDirective(D); | ||||
Code = serialization::STMT_OMP_SIMD_DIRECTIVE; | Code = serialization::STMT_OMP_SIMD_DIRECTIVE; | ||||
} | } | ||||
void ASTStmtWriter::VisitOMPTileDirective(OMPTileDirective *D) { | |||||
VisitOMPLoopDirective(D); | |||||
Record.AddStmt(D->getTransformedStmt()); | |||||
Code = serialization::STMT_OMP_TILE_DIRECTIVE; | |||||
} | |||||
void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) { | void ASTStmtWriter::VisitOMPForDirective(OMPForDirective *D) { | ||||
VisitOMPLoopDirective(D); | VisitOMPLoopDirective(D); | ||||
Record.AddStmt(D->getTaskReductionRefExpr()); | Record.AddStmt(D->getTaskReductionRefExpr()); | ||||
Record.push_back(D->hasCancel() ? 1 : 0); | Record.push_back(D->hasCancel() ? 1 : 0); | ||||
Code = serialization::STMT_OMP_FOR_DIRECTIVE; | Code = serialization::STMT_OMP_FOR_DIRECTIVE; | ||||
} | } | ||||
void ASTStmtWriter::VisitOMPForSimdDirective(OMPForSimdDirective *D) { | void ASTStmtWriter::VisitOMPForSimdDirective(OMPForSimdDirective *D) { | ||||
▲ Show 20 Lines • Show All 461 Lines • Show Last 20 Lines |
clang-format not found in user's PATH; not linting file.