]> granicus.if.org Git - clang/commitdiff
Add test case for __ASSEMBLER__ definition.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 1 Dec 2008 19:23:47 +0000 (19:23 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 1 Dec 2008 19:23:47 +0000 (19:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60363 91177308-0d34-0410-b5e6-96231b3b80d8

test/Makefile
test/Preprocessor/assembler-with-cpp.S [new file with mode: 0644]

index 5ef0e024028dc2dcd861ca8476f8d107bd6bc3ed..81a1d790fc5dbffae4e33b9d74aae36877f3194d 100644 (file)
@@ -19,7 +19,7 @@ REPORTFAIL = (echo; echo '----' $< 'failed ----')
 DONE = echo
 endif
 
-TESTS := $(addprefix Output/, $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' -or -name '*.mm' \) | grep -v "Output/")))
+TESTS := $(addprefix Output/, $(addsuffix .testresults, $(shell find $(TESTDIRS) \( -name '*.c' -or -name '*.cpp' -or -name '*.m' -or -name '*.mm' -or -name '*.S' \) | grep -v "Output/")))
 Output/%.testresults: %
        @ $(PROGRESS)
        @ PATH=$(ToolDir):$(LLVM_SRC_ROOT)/test/Scripts:$$PATH VG=$(VG) $(PROJ_SRC_DIR)/TestRunner.sh $< > $@ || $(REPORTFAIL)
diff --git a/test/Preprocessor/assembler-with-cpp.S b/test/Preprocessor/assembler-with-cpp.S
new file mode 100644 (file)
index 0000000..2c2bd8d
--- /dev/null
@@ -0,0 +1,6 @@
+// RUN: clang -E %s &&
+// RUN: not clang -x c -E %s
+
+#ifndef __ASSEMBLER__
+#error "__ASSEMBLER__ not defined"
+#endif