From f3e193b2651b2589daecaf181b96c5622acc51e9 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 16 Jun 2017 14:57:47 +0200 Subject: Clean up module-related diagnostics --- build2/diagnostics.hxx | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'build2/diagnostics.hxx') diff --git a/build2/diagnostics.hxx b/build2/diagnostics.hxx index ce5f996..1e76099 100644 --- a/build2/diagnostics.hxx +++ b/build2/diagnostics.hxx @@ -224,7 +224,18 @@ namespace build2 const char* name, const location& l, uint16_t sverb) - : type_ (type), mod_ (mod), name_ (name), loc_ (l), sverb_ (sverb) {} + : type_ (type), mod_ (mod), name_ (name), + loc_ (l), + sverb_ (sverb) {} + + location_prologue_base (const char* type, + const char* mod, + const char* name, + path&& f, + uint16_t sverb) + : type_ (type), mod_ (mod), name_ (name), + file_ (move (f)), loc_ (&file_), + sverb_ (sverb) {} void operator() (const diag_record& r) const; @@ -233,6 +244,7 @@ namespace build2 const char* type_; const char* mod_; const char* name_; + const path file_; const location loc_; const uint16_t sverb_; }; @@ -265,6 +277,15 @@ namespace build2 return location_prologue (epilogue_, type_, mod_, name_, l, sverb_ ()); } + // fail (relative (src)) << ... + // + location_prologue + operator() (path&& f) const + { + return location_prologue ( + epilogue_, type_, mod_, name_, move (f), sverb_ ()); + } + template location_prologue operator() (const L& l) const -- cgit v1.1