From af3d0ad1926eb825f64152cf217fc9a4777f0be3 Mon Sep 17 00:00:00 2001 From: Stefan Weigl-Bosker Date: Thu, 19 Feb 2026 18:45:44 -0500 Subject: [willow]: more cleanup, tests --- willow/lib/IR/Diagnostic.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 willow/lib/IR/Diagnostic.cpp (limited to 'willow/lib/IR/Diagnostic.cpp') diff --git a/willow/lib/IR/Diagnostic.cpp b/willow/lib/IR/Diagnostic.cpp new file mode 100644 index 0000000..0e2c8bd --- /dev/null +++ b/willow/lib/IR/Diagnostic.cpp @@ -0,0 +1,10 @@ +#include +#include + +//TODO +std::ostream &operator<<(std::ostream &os, const willow::Diagnostic &diagnostic) { + if (diagnostic.location) + return os << diagnostic.location.value() << ": " << diagnostic.message; + else + return os << ": " << diagnostic.message; +} -- cgit v1.2.3