llvm.org GIT mirror llvm / 27da66d
Add a comment about a thread safety issue in Statistic.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106756 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
5555 }
5656
5757 const Statistic &operator++() {
58 // FIXME: This function and all those that follow carefully use an
59 // atomic operation to update the value safely in the presence of
60 // concurrent accesses, but not to read the return value, so the
61 // return value is not thread safe.
5862 sys::AtomicIncrement(&Value);
5963 return init();
6064 }