This is an archive of the discontinued LLVM Phabricator instance.

[clang][driver] Set the input type to Fortran when reading from stdin
ClosedPublic

Authored by awarzynski on Feb 16 2021, 5:44 AM.

Details

Summary

This patch makes sure that for the following invocation of the new Flang
driver, clangDriver sets the input type to Fortran:

flang-new -E -

This change does not affect clang, i.e. for the following invocation
the input type is set to C:

clang -E -

This change leverages the fact that for flang-new the driver is in
Flang mode.

Diff Detail

Event Timeline

awarzynski created this revision.Feb 16 2021, 5:44 AM
awarzynski requested review of this revision.Feb 16 2021, 5:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2021, 5:44 AM
SouraVX accepted this revision.Feb 21 2021, 9:18 PM

Thanks! for the patch.
This code touches some of the clang part, Anyway changes are pretty self-explanatory. I'll leave this one to you, if you want land it or wait from someone from clang community to take a look :)

This revision is now accepted and ready to land.Feb 21 2021, 9:18 PM

Thanks! for the patch.
This code touches some of the clang part, Anyway changes are pretty self-explanatory. I'll leave this one to you, if you want land it or wait from someone from clang community to take a look :)

Thank you for reviewing!

Git history tells me that @hans touched this bit most recently - in 2014 :) Added as a reviewer - I will wait another day or two before merging.

hans added a comment.Feb 22 2021, 4:45 AM

Thanks! for the patch.
This code touches some of the clang part, Anyway changes are pretty self-explanatory. I'll leave this one to you, if you want land it or wait from someone from clang community to take a look :)

Thank you for reviewing!

Git history tells me that @hans touched this bit most recently - in 2014 :) Added as a reviewer - I will wait another day or two before merging.

I don't remember what I did here in 2014, but this looks reasonable to me.

hans accepted this revision.Feb 22 2021, 4:45 AM