brintos

brintos / llvm-project-archived public Read only

0
0
Text · 887 B · f4fc6c2 Raw
27 lines · cpp
1//===- Diagnostic.cpp -----------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "mlir/Tools/PDLL/AST/Diagnostic.h"10 11using namespace mlir;12using namespace mlir::pdll::ast;13 14//===----------------------------------------------------------------------===//15// InFlightDiagnostic16//===----------------------------------------------------------------------===//17 18void InFlightDiagnostic::report() {19  // If this diagnostic is still inflight and it hasn't been abandoned, then20  // report it.21  if (isInFlight()) {22    owner->report(std::move(*impl));23    owner = nullptr;24  }25  impl.reset();26}27