[flang-commits] [flang] 7a6ab39 - [flang] Revert 3 commits pushed by mistake along b7c07ce15ffe6da9dcd69d457a3eca987452edc7
Jean Perier via flang-commits
flang-commits at lists.llvm.org
Fri Oct 1 00:05:29 PDT 2021
Author: Jean Perier
Date: 2021-10-01T09:01:31+02:00
New Revision: 7a6ab39e71c070cc2b96e93c7feed67952452c03
URL: https://github.com/llvm/llvm-project/commit/7a6ab39e71c070cc2b96e93c7feed67952452c03
DIFF: https://github.com/llvm/llvm-project/commit/7a6ab39e71c070cc2b96e93c7feed67952452c03.diff
LOG: [flang] Revert 3 commits pushed by mistake along b7c07ce15ffe6da9dcd69d457a3eca987452edc7
Revert "[flang][NFC] Add debug dump method to evaluate::Expr and semantics::Symbol"
This reverts commit b0e35fde21ecb47799603e1acfc9ffa7b83dea13.
Revert "[flang] Add a wrapper for Fortran main program"
This reverts commit 2c1ce0755e09909c41db93845c4c3f42457cb9c8.
Revert "[flang][NFC] Fix header comments in some runtime headers"
This reverts commit a63f57674d511eb287edbabad9674c6298cf8b84.
Added:
Modified:
flang/cmake/modules/AddFlang.cmake
flang/include/flang/Runtime/magic-numbers.h
flang/lib/Evaluate/expression.cpp
flang/runtime/CMakeLists.txt
Removed:
flang/runtime/Fortran_main.c
################################################################################
diff --git a/flang/cmake/modules/AddFlang.cmake b/flang/cmake/modules/AddFlang.cmake
index 82a31424269d2..5da58a59ed121 100644
--- a/flang/cmake/modules/AddFlang.cmake
+++ b/flang/cmake/modules/AddFlang.cmake
@@ -17,7 +17,7 @@ endmacro()
macro(add_flang_library name)
cmake_parse_arguments(ARG
- "SHARED;STATIC"
+ "SHARED"
""
"ADDITIONAL_HEADERS"
${ARGN})
@@ -52,7 +52,7 @@ macro(add_flang_library name)
else()
# llvm_add_library ignores BUILD_SHARED_LIBS if STATIC is explicitly set,
# so we need to handle it here.
- if (BUILD_SHARED_LIBS AND NOT ARG_STATIC)
+ if (BUILD_SHARED_LIBS)
set(LIBTYPE SHARED OBJECT)
else()
set(LIBTYPE STATIC OBJECT)
diff --git a/flang/include/flang/Runtime/magic-numbers.h b/flang/include/flang/Runtime/magic-numbers.h
index b2c6accdc357e..0f1957b4648b7 100644
--- a/flang/include/flang/Runtime/magic-numbers.h
+++ b/flang/include/flang/Runtime/magic-numbers.h
@@ -1,4 +1,5 @@
-#if 0 /*===-- include/flang/Runtime/magic-numbers.h -----------------------===*/
+#if 0 /*===-- include/flang/Runtime/magic-numbers.h \
+ -----------------------===*/
/*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
diff --git a/flang/lib/Evaluate/expression.cpp b/flang/lib/Evaluate/expression.cpp
index 10866193aeb3b..576e3309d536e 100644
--- a/flang/lib/Evaluate/expression.cpp
+++ b/flang/lib/Evaluate/expression.cpp
@@ -18,7 +18,6 @@
#include "flang/Semantics/symbol.h"
#include "flang/Semantics/tools.h"
#include "flang/Semantics/type.h"
-#include "llvm/Support/Compiler.h"
#include "llvm/Support/raw_ostream.h"
#include <string>
#include <type_traits>
diff --git a/flang/runtime/CMakeLists.txt b/flang/runtime/CMakeLists.txt
index d7b6b798ff398..b3e96faede706 100644
--- a/flang/runtime/CMakeLists.txt
+++ b/flang/runtime/CMakeLists.txt
@@ -1,9 +1,15 @@
+#===-- runtime/CMakeLists.txt ----------------------------------------------===#
+#
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+#
+#===------------------------------------------------------------------------===#
include(CheckCXXSymbolExists)
include(CheckCXXSourceCompiles)
check_cxx_symbol_exists(strerror string.h HAVE_STRERROR)
check_cxx_symbol_exists(strerror_r string.h HAVE_STRERROR_R)
-
# Can't use symbol exists here as the function is overloaded in C++
check_cxx_source_compiles(
"#include <string.h>
@@ -24,7 +30,7 @@ configure_file(config.h.cmake config.h)
# with
diff erent names
include_directories(AFTER ${CMAKE_CURRENT_BINARY_DIR})
-add_flang_library(FortranRuntime PARTIAL_SOURCES_INTENDED
+add_flang_library(FortranRuntime
ISO_Fortran_binding.cpp
allocatable.cpp
assign.cpp
@@ -76,7 +82,3 @@ add_flang_library(FortranRuntime PARTIAL_SOURCES_INTENDED
LINK_LIBS
FortranDecimal
)
-
-add_flang_library(Fortran_main STATIC PARTIAL_SOURCES_INTENDED
- Fortran_main.c
-)
diff --git a/flang/runtime/Fortran_main.c b/flang/runtime/Fortran_main.c
deleted file mode 100644
index 88f0cdb28c2b7..0000000000000
--- a/flang/runtime/Fortran_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "flang/Runtime/main.h"
-#include "flang/Runtime/stop.h"
-
-/* main entry into PROGRAM */
-void _QQmain();
-
-/* C main stub */
-int main(int argc, const char *argv[], const char *envp[])
-{
- RTNAME(ProgramStart)(argc, argv, envp);
- _QQmain();
- RTNAME(ProgramEndStatement)();
- return 0;
-}
More information about the flang-commits
mailing list