In the previous example, it is functioning as an antecedent. We know this because the reflexive pronouns end in -self or selves. The relative pronouns are who, whom, whose, which, that. The demonstrative pronouns are this,that,these,those,none,either. But antecedent is word for which a pronoun stands. And that is the case of this sentence. Hope this works for you