[PATCH] D85967: [flang] Add preprocessor test for defines passed on the command line
David Truby via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 05:26:50 PDT 2020
DavidTruby created this revision.
DavidTruby added reviewers: sscalpone, klausler, PeteSteinfeld.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
DavidTruby requested review of this revision.
This adds a test for D85862 <https://reviews.llvm.org/D85862> to ensure that preprocessor definitions
passed on command lines don't regress in future.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D85967
Files:
flang/test/Preprocessing/defines.F90
Index: flang/test/Preprocessing/defines.F90
===================================================================
--- /dev/null
+++ flang/test/Preprocessing/defines.F90
@@ -0,0 +1,8 @@
+! RUN: %f18 -E -DFOO=1 -DBAR=2 %s | FileCheck %s
+
+! CHECK: integer :: a = 1
+ integer :: a = FOO
+! CHECK: integer :: b = 2
+ integer :: b = BAR
+
+end program
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85967.285631.patch
Type: text/x-patch
Size: 348 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200814/80ee7ebe/attachment.bin>
More information about the llvm-commits
mailing list