Revert "[flang] Search for #include "file" in right directory"
authorAndrzej Warzynski <andrzej.warzynski@arm.com>
Tue, 26 Jan 2021 12:54:12 +0000 (12:54 +0000)
committerAndrzej Warzynski <andrzej.warzynski@arm.com>
Tue, 26 Jan 2021 13:07:14 +0000 (13:07 +0000)
commite878589098c2ed510159e67d9c6c5e0f3dfbf5a6
tree23b5350656deadb257a285b957985ddd6e90dec7
parent028d7a36681f1ad0388e540cc231e480a487a09e
Revert "[flang] Search for #include "file" in right directory"

This reverts commit d987b61b1dce9948801ac37704477e7c257100b1.

As pointed out in https://reviews.llvm.org/D95388, the reverted commit
causes build failures in the following Flang buildbots:
  * http://lab.llvm.org:8011/#/builders/32/builds/2642
  * http://lab.llvm.org:8011/#/builders/33/builds/2131
  * http://lab.llvm.org:8011/#/builders/135/builds/1473
  * http://lab.llvm.org:8011/#/builders/66/builds/1559
  * http://lab.llvm.org:8011/#/builders/134/builds/1409
  * http://lab.llvm.org:8011/#/builders/132/builds/1817
I'm guessing that the patch was only tested with
`FLANG_BUILD_NEW_DRIVER=Off` (i.e. the default). The builders listed
above set `FLANG_BUILD_NEW_DRIVER` to `On`.

Although fixing the build is relatively easy, the reverted patch
modifies the behaviour of the frontend, which breaks driver tests. In
particular, in https://reviews.llvm.org/D93453 support for `-I` was
added that depends on the current behaviour. The reverted patch
changes that behaviour. Either the tests have to be updated or the
change fine-tuned.
flang/include/flang/Parser/provenance.h
flang/include/flang/Parser/source.h
flang/lib/Parser/parsing.cpp
flang/lib/Parser/preprocessor.cpp
flang/lib/Parser/prescan.cpp
flang/lib/Parser/provenance.cpp
flang/lib/Parser/source.cpp
flang/tools/f18/f18.cpp