- if (CallSites.empty()) { // Merge call sites...
- if (!AS.CallSites.empty())
- std::swap(CallSites, AS.CallSites);
- } else if (!AS.CallSites.empty()) {
- CallSites.insert(CallSites.end(), AS.CallSites.begin(), AS.CallSites.end());
- AS.CallSites.clear();
+ bool ASHadUnknownInsts = !AS.UnknownInsts.empty();
+ if (UnknownInsts.empty()) { // Merge call sites...
+ if (ASHadUnknownInsts) {
+ std::swap(UnknownInsts, AS.UnknownInsts);
+ addRef();
+ }
+ } else if (ASHadUnknownInsts) {
+ UnknownInsts.insert(UnknownInsts.end(), AS.UnknownInsts.begin(), AS.UnknownInsts.end());
+ AS.UnknownInsts.clear();