[PATCH] D65734: [llvm-objdump] Quote filename to fix windows test failure

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 5 02:10:16 PDT 2019


jhenderson added a comment.

Drive by comment, because I don't have time right now to verify my suggestion myself, but it's important to remember that on Windows, file paths are usually printed with backslashes in, i.e. "foo\bar\wibble.c" or whatever. %p and %t etc substitutions use backward slashes on Windows, unless you specify them as '%/p' and '%/t' or '%\p' and '%\t' (which force the slash direction IIRC). Note that this means that your current expansion looks like 'C:\an\absolute\path/Inputs/source-interleave.x86-64.c' or something like that. I don't think the double escaping is relevant - that's just an artifact of how FileCheck prints its messages, though you probably will need to be careful when sed gets involved (i.e. use %/t etc). I think your solution is going to need to be cleverer than this. I don't think quoting is what you want - those single quote will just try to match single quotes in the output, and have no effect on the escaping etc. You are probably going to need to be cleverer with your test. It probably needs to copy the source into a temporary file location or something like that, so that you can reference it as %t.c (or some equivalent), which allows you to use that path without slashes in your -DFILE check.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65734/new/

https://reviews.llvm.org/D65734





More information about the llvm-commits mailing list