[all-commits] [llvm/llvm-project] 2d068e: Fix Windows command line bug when last token in re...

amccarth-google via All-commits all-commits at lists.llvm.org
Wed May 27 14:50:18 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 2d068e534f1671459e1b135852c1b3c10502e929
      https://github.com/llvm/llvm-project/commit/2d068e534f1671459e1b135852c1b3c10502e929
  Author: Adrian McCarthy <amccarth at google.com>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M llvm/lib/Support/CommandLine.cpp
    M llvm/unittests/Support/CommandLineTest.cpp

  Log Message:
  -----------
  Fix Windows command line bug when last token in response file is ""

Patch by Neil Dhar <dhar at alumni.duke.edu>

Current state machine for parsing tokens from response files in Windows
does not correctly handle the case where the last token is "". The current
implementation handles the last token by only adding it if it is not empty,
however this does not cover the case where the last token is meant to be
the empty string. We can cover this case by checking whether the state
machine was last in the UNQUOTED state, which indicates that the last
character of the input was a non-whitespace character.

Differential Revision: https://reviews.llvm.org/D78346




More information about the All-commits mailing list