This is an archive of the discontinued LLVM Phabricator instance.

[AVR][NFC] Move preprocessor tests to Preprocessor directory
ClosedPublic

Authored by aykevl on Apr 14 2020, 3:50 PM.

Details

Summary

These tests were placed in the CodeGen directory while they really should have been placed in the Preprocessor directory.


See https://reviews.llvm.org/D78117 for background.

Diff Detail

Event Timeline

aykevl created this revision.Apr 14 2020, 3:50 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 14 2020, 3:50 PM

Not sure we need target-cpu-defines/

You can add a lit.local.cfg to avoid REQUIRES: avr-registered-target

Looks like the established convention would be to just put these tests in test/Preprocessor with an avr- prefix.

Honestly I don't know the convention but I agree with @rjmccall that the convention appears to be to not use a separate subdirectory (I don't see any other arch-specific subdirectories). So, should the files be moved to clang/test/Preprocessor/avr-*.c (e.g. clang/test/Preprocessor/avr-attiny104.c) while keeping REQUIRES: avr-registered-target?

I don't think the REQUIRES is needed unless there's something special about AVR as a target. Clang doesn't conditionally compile out frontend target support.

aykevl updated this revision to Diff 259621.Apr 23 2020, 10:18 AM
  • moved test files out of the AVR-specific directory
  • removed the REQUIRES: line

I don't think the REQUIRES is needed unless there's something special about AVR as a target. Clang doesn't conditionally compile out frontend target support.

I grepped for REQUIRES: and found just a few files with such a line - most files by far didn't specify any requirements. So it should be fine to leave it out.

rjmccall accepted this revision.Apr 23 2020, 10:30 AM

LGTM, thanks!

This revision is now accepted and ready to land.Apr 23 2020, 10:30 AM
MaskRay accepted this revision.Apr 23 2020, 10:49 AM
This revision was automatically updated to reflect the committed changes.