MLIR 22.0.0git
ErrorBuilder.h
Go to the documentation of this file.
1//===--- ErrorBuilder.h - Helper for building error messages ----*- C++ -*-===//
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-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// ErrorBuilder to manage error messages.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_TOOLS_MLIRQUERY_MATCHER_ERRORBUILDER_H
14#define MLIR_TOOLS_MLIRQUERY_MATCHER_ERRORBUILDER_H
15
16#include "llvm/ADT/StringRef.h"
17#include "llvm/ADT/Twine.h"
18#include <initializer_list>
19
21class Diagnostics;
22
23// Represents the line and column numbers in a source query.
25 unsigned line{};
26 unsigned column{};
27};
28
29// Represents a range in a source query, defined by its start and end locations.
34
35// All errors from the system.
62
63void addError(Diagnostics *error, SourceRange range, ErrorType errorType,
64 std::initializer_list<llvm::Twine> errorTexts);
65
66} // namespace mlir::query::matcher::internal
67
68#endif // MLIR_TOOLS_MLIRQUERY_MATCHER_ERRORBUILDER_H
void addError(Diagnostics *error, SourceRange range, ErrorType errorType, std::initializer_list< llvm::Twine > errorTexts)