Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/AST/StmtPrinter.cpp
//===- StmtPrinter.cpp - Printing implementation for Stmt ASTs ------------===// | //===- StmtPrinter.cpp - Printing implementation for Stmt ASTs ------------===// | ||||
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 633 Lines • ▼ Show 20 Lines | void StmtPrinter::PrintOMPExecutableDirective(OMPExecutableDirective *S, | ||||
ArrayRef<OMPClause *> Clauses = S->clauses(); | ArrayRef<OMPClause *> Clauses = S->clauses(); | ||||
for (auto *Clause : Clauses) | for (auto *Clause : Clauses) | ||||
if (Clause && !Clause->isImplicit()) { | if (Clause && !Clause->isImplicit()) { | ||||
OS << ' '; | OS << ' '; | ||||
Printer.Visit(Clause); | Printer.Visit(Clause); | ||||
} | } | ||||
OS << NL; | OS << NL; | ||||
if (!ForceNoStmt && S->hasAssociatedStmt()) | if (!ForceNoStmt && S->hasAssociatedStmt()) | ||||
PrintStmt(S->getInnermostCapturedStmt()->getCapturedStmt()); | PrintStmt(S->ignoreCaptures()); | ||||
} | } | ||||
void StmtPrinter::VisitOMPParallelDirective(OMPParallelDirective *Node) { | void StmtPrinter::VisitOMPParallelDirective(OMPParallelDirective *Node) { | ||||
Indent() << "#pragma omp parallel"; | Indent() << "#pragma omp parallel"; | ||||
PrintOMPExecutableDirective(Node); | PrintOMPExecutableDirective(Node); | ||||
} | } | ||||
void StmtPrinter::VisitOMPSimdDirective(OMPSimdDirective *Node) { | void StmtPrinter::VisitOMPSimdDirective(OMPSimdDirective *Node) { | ||||
▲ Show 20 Lines • Show All 289 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
void StmtPrinter::VisitOMPTargetTeamsDistributeSimdDirective( | void StmtPrinter::VisitOMPTargetTeamsDistributeSimdDirective( | ||||
OMPTargetTeamsDistributeSimdDirective *Node) { | OMPTargetTeamsDistributeSimdDirective *Node) { | ||||
Indent() << "#pragma omp target teams distribute simd"; | Indent() << "#pragma omp target teams distribute simd"; | ||||
PrintOMPExecutableDirective(Node); | PrintOMPExecutableDirective(Node); | ||||
} | } | ||||
void StmtPrinter::VisitOMPTileDirective(OMPTileDirective *Node) { | |||||
Indent() << "#pragma omp tile"; | |||||
PrintOMPExecutableDirective(Node); | |||||
} | |||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
// Expr printing methods. | // Expr printing methods. | ||||
//===----------------------------------------------------------------------===// | //===----------------------------------------------------------------------===// | ||||
void StmtPrinter::VisitSourceLocExpr(SourceLocExpr *Node) { | void StmtPrinter::VisitSourceLocExpr(SourceLocExpr *Node) { | ||||
OS << Node->getBuiltinStr() << "()"; | OS << Node->getBuiltinStr() << "()"; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,602 Lines • Show Last 20 Lines |
clang-format not found in user's PATH; not linting file.