mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-23 07:52:06 +00:00
4dd84b6512
Original-commit: flang-compiler/f18@9c21346414
25 lines
515 B
C++
25 lines
515 B
C++
#include "message.h"
|
|
|
|
namespace Fortran {
|
|
|
|
std::ostream &operator<<(std::ostream &o, const Message &msg) {
|
|
if (msg.context()) {
|
|
o << *msg.context();
|
|
}
|
|
o << "at line " << msg.position().lineNumber();
|
|
int column = msg.position().column();
|
|
if (column > 0) {
|
|
o << "(column " << column << ")";
|
|
}
|
|
o << ": " << msg.message() << '\n';
|
|
return o;
|
|
}
|
|
|
|
std::ostream &operator<<(std::ostream &o, const Messages &ms) {
|
|
for (const auto &msg : ms) {
|
|
o << msg;
|
|
}
|
|
return o;
|
|
}
|
|
} // namespace Fortran
|