Skip to content

Commit b3f9e91

Browse files
committed
Re-add ISO-Fortran-binding unittest & cleanup
1 parent 3beb59b commit b3f9e91

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

FortranRuntime/cmake/config.h.cmake.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/*===-- cmake/config.cmake.in ---------------------------------------*- C -*-===
2+
*
3+
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4+
* See https://llvm.org/LICENSE.txt for license information.
5+
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6+
*
7+
*===----------------------------------------------------------------------===*/
8+
19
#ifndef FORTRAN_RUNTIME_CONFIG_H
210
#define FORTRAN_RUNTIME_CONFIG_H
311

FortranRuntime/lib/Runtime/command.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#include "flang/Runtime//command.h"
9+
#include "flang/Runtime/command.h"
1010
#include "FortranRuntime/Runtime/descriptor.h"
1111
#include "environment.h"
1212
#include "stat.h"

FortranRuntime/unittests/Evaluate/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,10 @@ add_flang_nongtest_unittest(reshape
1212
FortranEvaluate
1313
FortranRuntime
1414
)
15+
16+
add_flang_nongtest_unittest(ISO-Fortran-binding
17+
FortranEvaluateTesting
18+
FortranEvaluate
19+
FortranSemantics
20+
FortranRuntime
21+
)

FortranRuntime/unittests/Evaluate/ISO-Fortran-binding.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ template <int rank> class Test_CFI_CDESC_T {
2828
MATCH(false, std::is_const<type>::value);
2929
MATCH(false, std::is_volatile<type>::value);
3030
// suitable in size
31-
MATCH(true, Descriptor::SizeInBytes(rank_, false) <= Fortran::common::MaxDescriptorSizeInBytes( rank_, false));
31+
MATCH(true,
32+
Descriptor::SizeInBytes(rank_, false) <=
33+
MaxDescriptorSizeInBytes(rank_, false));
3234
if (rank > 0) {
3335
MATCH(sizeof(dvStorage_), Descriptor::SizeInBytes(rank_, false));
3436
} else { // C++ implementation over-allocates for rank=0 by 24bytes.

flang/include/flang/Runtime/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ The requirements for common code include:
2323

2424
* Global declarations may need to be annotated using definitions from
2525
`api-attrs.h`.
26+
27+
* The `Runtime` component is header-only.

flang/unittests/Evaluate/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
22
add_library(FortranEvaluateTesting
3-
../../lib/Testing/testing.cpp
4-
../../lib/Testing/fp-testing.cpp
3+
${FLANG_SOURCE_DIR}/lib/Testing/testing.cpp
4+
${FLANG_SOURCE_DIR}/lib/Testing/fp-testing.cpp
55
)
66
set_target_properties(FortranEvaluateTesting PROPERTIES FOLDER "Flang/Tests")
77
if (LLVM_LINK_LLVM_DYLIB)

0 commit comments

Comments
 (0)