mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 13:40:30 +00:00
[ProfData] Make the method threadsafe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306428 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
423b99d025
commit
65340be3b4
@ -642,8 +642,9 @@ static ValueProfRecordClosure InstrProfRecordClosure = {
|
||||
|
||||
// Wrapper implementation using the closure mechanism.
|
||||
uint32_t ValueProfData::getSize(const InstrProfRecord &Record) {
|
||||
InstrProfRecordClosure.Record = &Record;
|
||||
return getValueProfDataSize(&InstrProfRecordClosure);
|
||||
auto Closure = InstrProfRecordClosure;
|
||||
Closure.Record = &Record;
|
||||
return getValueProfDataSize(&Closure);
|
||||
}
|
||||
|
||||
// Wrapper implementation using the closure mechanism.
|
||||
|
Loading…
Reference in New Issue
Block a user