Summary: With users registering their own dependencies, duplicate pass registration becomes more and more common. This revision relaxes that pass registration be unique. This is safe to assume given that we key on the passID, which is guaranteed to be unique per pass class.
Differential Revision: https://reviews.llvm.org/D77909
// TODO: We should use the 'arg' as the lookup key instead of the pass id.
const PassID *passID = function()->getPassID();
PassInfo passInfo(arg, description, passID, function);
- bool inserted = passRegistry->try_emplace(passID, passInfo).second;
- assert(inserted && "Pass registered multiple times");
- (void)inserted;
+ passRegistry->try_emplace(passID, passInfo);
}
/// Returns the pass info for the specified pass class or null if unknown.