Skip to content

Commit 33b72bd

Browse files
committed
[Refactoring] Add guards around header files in lib/Refactoring
1 parent 755655a commit 33b72bd

File tree

8 files changed

+40
-0
lines changed

8 files changed

+40
-0
lines changed

lib/Refactoring/Async/AsyncRefactoring.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#ifndef SWIFT_REFACTORING_ASYNCREFACTORING_H
14+
#define SWIFT_REFACTORING_ASYNCREFACTORING_H
15+
1316
#include "ContextFinder.h"
1417
#include "swift/AST/ASTContext.h"
1518
#include "swift/AST/DiagnosticsRefactoring.h"
@@ -1376,3 +1379,5 @@ class AsyncConverter : private SourceEntityWalker {
13761379
} // namespace asyncrefactorings
13771380
} // namespace refactoring
13781381
} // namespace swift
1382+
1383+
#endif

lib/Refactoring/Async/Utils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#ifndef SWIFT_REFACTORING_ASYNCUTILS_H
14+
#define SWIFT_REFACTORING_ASYNCUTILS_H
15+
1316
#include "swift/AST/Stmt.h"
1417

1518
namespace swift {
@@ -31,3 +34,5 @@ FuncDecl *getUnderlyingFunc(const Expr *Fn);
3134
} // namespace asyncrefactorings
3235
} // namespace refactoring
3336
} // namespace swift
37+
38+
#endif

lib/Refactoring/ContextFinder.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#ifndef SWIFT_REFACTORING_CONTEXTFINDER_H
14+
#define SWIFT_REFACTORING_CONTEXTFINDER_H
15+
1316
#include "swift/AST/ASTContext.h"
1417
#include "swift/AST/SourceFile.h"
1518
#include "swift/Basic/SourceManager.h"
@@ -68,3 +71,5 @@ class ContextFinder : public SourceEntityWalker {
6871

6972
} // namespace refactoring
7073
} // namespace swift
74+
75+
#endif

lib/Refactoring/ExtractExprBase.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#ifndef SWIFT_REFACTORING_EXTRACTEXPRBASE_H
14+
#define SWIFT_REFACTORING_EXTRACTEXPRBASE_H
15+
1316
#include "swift/AST/ASTContext.h"
1417
#include "swift/AST/SourceFile.h"
1518
#include "swift/IDE/IDERequests.h"
@@ -80,3 +83,5 @@ class RefactoringActionExtractExprBase {
8083

8184
} // namespace refactoring
8285
} // namespace swift
86+
87+
#endif

lib/Refactoring/LocalRename.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#ifndef SWIFT_REFACTORING_LOCALRENAME_H
14+
#define SWIFT_REFACTORING_LOCALRENAME_H
15+
1316
#include "swift/Refactoring/Refactoring.h"
1417

1518
namespace swift {
@@ -24,3 +27,5 @@ struct RenameInfo {
2427
llvm::Optional<RenameInfo> getRenameInfo(ResolvedCursorInfoPtr cursorInfo);
2528
} // namespace refactoring
2629
} // namespace swift
30+
31+
#endif

lib/Refactoring/RefactoringActions.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12+
#ifndef SWIFT_REFACTORING_REFACTORINGACTIONS_H
13+
#define SWIFT_REFACTORING_REFACTORINGACTIONS_H
14+
1215
#include "swift/AST/ASTContext.h"
1316
#include "swift/AST/SourceFile.h"
1417
#include "swift/Basic/SourceManager.h"
@@ -130,3 +133,5 @@ class RangeBasedRefactoringAction : public RefactoringAction {
130133

131134
} // end namespace refactoring
132135
} // end namespace swift
136+
137+
#endif

lib/Refactoring/Renamer.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#ifndef SWIFT_REFACTORING_RENAME_H
14+
#define SWIFT_REFACTORING_RENAME_H
15+
1316
#include "swift/Basic/SourceManager.h"
1417
#include "swift/IDE/Utils.h"
1518
#include "swift/Parse/Lexer.h"
@@ -100,3 +103,5 @@ class RenameRangeDetailCollector : public Renamer {
100103

101104
} // namespace refactoring
102105
} // namespace swift
106+
107+
#endif

lib/Refactoring/Utils.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13+
#ifndef SWIFT_REFACTORING_UTILS_H
14+
#define SWIFT_REFACTORING_UTILS_H
15+
1316
#include "swift/AST/ASTContext.h"
1417
#include "swift/AST/Decl.h"
1518
#include "swift/Basic/LLVM.h"
@@ -26,3 +29,5 @@ StringRef correctNewDeclName(DeclContext *DC, StringRef Name);
2629
SmallVector<ProtocolDecl *, 2> getAllProtocols(NominalTypeDecl *NTD);
2730
}
2831
} // namespace swift
32+
33+
#endif

0 commit comments

Comments
 (0)