From 033c9a2c1cd4a185f5819424becec03f7562e044 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 26 Nov 2009 19:20:23 +0100 Subject: [PATCH] dwarflint: Expose the underlying string in pri:: family of formatting functions --- src/dwarflint/check_debug_info.cc | 11 ++++------- src/dwarflint/pri.hh | 3 +++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/dwarflint/check_debug_info.cc b/src/dwarflint/check_debug_info.cc index db76d67dd..46433cdf9 100644 --- a/src/dwarflint/check_debug_info.cc +++ b/src/dwarflint/check_debug_info.cc @@ -645,6 +645,7 @@ namespace { case DW_FORM_data8: if (cu->head->offset_size == 4) + // xxx could now also be checked during abbrev loading wr_error (where) << pri::attr (it->name) << " with form DW_FORM_data8 in 32-bit CU." << std::endl; @@ -871,13 +872,9 @@ namespace && (relocate == rel_require || (relocate == rel_nonzero && value != 0))) - { - std::stringstream ss; - ss << pri::form (form); - wr_message (where, cat (mc_impact_2, mc_die_other, - mc_reloc, extra_mc)) - << pri::lacks_relocation (ss.str ()) << std::endl; - } + wr_message (where, cat (mc_impact_2, mc_die_other, + mc_reloc, extra_mc)) + << pri::lacks_relocation (pri::form (form)) << std::endl; } /* Dispatch value checking. */ diff --git a/src/dwarflint/pri.hh b/src/dwarflint/pri.hh index ccdbb1ec4..54d47ebfa 100644 --- a/src/dwarflint/pri.hh +++ b/src/dwarflint/pri.hh @@ -17,6 +17,9 @@ namespace pri : m_s (a + b + c) {} friend std::ostream &operator << (std::ostream &os, pribase const &obj); + + public: + operator std::string const &() const { return m_s; } }; std::ostream &operator << (std::ostream &os, pribase const &obj); -- 2.47.3