[flang] Make include guards consistent.
authorTim Keith <tkeith@nvidia.com>
Tue, 1 May 2018 21:07:52 +0000 (14:07 -0700)
committerTim Keith <tkeith@nvidia.com>
Tue, 1 May 2018 21:07:52 +0000 (14:07 -0700)
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

flang/lib/parser/format-specification.h
flang/lib/semantics/GetValue.h
flang/lib/semantics/LabelTable.h
flang/lib/semantics/ParseTreeDump.h
flang/lib/semantics/SemanticData.h
flang/lib/semantics/StatementMap.h
flang/lib/semantics/Stmt.h
flang/lib/semantics/attr.h
flang/lib/semantics/resolve-names.h
flang/lib/semantics/rewrite-parse-tree.h
flang/lib/semantics/type.h

index 24d8558..0b1c9b9 100644 (file)
@@ -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_
index d382bb9..2d86e72 100644 (file)
@@ -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
 #include "GetValue.def"
 #undef IGNORE_DefaultChar
 
-#endif
+#endif  // FORTRAN_SEMANTICS_GETVALUE_H_
index 0f34d03..1cbe276 100644 (file)
@@ -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 <cassert>
 #include <stack>
@@ -103,4 +103,4 @@ public:
 
 } // of namespace Fortran::semantics
 
-#endif  // FORTRAN_LABEL_TABLE_H_
+#endif  // FORTRAN_SEMANTICS_LABELTABLE_H_
index 14470d7..590fdd2 100644 (file)
@@ -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_
index 2a3053d..dfa90ed 100644 (file)
@@ -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 <cassert> 
 
@@ -605,4 +605,4 @@ END_SEMANTIC_DATA;
 
 } // of namespace Fortran::semantics
 
-#endif // FORTRAN_SEMA_DATA_H_
+#endif  // FORTRAN_SEMANTICS_SEMANTICDATA_H_
index 5b080b5..8dce381 100644 (file)
@@ -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 <functional>
@@ -239,4 +239,4 @@ public:
 
 }  // namespace Fortran::semantics
 
-#endif // of FLANG_SEMA_STATEMENT_MAP_H
+#endif  // FORTRAN_SEMANTICS_STATEMENTMAP_H_
index 926a998..6767263 100644 (file)
@@ -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 <variant>
@@ -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_
index d5b5d1b..061defa 100644 (file)
@@ -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_
index 653b0b2..5f52954 100644 (file)
@@ -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 <iosfwd>
 
 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_
index 52cf996..f2f93b5 100644 (file)
@@ -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_
index d3381a1..ff3341d 100644 (file)
@@ -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_