From: Tim Keith Date: Tue, 1 May 2018 21:07:52 +0000 (-0700) Subject: [flang] Make include guards consistent. X-Git-Tag: llvmorg-12-init~9537^2~2630 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4008e3e5d779d1b3f1382c15ba4c83fcc38de4f6;p=platform%2Fupstream%2Fllvm.git [flang] Make include guards consistent. The include guard symbol is `FORTRAN_$dir_$file_H_` where $dir is the subdirectory of `lib` and $file is the basename of the header file. Those names are mapped to uppercase and hyphens are replaced by underscores. Original-commit: flang-compiler/f18@ac9c0e7106c898479cf35086861a711ab7c0210a Reviewed-on: https://github.com/flang-compiler/f18/pull/75 --- diff --git a/flang/lib/parser/format-specification.h b/flang/lib/parser/format-specification.h index 24d8558..0b1c9b9 100644 --- a/flang/lib/parser/format-specification.h +++ b/flang/lib/parser/format-specification.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FORTRAN_FORMAT_SPECIFICATION_H_ -#define FORTRAN_FORMAT_SPECIFICATION_H_ +#ifndef FORTRAN_PARSER_FORMAT_SPECIFICATION_H_ +#define FORTRAN_PARSER_FORMAT_SPECIFICATION_H_ // Represent parses of Fortran format specifications from FORMAT statements // and character literals in formatted I/O statements at compilation time @@ -146,4 +146,4 @@ struct FormatSpecification { }; } // namespace format } // namespace Fortran -#endif // FORTRAN_FORMAT_SPECIFICATION_H_ +#endif // FORTRAN_PARSER_FORMAT_SPECIFICATION_H_ diff --git a/flang/lib/semantics/GetValue.h b/flang/lib/semantics/GetValue.h index d382bb9..2d86e72 100644 --- a/flang/lib/semantics/GetValue.h +++ b/flang/lib/semantics/GetValue.h @@ -12,7 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FLANG_SUPPORT_GET_VALUE_H +#ifndef FORTRAN_SEMANTICS_GETVALUE_H_ +#define FORTRAN_SEMANTICS_GETVALUE_H_ #undef IGNORE_optional #undef IGNORE_Statement @@ -130,4 +131,4 @@ #include "GetValue.def" #undef IGNORE_DefaultChar -#endif +#endif // FORTRAN_SEMANTICS_GETVALUE_H_ diff --git a/flang/lib/semantics/LabelTable.h b/flang/lib/semantics/LabelTable.h index 0f34d03..1cbe276 100644 --- a/flang/lib/semantics/LabelTable.h +++ b/flang/lib/semantics/LabelTable.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FORTRAN_LABEL_TABLE_H_ -#define FORTRAN_LABEL_TABLE_H_ +#ifndef FORTRAN_SEMANTICS_LABELTABLE_H_ +#define FORTRAN_SEMANTICS_LABELTABLE_H_ #include #include @@ -103,4 +103,4 @@ public: } // of namespace Fortran::semantics -#endif // FORTRAN_LABEL_TABLE_H_ +#endif // FORTRAN_SEMANTICS_LABELTABLE_H_ diff --git a/flang/lib/semantics/ParseTreeDump.h b/flang/lib/semantics/ParseTreeDump.h index 14470d7..590fdd2 100644 --- a/flang/lib/semantics/ParseTreeDump.h +++ b/flang/lib/semantics/ParseTreeDump.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FLANG_SEMA_PARSE_TREE_DUMP_H -#define FLANG_SEMA_PARSE_TREE_DUMP_H +#ifndef FORTRAN_SEMANTICS_PARSETREEDUMP_H_ +#define FORTRAN_SEMANTICS_PARSETREEDUMP_H_ #include "symbol.h" #include "../parser/format-specification.h" @@ -285,4 +285,4 @@ FLANG_PARSE_TREE_DUMPER_INSTANTIATE_ALL(extern) } // of namespace -#endif +#endif // FORTRAN_SEMANTICS_PARSETREEDUMP_H_ diff --git a/flang/lib/semantics/SemanticData.h b/flang/lib/semantics/SemanticData.h index 2a3053d..dfa90ed 100644 --- a/flang/lib/semantics/SemanticData.h +++ b/flang/lib/semantics/SemanticData.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FORTRAN_SEMA_DATA_H_ -#define FORTRAN_SEMA_DATA_H_ +#ifndef FORTRAN_SEMANTICS_SEMANTICDATA_H_ +#define FORTRAN_SEMANTICS_SEMANTICDATA_H_ #include @@ -605,4 +605,4 @@ END_SEMANTIC_DATA; } // of namespace Fortran::semantics -#endif // FORTRAN_SEMA_DATA_H_ +#endif // FORTRAN_SEMANTICS_SEMANTICDATA_H_ diff --git a/flang/lib/semantics/StatementMap.h b/flang/lib/semantics/StatementMap.h index 5b080b5..8dce381 100644 --- a/flang/lib/semantics/StatementMap.h +++ b/flang/lib/semantics/StatementMap.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FLANG_SEMA_STATEMENT_MAP_H -#define FLANG_SEMA_STATEMENT_MAP_H +#ifndef FORTRAN_SEMANTICS_STATEMENTMAP_H_ +#define FORTRAN_SEMANTICS_STATEMENTMAP_H_ #include "Stmt.h" #include @@ -239,4 +239,4 @@ public: } // namespace Fortran::semantics -#endif // of FLANG_SEMA_STATEMENT_MAP_H +#endif // FORTRAN_SEMANTICS_STATEMENTMAP_H_ diff --git a/flang/lib/semantics/Stmt.h b/flang/lib/semantics/Stmt.h index 926a998..6767263 100644 --- a/flang/lib/semantics/Stmt.h +++ b/flang/lib/semantics/Stmt.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FLANG_SEMA_STMT_H_ -#define FLANG_SEMA_STMT_H_ +#ifndef FORTRAN_SEMANTICS_STMT_H_ +#define FORTRAN_SEMANTICS_STMT_H_ #include "../parser/parse-tree.h" #include @@ -66,4 +66,4 @@ constexpr const char *StmtClassText(StmtClass sc) { } // end of namespace Fortran::semantics -#endif // of FLANG_SEMA_STMT_H_ +#endif // FORTRAN_SEMANTICS_STMT_H_ diff --git a/flang/lib/semantics/attr.h b/flang/lib/semantics/attr.h index d5b5d1b..061defa 100644 --- a/flang/lib/semantics/attr.h +++ b/flang/lib/semantics/attr.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FORTRAN_ATTR_H_ -#define FORTRAN_ATTR_H_ +#ifndef FORTRAN_SEMANTICS_ATTR_H_ +#define FORTRAN_SEMANTICS_ATTR_H_ #include "enum-set.h" #include "../parser/idioms.h" @@ -54,4 +54,4 @@ std::ostream &operator<<(std::ostream &o, Attr attr); std::ostream &operator<<(std::ostream &o, const Attrs &attrs); } // namespace semantics } // namespace Fortran -#endif +#endif // FORTRAN_SEMANTICS_ATTR_H_ diff --git a/flang/lib/semantics/resolve-names.h b/flang/lib/semantics/resolve-names.h index 653b0b2..5f52954 100644 --- a/flang/lib/semantics/resolve-names.h +++ b/flang/lib/semantics/resolve-names.h @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#ifndef FORTRAN_SEMANTICS_RESOLVE_NAMES_H_ +#define FORTRAN_SEMANTICS_RESOLVE_NAMES_H_ + #include namespace Fortran::parser { @@ -25,3 +28,5 @@ void ResolveNames(parser::Program &, const parser::CookedSource &); void DumpSymbols(std::ostream &); } // namespace Fortran::semantics + +#endif // FORTRAN_SEMANTICS_RESOLVE_NAMES_H_ diff --git a/flang/lib/semantics/rewrite-parse-tree.h b/flang/lib/semantics/rewrite-parse-tree.h index 52cf996..f2f93b5 100644 --- a/flang/lib/semantics/rewrite-parse-tree.h +++ b/flang/lib/semantics/rewrite-parse-tree.h @@ -12,6 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. +#ifndef FORTRAN_SEMANTICS_REWRITE_PARSE_TREE_H_ +#define FORTRAN_SEMANTICS_REWRITE_PARSE_TREE_H_ + namespace Fortran::parser { struct Program; } // namespace Fortran::parser @@ -19,3 +22,5 @@ struct Program; namespace Fortran::semantics { void RewriteParseTree(parser::Program &); } // namespace Fortran::semantics + +#endif // FORTRAN_SEMANTICS_REWRITE_PARSE_TREE_H_ diff --git a/flang/lib/semantics/type.h b/flang/lib/semantics/type.h index d3381a1..ff3341d 100644 --- a/flang/lib/semantics/type.h +++ b/flang/lib/semantics/type.h @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef FORTRAN_TYPE_H_ -#define FORTRAN_TYPE_H_ +#ifndef FORTRAN_SEMANTICS_TYPE_H_ +#define FORTRAN_SEMANTICS_TYPE_H_ #include "attr.h" #include "../parser/idioms.h" @@ -504,4 +504,4 @@ private: } // namespace semantics } // namespace Fortran -#endif +#endif // FORTRAN_SEMANTICS_TYPE_H_