[NFC] Simplify `splitLiteralAndReplacement` function
authorRahul Joshi <jurahul@google.com>
Mon, 20 Jul 2020 15:29:23 +0000 (08:29 -0700)
committerRahul Joshi <jurahul@google.com>
Wed, 22 Jul 2020 22:32:32 +0000 (15:32 -0700)
commited88cd77d4a0667c78bc8a5bc6c13d6a32576808
treeab644875ca0a72b250e1a904adb5724c6b26724a
parente6ea5b388b0d463dc9b5710d3f945387a0e4f206
[NFC] Simplify `splitLiteralAndReplacement` function

- Eliminate `From` which is 0 most of the times.
- Replace 'find_first_of('{') != 0' with 'front() != '{'
- Simplify the loop body given the it executes only when front() == '}'

Differential Revision: https://reviews.llvm.org/D84178
llvm/lib/Support/FormatVariadic.cpp