diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2025-02-03 06:46:29 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2025-02-03 06:48:19 +0200 |
commit | 43eb1e43b6b22a0343104387431db7f32a88b16c (patch) | |
tree | 15b90b59ac4748bfa923190eb91952b5a613992b /libbuild2/cc/msvc.cxx | |
parent | 4ed0fe15d139748784adb40841028b36704b2f4f (diff) |
Optimize maybe-used diag_record
It turns out the std::ostringstream member of butl::diag_record is quite
expensive to construct but to never use.
Diffstat (limited to 'libbuild2/cc/msvc.cxx')
-rw-r--r-- | libbuild2/cc/msvc.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/cc/msvc.cxx b/libbuild2/cc/msvc.cxx index 416df36..66223b5 100644 --- a/libbuild2/cc/msvc.cxx +++ b/libbuild2/cc/msvc.cxx @@ -511,8 +511,8 @@ namespace build2 if (!run_finish_code (args, pr, s, 2 /* verbosity */) || io) { - diag_record dr; - dr << warn << "unable to detect " << l << " library type, ignoring" << + diag_record dr (warn); + dr << "unable to detect " << l << " library type, ignoring" << info << "run the following command to investigate" << info; print_process (dr, args); return otype::e; |