[all-commits] [llvm/llvm-project] ed88cd: [NFC] Simplify `splitLiteralAndReplacement` function

Rahul Joshi via All-commits all-commits at lists.llvm.org
Wed Jul 22 15:33:19 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ed88cd77d4a0667c78bc8a5bc6c13d6a32576808
      https://github.com/llvm/llvm-project/commit/ed88cd77d4a0667c78bc8a5bc6c13d6a32576808
  Author: Rahul Joshi <jurahul at google.com>
  Date:   2020-07-22 (Wed, 22 Jul 2020)

  Changed paths:
    M llvm/lib/Support/FormatVariadic.cpp

  Log Message:
  -----------
  [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




More information about the All-commits mailing list