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 @@
// Changes will be lost.
//
#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H
#define CPLUSPLUS_AST_PATTERN_BUILDER_H
#pragma once
#include "CPlusPlusForwardDeclarations.h"
#include "AST.h"
......@@ -1385,5 +1384,3 @@ public:
};
} // end of namespace CPlusPlus
#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H
......@@ -1246,8 +1246,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
QTextStream out(&file);
out << copyrightHeader <<
"\n"
"#ifndef CPLUSPLUS_ASTVISITOR_H\n"
"#define CPLUSPLUS_ASTVISITOR_H\n"
"#pragma once\n"
"\n"
"#include \"CPlusPlusForwardDeclarations.h\"\n"
"#include \"ASTfwd.h\"\n"
......@@ -1317,9 +1316,7 @@ void generateASTVisitor_H(const Snapshot &, const QDir &cplusplusDir,
" TranslationUnit *_translationUnit;\n"
"};\n"
"\n"
"} // namespace CPlusPlus\n"
"\n"
"#endif // CPLUSPLUS_ASTVISITOR_H\n";
"} // namespace CPlusPlus\n";
closeAndPrintFilePath(file);
}
......@@ -1339,8 +1336,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
QTextStream out(&file);
out << copyrightHeader <<
"\n"
"#ifndef ASTMATCHER_H\n"
"#define ASTMATCHER_H\n"
"#pragma once\n"
"\n"
"#include \"ASTfwd.h\"\n"
"\n"
......@@ -1360,9 +1356,7 @@ void generateASTMatcher_H(const Snapshot &, const QDir &cplusplusDir,
out <<
"};\n"
"\n"
"} // namespace CPlusPlus\n"
"\n"
"#endif // CPLUSPLUS_ASTMATCHER_H\n";
"} // namespace CPlusPlus\n";
closeAndPrintFilePath(file);
}
......@@ -1574,8 +1568,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
out
<< copyrightHeader
<< generatedHeader
<< "#ifndef CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl
<< "#define CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl
<< "#pragma once" << endl
<< endl
<< "#include \"CPlusPlusForwardDeclarations.h\"" << endl
<< "#include \"AST.h\"" << endl
......@@ -1683,9 +1676,7 @@ void generateASTPatternBuilder_h(const QDir &cplusplusDir)
out
<< "};" << endl
<< endl
<< "} // end of namespace CPlusPlus" << endl
<< endl
<< "#endif // CPLUSPLUS_AST_PATTERN_BUILDER_H" << endl;
<< "} // end of namespace CPlusPlus" << endl;
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