Commit c9345084 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

C++: Use #pragma once in cplusplus-update-frontend

Change-Id: Ie4821a04706ee55b4ec17cf73356c15c333b3324
Reviewed-by: Nikolai Kosjar's avatarNikolai Kosjar <nikolai.kosjar@qt.io>
parent bde0f1b0
...@@ -26,8 +26,7 @@ ...@@ -26,8 +26,7 @@
// Changes will be lost. // Changes will be lost.
// //
#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H #pragma once
#define CPLUSPLUS_AST_PATTERN_BUILDER_H
#include "CPlusPlusForwardDeclarations.h" #include "CPlusPlusForwardDeclarations.h"
#include "AST.h" #include "AST.h"
...@@ -1385,5 +1384,3 @@ public: ...@@ -1385,5 +1384,3 @@ public:
}; };
} // end of namespace CPlusPlus } // end of namespace CPlusPlus
#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H
...@@ -1246,8 +1246,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir, ...@@ -1246,8 +1246,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
QTextStream out(&file); QTextStream out(&file);
out << copyrightHeader << out << copyrightHeader <<
"\n" "\n"
"#ifndef CPLUSPLUS_ASTVISITOR_H\n" "#pragma once\n"
"#define CPLUSPLUS_ASTVISITOR_H\n"
"\n" "\n"
"#include \"CPlusPlusForwardDeclarations.h\"\n" "#include \"CPlusPlusForwardDeclarations.h\"\n"
"#include \"ASTfwd.h\"\n" "#include \"ASTfwd.h\"\n"
...@@ -1317,9 +1316,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir, ...@@ -1317,9 +1316,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
" TranslationUnit *_translationUnit;\n" " TranslationUnit *_translationUnit;\n"
"};\n" "};\n"
"\n" "\n"
"} // namespace CPlusPlus\n" "} // namespace CPlusPlus\n";
"\n"
"#endif // CPLUSPLUS_ASTVISITOR_H\n";
closeAndPrintFilePath(file); closeAndPrintFilePath(file);
} }
...@@ -1339,8 +1336,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir, ...@@ -1339,8 +1336,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
QTextStream out(&file); QTextStream out(&file);
out << copyrightHeader << out << copyrightHeader <<
"\n" "\n"
"#ifndef ASTMATCHER_H\n" "#pragma once\n"
"#define ASTMATCHER_H\n"
"\n" "\n"
"#include \"ASTfwd.h\"\n" "#include \"ASTfwd.h\"\n"
"\n" "\n"
...@@ -1360,9 +1356,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir, ...@@ -1360,9 +1356,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
out << out <<
"};\n" "};\n"
"\n" "\n"
"} // namespace CPlusPlus\n" "} // namespace CPlusPlus\n";
"\n"
"#endif // CPLUSPLUS_ASTMATCHER_H\n";
closeAndPrintFilePath(file); closeAndPrintFilePath(file);
} }
...@@ -1574,8 +1568,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir) ...@@ -1574,8 +1568,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
out out
<< copyrightHeader << copyrightHeader
<< generatedHeader << generatedHeader
<< "#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl << "#pragma once" << endl
<< "#define CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl
<< endl << endl
<< "#include \"CPlusPlusForwardDeclarations.h\"" << endl << "#include \"CPlusPlusForwardDeclarations.h\"" << endl
<< "#include \"AST.h\"" << endl << "#include \"AST.h\"" << endl
...@@ -1683,9 +1676,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir) ...@@ -1683,9 +1676,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
out out
<< "};" << endl << "};" << endl
<< endl << endl
<< "} // end of namespace CPlusPlus" << endl << "} // end of namespace CPlusPlus" << endl;
<< endl
<< "#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl;
closeAndPrintFilePath(file); closeAndPrintFilePath(file);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment