[PATCH] D99292: [flang][driver] Add support for `-cpp/-nocpp`

2021-03-29 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: clang/include/clang/Driver/Options.td:4302 +def cpp : Flag<["-"], "cpp">, Group, + HelpText<"Always add standard macro predefinitions">; +def nocpp : Flag<["-"], "nocpp">, Group, This option affects command line macro

[PATCH] D98191: [flang][driver] Add support for `-fdebug-dump-symbols-sources`

2021-03-16 Thread Tim Keith via Phabricator via cfe-commits
tskeith added a comment. > Would this option be used to extract debug/code-navigation info? Yes, it's something related to mapping between symbols and source locations. > Is there an equivalent in `clang` or `gfortran`? Not that I know of. Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D97119: [flang][driver] Add options for -std=f2018

2021-03-15 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/test/Driver/std2018.f90:9 +! RUN: %flang_fc1 -pedantic %s 2>&1 | FileCheck %s --check-prefix=GIVEN +! RUN: not %flang_fc1 -std=90 %s 2>&1 | FileCheck %s --check-prefix=WRONG + You need to make sure these work

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-12 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} tskeith wrote: > arnamoy10 wrote: > > tskeith

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-12 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} arnamoy10 wrote: > tskeith wrote: > > Does

[PATCH] D97080: [flang][driver] Add -fintrinsic-modules-path option

2021-03-11 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:293 + driverPath = driverPath.substr(0, driverPath.size() - 9); + return driverPath.append("/../tools/flang/include/flang/"); +} Does this work for an install? I think there

[PATCH] D98191: [flang][driver] Add support for `-fdebug-dump-symbols-sources`

2021-03-08 Thread Tim Keith via Phabricator via cfe-commits
tskeith added a comment. `-fget-symbols-sources` is not a debug option, it's intended for integrating with IDEs like vscode. So I think the original name is better. Unlike the "dump" options it actually is an action and not something that is intended to produce debug output on the way to doing

[PATCH] D96875: [flang][driver] Add -fdebug-module-writer option

2021-03-05 Thread Tim Keith via Phabricator via cfe-commits
tskeith accepted this revision. tskeith added a comment. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D96875/new/ https://reviews.llvm.org/D96875 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D97119: [flang][driver] Add options for -std=2018

2021-02-20 Thread Tim Keith via Phabricator via cfe-commits
tskeith added a comment. Please make sure the test works with f18 also. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:294 +// We only allow 2018 as the given standard +if (standard.equals("2018")) { + res.SetStandard(); This should be

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-19 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/test/Flang-Driver/fdefault.f90:4 + +! REQUIRES: new-flang-driver + awarzynski wrote: > tskeith wrote: > > Can't this work with the f18 driver too? That's the best way to ensure they > > are consistent. > I think

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-18 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/test/Flang-Driver/fdefault.f90:10 +! RUN: not %flang-new -fsyntax-only -fdefault-double-8 %s 2>&1 | FileCheck %s --check-prefix=DOUBLE +! RUN: mkdir -p %t/dir-flang-new && %flang-new -fsyntax-only -module-dir %t/dir-flang-new

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-18 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/test/Flang-Driver/fdefault.f90:4 + +! REQUIRES: new-flang-driver + Can't this work with the f18 driver too? That's the best way to ensure they are consistent. Comment at:

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-17 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:254 + if (args.hasArg(clang::driver::options::OPT_fdefault_real_8)) +res.defaultKinds().set_defaultRealKind(8); + if (args.hasArg(clang::driver::options::OPT_fdefault_integer_8)) {

[PATCH] D96875: [flang][driver] Add -fdebug-module-writer option

2021-02-17 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:234 + // -J/module-dir option + auto = res.moduleDir(); auto moduleDirList = In my opinion, using mutable references like this make the code hard to understand. Setters

[PATCH] D96344: [flang][driver] Add options for -fdefault* and -flarge-sizes

2021-02-15 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: clang/include/clang/Driver/Options.td:4231 +def flarge_sizes : Flag<["-"],"flarge-sizes">, Group, + HelpText<"Set the default KIND for INTEGER to 8.">; } That's not what -flarge-sizes does. Here is the description

[PATCH] D96483: [flang][driver] Add options for unparsing

2021-02-11 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/tools/f18/f18.cpp:541 driver.debugNoSemantics = true; -} else if (arg == "-funparse") { +} else if (arg == "-funparse" || arg == "-fdebug_unparse") { driver.dumpUnparse = true; This should be

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-02-01 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/include/flang/Frontend/CompilerInstance.h:105 /// { + Fortran::semantics::SemanticsContext () const { return *semantics_; } awarzynski wrote: > tskeith wrote: > > `semanticsContext` would be a better name

[PATCH] D95448: [flang][driver] Add support for `-J/-module-dir`

2021-01-29 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: clang/include/clang/Driver/Options.td:1018 + an USE statement. The default is the current directory.}]>,Group; +def module_dir : Separate<["-"], "module-dir">, Flags<[FlangOption,FC1Option]>, MetaVarName<"">, Alias; def dsym_dir :

[PATCH] D95460: [flang][driver] Add forced form flags and -ffixed-line-length

2021-01-29 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: clang/include/clang/Driver/Options.td:4133 def fconvert_EQ : Joined<["-"], "fconvert=">, Group; -def ffixed_line_length_VALUE : Joined<["-"], "ffixed-line-length-">, Group; +def ffixed_line_length_VALUE : Joined<["-"],

[PATCH] D93453: [flang][driver] Add support for `-I`

2021-01-13 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/test/Flang-Driver/include-header.f90:59 +#endif +end `-I` also is supposed to affect INCLUDE lines so it would be good to have a test for that too. They are handled during preprocessing and so can be tested the

[PATCH] D93401: [flang][driver] Add support for `-D`, `-U`

2020-12-17 Thread Tim Keith via Phabricator via cfe-commits
tskeith added inline comments. Comment at: flang/lib/Frontend/CompilerInvocation.cpp:228 + // Note: GCC drops anything following an end-of-line character. + llvm::StringRef::size_type End = MacroBody.find_first_of("\n\r"); + MacroBody = MacroBody.substr(0, End);

[PATCH] D86089: [flang][driver]Add experimental flang driver and frontend with help screen

2020-08-17 Thread Tim Keith via Phabricator via cfe-commits
tskeith requested changes to this revision. tskeith added inline comments. This revision now requires changes to proceed. Comment at: flang/include/flang/Frontend/CompilerInstance.h:11 + +#include "flang/Frontend/CompilerInvocation.h" + Why is this called

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330220: [XRay] Add clang builtin for xray typed events. (authored by kpw, committed by ). Repository: rC Clang https://reviews.llvm.org/D45716 Files: cfe/trunk/include/clang/Basic/Builtins.def

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC330220: [XRay] Add clang builtin for xray typed events. (authored by kpw, committed by ). Changed prior to commit: https://reviews.llvm.org/D45716?vs=142790=142836#toc Repository: rC Clang

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
kpw updated this revision to Diff 142790. kpw added a comment. Undoing formatting change. Repository: rC Clang https://reviews.llvm.org/D45716 Files: include/clang/Basic/Builtins.def include/clang/Basic/LangOptions.def include/clang/Basic/XRayInstr.h include/clang/Driver/Options.td

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-17 Thread Keith via Phabricator via cfe-commits
kpw added a comment. My editor got a bit carried away with automatically clang-formatting lib/CodeGen/CodeGenFunction.cpp. I'll fix that so that I'm not messing up the revision history. Repository: rC Clang https://reviews.llvm.org/D45716 ___

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw updated this revision to Diff 142737. kpw added a comment. Added flags and bundle options. Repository: rC Clang https://reviews.llvm.org/D45716 Files: include/clang/Basic/Builtins.def include/clang/Basic/LangOptions.def include/clang/Basic/XRayInstr.h

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw added inline comments. Comment at: test/CodeGen/xray-typedevent.cpp:10 + __xray_typedevent(EventType, kPhase, 10); + // CHECK: call void @llvm.xray.typedevent(i16 {{.*}}, i8*{{.*}}, i32 10) +} FYI: It would be involved to match on more than * for the event

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw updated this revision to Diff 142735. kpw added a comment. Adding a comment to the test to encourage getting the event types from compiler-rt Repository: rC Clang https://reviews.llvm.org/D45716 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp

[PATCH] D45716: [XRay] Add clang builtin for xray typed events.

2018-04-16 Thread Keith via Phabricator via cfe-commits
kpw created this revision. kpw added reviewers: dberris, pelikan, rnk, eizan. A clang builtin for xray typed events. Differs from __xray_customevent(...) by the presence of a type tag that is vended by compiler-rt in typical usage. This allows xray handlers to expand logged events with their type