[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:32:05 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
----------------
amccarth wrote:
> mstorsjo wrote:
> > 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.
> And perhaps some of the more interesting resource types, like RCDATA, that can take either a filename or a block of raw data.
Well RCDATA isn't supported at all yet.
================
Comment at: tools/llvm-rc/ResourceScriptToken.cpp:290
const char CurChar = Data[Pos];
- return std::isalnum(CurChar) || CurChar == '_';
+ return std::isalnum(CurChar) || CurChar == '_' || CurChar == '.' || CurChar == '/';
}
----------------
amccarth wrote:
> What about backslashes?
>
> ```
> 101 BITMAP "assets\foo.bmp"
> ```
>
>
I'm not entirely sure how that should be handled, since backslash also is an escape char (and maybe the escape behaviour is different outisde of quotes). I think I'd just ignore backslashes for now...
Repository:
rL LLVM
https://reviews.llvm.org/D46511
More information about the llvm-commits
mailing list