From d1c2c7b4b1797619f17d7a190de0ab5d4e245f5d Mon Sep 17 00:00:00 2001 From: peter klausler Date: Mon, 11 Mar 2019 15:01:27 -0700 Subject: [PATCH] [flang] Temporarily disconnect FIR from f18.cc build Original-commit: flang-compiler/f18@c610bc2744ad56adae8de09a81069a2c3df396e7 Reviewed-on: https://github.com/flang-compiler/f18/pull/327 --- flang/tools/f18/CMakeLists.txt | 4 ++-- flang/tools/f18/f18.cc | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt index e894bb2..df87112 100644 --- a/flang/tools/f18/CMakeLists.txt +++ b/flang/tools/f18/CMakeLists.txt @@ -21,6 +21,6 @@ target_link_libraries(f18 FortranParser FortranEvaluate FortranSemantics - FortranFIR - ${LLVM_COMMON_LIBS} +# FortranFIR +# ${LLVM_COMMON_LIBS} ) diff --git a/flang/tools/f18/f18.cc b/flang/tools/f18/f18.cc index e0b733f..79bb0d2 100644 --- a/flang/tools/f18/f18.cc +++ b/flang/tools/f18/f18.cc @@ -14,8 +14,10 @@ // Temporary Fortran front end driver main program for development scaffolding. +#ifdef FIR #include "../../lib/FIR/afforestation.h" #include "../../lib/FIR/graph-writer.h" +#endif #include "../../lib/common/default-kinds.h" #include "../../lib/parser/characters.h" #include "../../lib/parser/features.h" @@ -238,9 +240,11 @@ std::string CompileFortran(std::string path, Fortran::parser::Options options, } } if (driver.dumpGraph) { +#ifdef FIR auto *fir{Fortran::FIR::CreateFortranIR(parseTree, semanticsContext, driver.debugLinearFIR)}; Fortran::FIR::GraphWriter::print(*fir); +#endif return {}; } if (driver.dumpParseTree) { -- 2.7.4