The guilt doesn't matter in a sense. For example, if the client tells the lawyer he robbed the bank, the lawyer cannot try to persuade the court that the client was somewhere else because he knows it isn't true.
What reason would the attorney have for not believing the information that the client confesses voluntarily under the veil of attorney-client privilege?.