Lines Matching refs:driver

120 void RunOtherCompiler(DriverOptions &driver, char *source, char *relo) {  in RunOtherCompiler()  argument
122 for (size_t j{0}; j < driver.fcArgs.size(); ++j) { in RunOtherCompiler()
123 argv.push_back(driver.fcArgs[j]); in RunOtherCompiler()
130 Exec(argv, driver.verbose); in RunOtherCompiler()
133 std::string RelocatableName(const DriverOptions &driver, std::string path) { in RelocatableName() argument
134 if (driver.compileOnly && !driver.outputPath.empty()) { in RelocatableName()
135 return driver.outputPath; in RelocatableName()
154 std::string path, Fortran::parser::Options options, DriverOptions &driver) { in CompileFortran() argument
155 if (!driver.forcedForm) { in CompileFortran()
162 options.searchDirectories = driver.searchDirectories; in CompileFortran()
170 (driver.warningsAreErrors || parsing.messages().AnyFatalError())) { in CompileFortran()
171 llvm::errs() << driver.prefix << "could not scan " << path << '\n'; in CompileFortran()
176 if (driver.dumpProvenance) { in CompileFortran()
182 if (driver.noReformat) { in CompileFortran()
185 parsing.EmitPreprocessedSource(llvm::outs(), driver.lineDirectives); in CompileFortran()
191 if (driver.timeParse) { in CompileFortran()
209 (driver.warningsAreErrors || parsing.messages().AnyFatalError())) || in CompileFortran()
211 llvm::errs() << driver.prefix << "could not parse " << path << '\n'; in CompileFortran()
216 if (driver.dumpParseTree) { in CompileFortran()
220 if (driver.dumpUnparse) { in CompileFortran()
221 Unparse(llvm::outs(), parseTree, driver.encoding, true /*capitalize*/, in CompileFortran()
226 if (driver.syntaxOnly) { in CompileFortran()
230 std::string relo{RelocatableName(driver, path)}; in CompileFortran()
242 Unparse(tmpSource, parseTree, driver.encoding, true /*capitalize*/, in CompileFortran()
247 RunOtherCompiler(driver, tmpSourcePath.data(), relo.data()); in CompileFortran()
249 if (!driver.compileOnly && driver.outputPath.empty()) { in CompileFortran()
255 std::string CompileOtherLanguage(std::string path, DriverOptions &driver) { in CompileOtherLanguage() argument
256 std::string relo{RelocatableName(driver, path)}; in CompileOtherLanguage()
257 RunOtherCompiler(driver, path.data(), relo.data()); in CompileOtherLanguage()
258 if (!driver.compileOnly && driver.outputPath.empty()) { in CompileOtherLanguage()
264 void Link(std::vector<std::string> &relocatables, DriverOptions &driver) { in Link() argument
266 for (size_t j{0}; j < driver.fcArgs.size(); ++j) { in Link()
267 argv.push_back(driver.fcArgs[j].data()); in Link()
272 if (!driver.outputPath.empty()) { in Link()
275 argv.push_back(driver.outputPath.data()); in Link()
277 Exec(argv, driver.verbose); in Link()
284 DriverOptions driver; in main() local
286 driver.fcArgs.push_back(fc ? fc : "gfortran"); in main()
292 driver.prefix = prefix.data(); in main()
316 driver.fcArgs.push_back(arg); in main()
340 driver.forcedForm = true; in main()
343 driver.forcedForm = true; in main()
354 driver.warnOnNonstandardUsage = true; in main()
359 driver.warningsAreErrors = true; in main()
365 driver.lineDirectives = false; in main()
367 driver.noReformat = true; in main()
375 driver.dumpProvenance = true; in main()
377 driver.dumpParseTree = true; in main()
379 driver.dumpUnparse = true; in main()
381 driver.timeParse = true; in main()
383 driver.syntaxOnly = true; in main()
385 driver.compileOnly = true; in main()
387 driver.outputPath = args.front(); in main()
431 driver.fcArgs.push_back(arg); in main()
433 driver.verbose = true; in main()
435 driver.fcArgs.push_back(args.front()); in main()
436 driver.searchDirectories.push_back(args.front()); in main()
439 driver.searchDirectories.push_back(arg.substr(2)); in main()
444 if (driver.warnOnNonstandardUsage) { in main()
449 driver.fcArgs.push_back("-fno-backslash"); // PGI "-Mbackslash" in main()
453 driver.dumpUnparse = true; in main()
454 CompileFortran("-", options, driver); in main()
458 std::string relo{CompileFortran(path, options, driver)}; in main()
459 if (!driver.compileOnly && !relo.empty()) { in main()
464 std::string relo{CompileOtherLanguage(path, driver)}; in main()
465 if (!driver.compileOnly && !relo.empty()) { in main()
470 Link(relocatables, driver); in main()