MLIR
20.0.0git
lib
Query
Matcher
ErrorBuilder.cpp
Go to the documentation of this file.
1
//===--- ErrorBuilder.cpp - Helper for building error messages ------------===//
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
#include "
mlir/Query/Matcher/ErrorBuilder.h
"
10
#include "
Diagnostics.h
"
11
#include "llvm/ADT/StringRef.h"
12
#include "llvm/ADT/Twine.h"
13
#include <initializer_list>
14
15
namespace
mlir::query::matcher::internal
{
16
17
void
addError
(
Diagnostics
*error,
SourceRange
range,
ErrorType
errorType,
18
std::initializer_list<llvm::Twine> errorTexts) {
19
Diagnostics::ArgStream
argStream = error->
addError
(range, errorType);
20
for
(
const
llvm::Twine &errorText : errorTexts) {
21
argStream << errorText;
22
}
23
}
24
25
}
// namespace mlir::query::matcher::internal
ErrorBuilder.h
mlir::query::matcher::internal::Diagnostics::ArgStream
Definition:
Diagnostics.h:31
mlir::query::matcher::internal::Diagnostics
Definition:
Diagnostics.h:28
mlir::query::matcher::internal::Diagnostics::addError
ArgStream addError(SourceRange range, ErrorType error)
Definition:
Diagnostics.cpp:20
Diagnostics.h
mlir::query::matcher::internal
Definition:
ErrorBuilder.h:20
mlir::query::matcher::internal::addError
void addError(Diagnostics *error, SourceRange range, ErrorType errorType, std::initializer_list< llvm::Twine > errorTexts)
Definition:
ErrorBuilder.cpp:17
mlir::query::matcher::internal::ErrorType
ErrorType
Definition:
ErrorBuilder.h:36
mlir::query::matcher::internal::SourceRange
Definition:
ErrorBuilder.h:30
Generated on Wed Dec 25 2024 04:32:04 for MLIR by
1.9.1