[PATCH] D46511: [llvm-rc] Don't strictly require quotes around external file names
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 7 11:04:24 PDT 2018
mstorsjo added inline comments.
================
Comment at: test/tools/llvm-rc/Inputs/include.rc:3
+// Test including filenames without quotes.
+foo BITMAP bitmap.bmp
----------------
zturner wrote:
> Shouldn't we test both things?
I would have guessed that there are other tests that successfully include files, but otoh the icon/cursor test is still missing its inputs. I'll update this to make it test both.
================
Comment at: tools/llvm-rc/ResourceScriptParser.h:87
Expected<StringRef> readIdentifier(); // Parse an identifier.
+ Expected<StringRef> readFilename(); // Parse a filename.
Expected<IntOrString> readIntOrString(); // Parse an integer or a string.
----------------
zturner wrote:
> Is it really on the case that MSVC rc special cases this for filenames and not other types of strings?
I think so, I tested e.g. adding a string in a stringtable without quotes, and that didn't work. Not sure what the exact logic is though.
It would be nicer to request the tokenizer to (re)interpret whatever is next as a filename/path, though, instead of extending the tokenizer's view of what is an identifier. But that's kind of a layering violation (and I don't know if it's doable).
Repository:
rL LLVM
https://reviews.llvm.org/D46511
More information about the llvm-commits
mailing list