================
@@ -83,34 +106,50 @@ LogLine::~LogLine() {
DroppedLines->fetch_add(1, std::memory_order_relaxed);
}
-AtomicLineLogger::AtomicLineLogger(StringRef LogFilePath)
- : LogPath(LogFilePath.str()) {
-#ifndef _WIN32
+void AtomicLineLogger::setFD(StringRef Path) {
+ LogPath = Path.str();
+ FD.store(openLogFile(Path), std::memory_order_release);
----------------
naveen-seth wrote:
If this is `memory_order_release`, should consumers use `acquire` instead of
`relaxed`?
I think having relaxed would work here too.
https://github.com/llvm/llvm-project/pull/211966
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits