summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/DependencyGraph.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-05-09 18:21:03 +0000
committerMartin Storsjo <martin@martin.st>2018-05-09 18:21:03 +0000
commit518b6c9882101bb8914c171b24998093afbc7ecb (patch)
tree680469d8b25b011625175d13a1bdef5ed7e8823d /clang/lib/Frontend/DependencyGraph.cpp
parent7bc3c5822e408d3387f1d383ee50b2ed389ca949 (diff)
downloadbcm5719-llvm-518b6c9882101bb8914c171b24998093afbc7ecb.tar.gz
bcm5719-llvm-518b6c9882101bb8914c171b24998093afbc7ecb.zip
[llvm-rc] Handle C preprocessor output
When preprocessing resource scripts (which can easily be done outside of llvm-rc), included headers can leave behind C declarations (despite preprocessing with -DRC_INVOKED), that can't be parsed by a resource compiler. This is handled in all of rc.exe, by parsing the preprocessor output line markers and ignoring content from files named *.h and *.c, documented at [1]. In addition to this filtering, strip out any other preprocessor directive that is left behind (like pragmas) which also can't be handled by the tokenizer. The added test uses both standard #line markers (supported by rc.exe) and GNU style extended line markers, thus this test doesn't pass with rc.exe, but passes with GNU windres. (Windres on the other hand doesn't filter out files named *.c, only *.h.) Differential Revision: https://reviews.llvm.org/D46579 [1] https://msdn.microsoft.com/en-us/library/windows/desktop/aa381033(v=vs.85).aspx llvm-svn: 331903
Diffstat (limited to 'clang/lib/Frontend/DependencyGraph.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud