1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[ProfData] Make the method threadsafe

llvm-svn: 306428
This commit is contained in:
Xinliang David Li 2017-06-27 17:21:51 +00:00
parent dd736da225
commit e12318bace

View File

@ -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.