[PATCH] D94516: [flang][driver] Add standard predefinitions

sameeran joshi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 07:18:53 PST 2021


sameeranjoshi added inline comments.


================
Comment at: flang/lib/Frontend/CompilerInvocation.cpp:272
+#if __x86_64__
+  fortranOptions.predefinitions.emplace_back("__x86_64__", "1");
+#endif
----------------
Why is this `1` here?
Also why only `x86_64`, why don't we add other architectures here?



================
Comment at: flang/test/Flang-Driver/compiler-defined-macros.f90:24
+integer, parameter :: flang_minor = __flang_minor__
+integer, parameter :: flang_patchlevel = __flang_patchlevel__
----------------
How do you test `__x86_64__` ?
I think we can add architecture specific tests in lit based test cases, does that make sense to add them here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94516/new/

https://reviews.llvm.org/D94516



More information about the llvm-commits mailing list