[PATCH] D81525: [Support] Ensure errs() is constructed after outs() and don't rerun tie when errs() is called

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 11 01:14:58 PDT 2020


jhenderson added a comment.

Two nits in the comments, but frankly, I think we'd be better off dropping the tied by default approach if it's not straightforward to solve all the race conditions compared to what was before, in which case, this code needs to become something that allows tying on first use, but assumes it isn't. Maybe errs() could be given an argument (default to false) of "tie to outs()" or something.



================
Comment at: llvm/lib/Support/raw_ostream.cpp:880
+  // Ensure outs() is constructed before the unbuffered stderr stream so that
+  // outs() will be destructed after outs() and the TiedStream field of Init.S
+  // will not become dangling. The tie call is called once, thus the user can
----------------
destructed -> destroyed
opt out -> opt out of


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D81525/new/

https://reviews.llvm.org/D81525





More information about the llvm-commits mailing list