[flang-commits] [flang] cc4d286 - [flang] Add runtime interface for COMMAND_ARGUMENT_COUNT

Diana Picus via flang-commits flang-commits at lists.llvm.org
Mon Aug 30 00:41:47 PDT 2021


Author: Diana Picus
Date: 2021-08-30T07:31:13Z
New Revision: cc4d28691bbc382aabf2a59c017b55a6c37f1b18

URL: https://github.com/llvm/llvm-project/commit/cc4d28691bbc382aabf2a59c017b55a6c37f1b18
DIFF: https://github.com/llvm/llvm-project/commit/cc4d28691bbc382aabf2a59c017b55a6c37f1b18.diff

LOG: [flang] Add runtime interface for COMMAND_ARGUMENT_COUNT

Differential Revision: https://reviews.llvm.org/D108687

Added: 
    flang/runtime/command.h

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/flang/runtime/command.h b/flang/runtime/command.h
new file mode 100644
index 0000000000000..a2e23fca318d5
--- /dev/null
+++ b/flang/runtime/command.h
@@ -0,0 +1,25 @@
+//===-- runtime/command.h ---------------------------------------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef FORTRAN_RUNTIME_COMMAND_H_
+#define FORTRAN_RUNTIME_COMMAND_H_
+
+#include "cpp-type.h"
+#include "entry-names.h"
+
+namespace Fortran::runtime {
+extern "C" {
+// 16.9.51 COMMAND_ARGUMENT_COUNT
+//
+// Lowering may need to cast the result to match the precision of the default
+// integer kind.
+CppTypeFor<TypeCategory::Integer, 4> RTNAME(ArgumentCount)();
+}
+} // namespace Fortran::runtime
+
+#endif // FORTRAN_RUNTIME_COMMAND_H_


        


More information about the flang-commits mailing list