[PATCH] D78163: [AVR][NFC] Move preprocessor tests to Preprocessor directory

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 16:20:25 PDT 2020


aykevl created this revision.
aykevl added reviewers: dylanmckay, rjmccall, MaskRay.
Herald added subscribers: cfe-commits, Jim.
Herald added a project: clang.
MaskRay added a comment.

Not sure we need `target-cpu-defines/`

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


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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D78163

Files:
  clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c
  clang/test/CodeGen/avr/target-cpu-defines/attiny104.c
  clang/test/CodeGen/avr/target-cpu-defines/common.c
  clang/test/Preprocessor/AVR/target-cpu-defines/atmega328p.c
  clang/test/Preprocessor/AVR/target-cpu-defines/attiny104.c
  clang/test/Preprocessor/AVR/target-cpu-defines/common.c


Index: clang/test/Preprocessor/AVR/target-cpu-defines/common.c
===================================================================
--- /dev/null
+++ clang/test/Preprocessor/AVR/target-cpu-defines/common.c
@@ -0,0 +1,7 @@
+// REQUIRES: avr-registered-target
+// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown /dev/null | FileCheck -match-full-lines %s
+
+// CHECK: #define AVR 1
+// CHECK: #define __AVR 1
+// CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
Index: clang/test/Preprocessor/AVR/target-cpu-defines/attiny104.c
===================================================================
--- /dev/null
+++ clang/test/Preprocessor/AVR/target-cpu-defines/attiny104.c
@@ -0,0 +1,8 @@
+// REQUIRES: avr-registered-target
+// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown -target-cpu attiny104 /dev/null | FileCheck -match-full-lines %s
+
+// CHECK: #define AVR 1
+// CHECK: #define __AVR 1
+// CHECK: #define __AVR_ATtiny104__ 1
+// CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
Index: clang/test/Preprocessor/AVR/target-cpu-defines/atmega328p.c
===================================================================
--- /dev/null
+++ clang/test/Preprocessor/AVR/target-cpu-defines/atmega328p.c
@@ -0,0 +1,8 @@
+// REQUIRES: avr-registered-target
+// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown -target-cpu atmega328p /dev/null | FileCheck -match-full-lines %s
+
+// CHECK: #define AVR 1
+// CHECK: #define __AVR 1
+// CHECK: #define __AVR_ATmega328P__ 1
+// CHECK: #define __AVR__ 1
+// CHECK: #define __ELF__ 1
Index: clang/test/CodeGen/avr/target-cpu-defines/common.c
===================================================================
--- clang/test/CodeGen/avr/target-cpu-defines/common.c
+++ /dev/null
@@ -1,7 +0,0 @@
-// REQUIRES: avr-registered-target
-// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown /dev/null | FileCheck -match-full-lines %s
-
-// CHECK: #define AVR 1
-// CHECK: #define __AVR 1
-// CHECK: #define __AVR__ 1
-// CHECK: #define __ELF__ 1
Index: clang/test/CodeGen/avr/target-cpu-defines/attiny104.c
===================================================================
--- clang/test/CodeGen/avr/target-cpu-defines/attiny104.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// REQUIRES: avr-registered-target
-// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown -target-cpu attiny104 /dev/null | FileCheck -match-full-lines %s
-
-// CHECK: #define AVR 1
-// CHECK: #define __AVR 1
-// CHECK: #define __AVR_ATtiny104__ 1
-// CHECK: #define __AVR__ 1
-// CHECK: #define __ELF__ 1
Index: clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c
===================================================================
--- clang/test/CodeGen/avr/target-cpu-defines/atmega328p.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// REQUIRES: avr-registered-target
-// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown -target-cpu atmega328p /dev/null | FileCheck -match-full-lines %s
-
-// CHECK: #define AVR 1
-// CHECK: #define __AVR 1
-// CHECK: #define __AVR_ATmega328P__ 1
-// CHECK: #define __AVR__ 1
-// CHECK: #define __ELF__ 1


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78163.257541.patch
Type: text/x-patch
Size: 3048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200414/c169ff39/attachment-0001.bin>


More information about the llvm-commits mailing list