forked from OSchip/llvm-project
				
			
							parent
							
								
									71c0202dd0
								
							
						
					
					
						commit
						1c3486a312
					
				| 
						 | 
					@ -378,11 +378,12 @@ void SymbolTable::addReplacement(const Atom *replaced,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const Atom *SymbolTable::replacement(const Atom *atom) {
 | 
					const Atom *SymbolTable::replacement(const Atom *atom) {
 | 
				
			||||||
 | 
					  // Find the replacement for a given atom. Atoms in _replacedAtoms
 | 
				
			||||||
 | 
					  // may be chained, so find the last one.
 | 
				
			||||||
  for (;;) {
 | 
					  for (;;) {
 | 
				
			||||||
    AtomToAtom::iterator pos = _replacedAtoms.find(atom);
 | 
					    AtomToAtom::iterator pos = _replacedAtoms.find(atom);
 | 
				
			||||||
    if (pos == _replacedAtoms.end())
 | 
					    if (pos == _replacedAtoms.end())
 | 
				
			||||||
      return atom;
 | 
					      return atom;
 | 
				
			||||||
    // might be chain, recurse to end
 | 
					 | 
				
			||||||
    atom = pos->second;
 | 
					    atom = pos->second;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue