This is an archive of the discontinued LLVM Phabricator instance.

[llvm-rc] Have the tokenizer discard comments
ClosedPublic

Authored by zturner on Oct 6 2017, 3:54 PM.

Details

Summary

A user reported that llvm-rc did not work correctly when there were comments in the file. This patch aims to fix that.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.Oct 6 2017, 3:54 PM
rnk accepted this revision.Oct 6 2017, 4:02 PM

lgtm, but isn't this the beginning of a C pre-processor? Long term we might want to link this as a library into clang and make clang-cl -c foo.rc produce a .res file.

This revision is now accepted and ready to land.Oct 6 2017, 4:02 PM
amccarth added inline comments.
llvm/tools/llvm-rc/ResourceScriptToken.cpp
149 ↗(On Diff #118102)

Does this happen after line concatenation? If a line ends with a backslash just before the newline, then the "single-line" comment includes the next "line" as well.

This revision was automatically updated to reflect the committed changes.