diff options
Diffstat (limited to 'lib/AST/StmtPrinter.cpp')
-rw-r--r-- | lib/AST/StmtPrinter.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index 0267bcca2a..9c00eeaa0f 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/lib/AST/StmtPrinter.cpp @@ -834,6 +834,16 @@ void StmtPrinter::VisitOMPMasterDirective(OMPMasterDirective *Node) { PrintOMPExecutableDirective(Node); } +void StmtPrinter::VisitOMPCriticalDirective(OMPCriticalDirective *Node) { + Indent() << "#pragma omp critical"; + if (Node->getDirectiveName().getName()) { + OS << " ("; + Node->getDirectiveName().printName(OS); + OS << ")"; + } + PrintOMPExecutableDirective(Node); +} + void StmtPrinter::VisitOMPParallelForDirective(OMPParallelForDirective *Node) { Indent() << "#pragma omp parallel for "; PrintOMPExecutableDirective(Node); |