[PATCH] D105546: [flang][driver] Fix how output filename is generated

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 03:52:14 PDT 2021


awarzynski created this revision.
Herald added a reviewer: sscalpone.
awarzynski requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently, `flang -c file.f` generates `flang_unparsed_source_file_0.o`.
This is incorrect. This patch:

- simplifies the logic around output filename generation, and
- makes sure that `file.o` is produced instead of e.g. `flang_unparsed_source_file_0.o` when using the `-c` flag

The output filename generation is moved to a dedicated function. I've
also made a few minor improvements, e.g. marked variables as local,
added comments, refined error messages.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D105546

Files:
  flang/tools/f18/flang.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105546.356917.patch
Type: text/x-patch
Size: 5489 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210707/0af448cd/attachment.bin>


More information about the llvm-commits mailing list