diff options
author | Ben Brewer <ben.brewer@codethink.co.uk> | 2015-08-25 15:42:27 +0100 |
---|---|---|
committer | Ben Brewer <ben.brewer@codethink.co.uk> | 2015-08-25 17:17:31 +0100 |
commit | e779a5d1e793893c2e995eefce71908c4fe79871 (patch) | |
tree | 6d47b826fbc18fd70d0542f19864c20ea2d6ba20 | |
parent | 3d5977ed2d56036f5156ac277d209a9b2455ca3d (diff) | |
download | flang-e779a5d1e793893c2e995eefce71908c4fe79871.tar.gz |
Add -f77 flag to flang driver
-rw-r--r-- | tools/driver/Main.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/driver/Main.cpp b/tools/driver/Main.cpp index 4d0bd528bc..cb18650f08 100644 --- a/tools/driver/Main.cpp +++ b/tools/driver/Main.cpp @@ -154,6 +154,9 @@ namespace { cl::opt<bool> FixedForm("ffixed-form", cl::desc("the source files are using fixed form layout"), cl::init(false)); + cl::opt<bool> + Fortran77("f77", cl::desc("compile with Fortran77 features"), cl::init(false)); + } // end anonymous namespace @@ -366,8 +369,10 @@ static bool ParseFile(const std::string &Filename, Opts.DefaultDouble8 = DefaultDouble8; Opts.DefaultInt8 = DefaultInt8; Opts.ReturnComments = ReturnComments; + Opts.Fortran77 = Fortran77; + + llvm::StringRef Ext = llvm::sys::path::extension(Filename); if(!FreeForm && !FixedForm) { - llvm::StringRef Ext = llvm::sys::path::extension(Filename); if(Ext.equals_lower(".f")) { Opts.FixedForm = 1; Opts.FreeForm = 0; @@ -376,6 +381,8 @@ static bool ParseFile(const std::string &Filename, Opts.FixedForm = 1; Opts.FreeForm = 0; } + if (!Fortran77 && Ext.equals_lower(".f77")) + Opts.Fortran77 = 1; TextDiagnosticPrinter TDP(SrcMgr); DiagnosticsEngine Diag(new DiagnosticIDs,&SrcMgr, &TDP, false); |