This is an archive of the discontinued LLVM Phabricator instance.

IR: Fix a race condition in type id clients of ModuleSummaryIndex.
ClosedPublic

Authored by pcc on Mar 21 2017, 5:36 PM.

Details

Summary

Add a const version of the getTypeIdSummary accessor that avoids
mutating the TypeIdMap.

Event Timeline

pcc created this revision.Mar 21 2017, 5:36 PM
mehdi_amini added inline comments.Mar 21 2017, 5:43 PM
llvm/include/llvm/IR/ModuleSummaryIndex.h
530

Document.

Also, it seems unusual to do this, I don't think I saw this in the past.

711

Can we use "find()" instead of "get()" and return a pointer?

pcc updated this revision to Diff 92582.Mar 21 2017, 6:19 PM
pcc marked an inline comment as done.
  • Use pointer
llvm/include/llvm/IR/ModuleSummaryIndex.h
530

Removed

This revision is now accepted and ready to land.Mar 21 2017, 7:59 PM
This revision was automatically updated to reflect the committed changes.