]> granicus.if.org Git - llvm/commit
Allow use of spaces in Bugpoint ‘--compile-command’ argument
authorDavid Bozier <seifsta@gmail.com>
Thu, 2 Mar 2017 16:50:48 +0000 (16:50 +0000)
committerDavid Bozier <seifsta@gmail.com>
Thu, 2 Mar 2017 16:50:48 +0000 (16:50 +0000)
commit05f3b7323d4b360869204bd0643ed97fae750ac0
tree669bbbf43e41f7abd9fe306d6006deb222a6bfbf
parent131b639126d15d1ba181b3be95a33265f8c2d4f6
Allow use of spaces in Bugpoint ‘--compile-command’ argument

Bug-Point functionality needs extending due to the patch D29185 by bd1976llvm (Allow llvm's build and test systems to support paths with spaces ). It requires Bugpoint to accept the use of spaces within ‘--compile-command’ tokens.

Details
Bugpoint uses the argument ‘--compile-command’ to pass in a command line argument as a string, the string is tokenized by the ‘lexCommand’ function using spaces as a delimiter. Patch D29185 will cause the unit test compile-custom.ll to fail as spaces are now required within tokens and as a delimiter. This patch allows the use of escape characters as below:

Two consecutive '\' evaluate to a single '\'.
A space after a '\' evaluates to a space that is not interpreted as a delimiter.
Any other instances of the '\' character are removed.

Committed on behalf of Owen Reynolds

Differential revision: https://reviews.llvm.org/D29940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296763 91177308-0d34-0410-b5e6-96231b3b80d8
tools/bugpoint/ToolRunner.cpp