16#ifndef LIB_ERROR_MESSAGE_H_
17#define LIB_ERROR_MESSAGE_H_
22#include "lib/source_file.h"
39 enum class MessageType : std::size_t { None,
Error, Warning,
Info };
41 MessageType type = MessageType::None;
57 prefix(
std::move(prefix)),
62 std::string getPrefix()
const;
63 std::string toString()
const;
75 : location(loc), message(std::move(msg)) {}
77 std::string toString()
const;
Definition source_file.h:131
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
@ Info
Take no action and continue compilation.
@ Error
Print a warning and continue compilation.
void info(const int kind, const char *format, const T *node, Args &&...args)
Report info messages of type kind. Requires that the node argument have source info.
Definition lib/error.h:148
Definition error_message.h:38
ErrorMessage()
Used by errorWithSuffix.
Definition error_message.h:47
std::vector< Util::SourceInfo > locations
Particular formatted message.
Definition error_message.h:44
std::string suffix
Relevant source locations for this error.
Definition error_message.h:45
std::string message
Typically error/warning type from catalog.
Definition error_message.h:43
Definition error_message.h:70