Skip to content
  • Alkis Evlogimenos's avatar
    Change MRegisterDesc::AliasSet, TargetInstrDescriptor::ImplicitDefs · 5f1f337d
    Alkis Evlogimenos authored
    and TargetInstrDescriptor::ImplicitUses to always point to a null
    terminated array and never be null. So there is no need to check for
    pointer validity when iterating over those sets. Code that looked
    like:
    
    if (const unsigned* AS = TID.ImplicitDefs) {
      for (int i = 0; AS[i]; ++i) {
        // use AS[i]
      }
    }
    
    was changed to:
    
    for (const unsigned* AS = TID.ImplicitDefs; *AS; ++AS) {
      // use *AS
    }
    
    llvm-svn: 8960
    5f1f337d
Loading