[all-commits] [llvm/llvm-project] 87dfd5: [flang][driver] Add support for `-I` in the new dr...

Faris via All-commits all-commits at lists.llvm.org
Tue Jan 19 03:27:22 PST 2021


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 87dfd5e012e147f4bfa3a9a4564e9cbc167278ff
      https://github.com/llvm/llvm-project/commit/87dfd5e012e147f4bfa3a9a4564e9cbc167278ff
  Author: Faris Rehman <faris.rehman at arm.com>
  Date:   2021-01-19 (Tue, 19 Jan 2021)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Flang.cpp
    M flang/include/flang/Frontend/PreprocessorOptions.h
    M flang/lib/Frontend/CompilerInvocation.cpp
    A flang/test/Flang-Driver/Inputs/basic-header-one.h
    A flang/test/Flang-Driver/Inputs/basic-header-two.h
    A flang/test/Flang-Driver/Inputs/basictestmoduleone.mod
    A flang/test/Flang-Driver/Inputs/header-dir/basic-header-one.h
    A flang/test/Flang-Driver/Inputs/header-dir/basic-header-two.h
    A flang/test/Flang-Driver/Inputs/module-dir/basictestmoduletwo.mod
    M flang/test/Flang-Driver/driver-help-hidden.f90
    M flang/test/Flang-Driver/driver-help.f90
    A flang/test/Flang-Driver/include-header.f90
    A flang/test/Flang-Driver/include-module.f90

  Log Message:
  -----------
  [flang][driver] Add support for `-I` in the new driver

Add support for option -I in the new Flang driver. This will allow for
included headers and module files in other directories, as the default
search path is currently the working folder. The behaviour of this is
consistent with the current f18 driver, where the current folder (i.e.
".") has the highest priority followed by the order of '-I's taking
priority from first to last.

Summary of changes:
- Add SearchDirectoriesFromDashI to PreprocessorOptions, to be forwarded
  into the parser's searchDirectories
- Add header files and non-functional module files to be used in
  regression tests. The module files are just text files and are used to
  demonstrated that paths specified with `-I` are taken into account when
  searching for .mod files.

Differential Revision: https://reviews.llvm.org/D93453




More information about the All-commits mailing list