[PATCH] D92854: [flang][driver] Add support for `-fsyntax-only`
Kiran Chandramohan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 9 01:12:50 PST 2020
kiranchandramohan added a comment.
A few comments.
================
Comment at: clang/lib/Driver/ToolChains/Flang.cpp:43-44
} else if (isa<CompileJobAction>(JA) || isa<BackendJobAction>(JA)) {
- CmdArgs.push_back("-triple");
- CmdArgs.push_back(Args.MakeArgString(TripleStr));
if (JA.getType() == types::TY_Nothing) {
----------------
Why?
================
Comment at: flang/include/flang/Frontend/CompilerInstance.h:32
+ /// The stream for diagnostics from Semaantics
+ llvm::raw_ostream *semaOutputStream_ = &llvm::errs();
----------------
Nit: Semaantics -> Semantics
================
Comment at: flang/include/flang/Frontend/CompilerInstance.h:103-107
+ /// Replace the current stream for verbose output.
+ void set_semaOutputStream(llvm::raw_ostream &Value);
+
+ /// Replace the current stream for verbose output.
+ void set_semaOutputStream(std::unique_ptr<llvm::raw_ostream> Value);
----------------
What is the coding style of this file?
================
Comment at: flang/lib/Frontend/CMakeLists.txt:16
FortranParser
+ FortranSemantics
+ FortranCommon
----------------
Is Evaluate needed?
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:81
+ // Parse
+ ci.parsing().Parse(llvm::outs());
+ auto &parseTree{*ci.parsing().parseTree()};
----------------
What is the use of output stream here?
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:82
+ ci.parsing().Parse(llvm::outs());
+ auto &parseTree{*ci.parsing().parseTree()};
+
----------------
Will the Prescan step have happened before?
================
Comment at: flang/lib/Frontend/FrontendActions.cpp:84
+
+ // Prepare semantincs
+ Fortran::semantics::SemanticsContext semanticsContext{
----------------
Nit: semantincs -> semantics
================
Comment at: flang/test/Flang-Driver/syntax-only.f90:1
+! RUN: %flang-new -fc1 -fsyntax-only %s 2>&1 | FileCheck %s
+
----------------
should there be a test without fc1?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92854/new/
https://reviews.llvm.org/D92854
More information about the cfe-commits
mailing list