2022-07-22 16:40:50 +00:00
|
|
|
//==--- FlangOptionDocs.td - Option documentation -------------------------===//
|
|
|
|
//
|
|
|
|
// 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
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def GlobalDocumentation {
|
|
|
|
code Intro =[{..
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
NOTE: This file is automatically generated by running clang-tblgen
|
|
|
|
-gen-opt-docs. Do not edit this file by hand!!
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
|
|
|
=====================================
|
|
|
|
Flang command line argument reference
|
|
|
|
=====================================
|
|
|
|
.. contents::
|
|
|
|
:local:
|
|
|
|
|
|
|
|
Introduction
|
|
|
|
============
|
|
|
|
|
|
|
|
}];
|
|
|
|
|
2024-02-15 10:27:43 +00:00
|
|
|
string Program = "Flang";
|
2023-08-02 16:04:28 -07:00
|
|
|
list<string> VisibilityMask = ["FlangOption"];
|
|
|
|
list<string> IgnoreFlags = ["HelpHidden", "Unsupported", "Ignored"];
|
2022-07-22 16:40:50 +00:00
|
|
|
}
|
|
|
|
|
2024-02-15 10:27:43 +00:00
|
|
|
#define GENERATING_DOCS
|
[flang][docs][nfc] Refine FlangOptionsDocs.td
Currently, FlangOptionsDocs.td doesn't specify `ExcludedFlags` which
means that in the generated documentation file we expose flags that:
* we don't necessarily won't to advertise to our users (e.g. hidden flags), or
* are not supported altogether (e.g. CL options).
This patch defines `ExcludeFlags` to fix that. The definition of
`ExcludeFlags` was copied from Clang so that LLVM frontends have
consistent documentation.
It might be a bit counter-intuitive that IncludeFlags alone is not
sufficient here. However, the current logic in ClangOptionDocEmitter.cpp
will parse IncludeFlags and print all options that contains one of the
included flags, as well as their aliases. So, for example, for -fopenmp
(which is a supported Flang option), one would also get /fopenmp (i.e.
CL mode equivalent for -fopenmp). By adding ExcludeFlags, we make sure
that such aliases are excluded.
I've also taken the liberty and moved FlangOptionsDocs.td. Originally it
was located in Flang's "flang/include" directory, but there shouldn't be
any implementation/documentation files there. Instead, I'm moving it to
the "flang/docs" directory.
Differential Revision: https://reviews.llvm.org/D130558
2022-07-26 09:49:29 +00:00
|
|
|
include "Options.td"
|