[flang] Revert 3 commits pushed by mistake along b7c07ce15f

Revert "[flang][NFC] Add debug dump method to evaluate::Expr and semantics::Symbol"
This reverts commit b0e35fde21.

Revert "[flang] Add a wrapper for Fortran main program"
This reverts commit 2c1ce0755e.

Revert "[flang][NFC] Fix header comments in some runtime headers"
This reverts commit a63f57674d.
This commit is contained in:
Jean Perier 2021-10-01 08:58:52 +02:00
parent b7c07ce15f
commit 7a6ab39e71
5 changed files with 12 additions and 24 deletions

View file

@ -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)

View file

@ -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.

View file

@ -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>

View file

@ -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 different 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
)

View file

@ -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;
}