Intel is developing an offload compiler based on clang (that will eventually be contributed to open source). In the course of the compilation many temporary .h files are generated in /tmp. We'd like to have a way of eliding these dependencies from the -MD output. This new option -MD-filter=prefixstring is proposed.
Details
- Reviewers
fedor.sergeev dexonsmith rjmccall probinson eli.friedman dstenb vsapsai - Group Reviewers
Restricted Project
Diff Detail
- Repository
- rL LLVM
Event Timeline
added an inline comment about the use of strncmp
lib/Frontend/DependencyFile.cpp | ||
---|---|---|
279 | I wasn't sure about using strncmp to do the prefix comparison, but i checked around in the clang code and saw strncmp used in several places so I thought it would be acceptable. |
lib/Frontend/DependencyFile.cpp | ||
---|---|---|
279 | DependencyFilter.compare(Filename)? |
lib/Frontend/DependencyFile.cpp | ||
---|---|---|
279 | They are overloads with pos and len. |
respond to suggestion from @xbolva00 (thanks). Added a test case where prefix fails to match
@dexonsmith Can you take a look at this patch or recommend someone who can review it? Many thanks. --Melanie
@rjmccall Can you take a look at this patch or recommend someone who can review it? Many thanks. --Melanie
I'll modify this to be a cc1 only option, there doesn't seem to be community interest.
I wasn't sure about using strncmp to do the prefix comparison, but i checked around in the clang code and saw strncmp used in several places so I thought it would be acceptable.