- // Otherwise, we need to add the old symbol to the new block's set. If it is
- // just a single entry, upgrade it to a symbol list.
- if (MCSymbol *PrevSym = NewEntry.Symbols.dyn_cast<MCSymbol*>()) {
- std::vector<MCSymbol*> *SymList = new std::vector<MCSymbol*>();
- SymList->push_back(PrevSym);
- NewEntry.Symbols = SymList;
- }
-
- std::vector<MCSymbol*> *SymList =
- NewEntry.Symbols.get<std::vector<MCSymbol*>*>();
-
- // If the old entry was a single symbol, add it.
- if (MCSymbol *Sym = OldEntry.Symbols.dyn_cast<MCSymbol*>()) {
- SymList->push_back(Sym);
- return;
- }
-
- // Otherwise, concatenate the list.
- std::vector<MCSymbol*> *Syms =OldEntry.Symbols.get<std::vector<MCSymbol*>*>();
- SymList->insert(SymList->end(), Syms->begin(), Syms->end());
- delete Syms;
+ // Otherwise, we need to add the old symbols to the new block's set.
+ NewEntry.Symbols.insert(NewEntry.Symbols.end(), OldEntry.Symbols.begin(),
+ OldEntry.Symbols.end());