Skip to content

Commit 6c164f6

Browse files
committed
RequirementMachine: Move files to a new subdirectory under lib/AST/
Also move a all headers other than RequirementMachine.h there, since I don't expect they will be used outside of the rewrite system implementation itself.
1 parent ee1fe08 commit 6c164f6

File tree

7 files changed

+16
-12
lines changed

7 files changed

+16
-12
lines changed

lib/AST/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ add_swift_host_library(swiftAST STATIC
7171
PlatformKind.cpp
7272
PrettyStackTrace.cpp
7373
ProtocolConformance.cpp
74-
ProtocolGraph.cpp
7574
RawComment.cpp
7675
RequirementEnvironment.cpp
77-
RequirementMachine.cpp
78-
RewriteSystem.cpp
79-
RewriteSystemCompletion.cpp
76+
RequirementMachine/ProtocolGraph.cpp
77+
RequirementMachine/RequirementMachine.cpp
78+
RequirementMachine/RewriteSystem.cpp
79+
RequirementMachine/RewriteSystemCompletion.cpp
8080
SILLayout.cpp
8181
Stmt.cpp
8282
SubstitutionMap.cpp

lib/AST/ProtocolGraph.cpp renamed to lib/AST/RequirementMachine/ProtocolGraph.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "swift/AST/ProtocolGraph.h"
13+
#include "ProtocolGraph.h"
1414

1515
#include "swift/AST/Decl.h"
1616
#include "swift/AST/Requirement.h"
@@ -211,4 +211,4 @@ bool ProtocolGraph::inheritsFrom(const ProtocolDecl *thisProto,
211211
return std::find(info.AllInherited.begin(),
212212
info.AllInherited.end(),
213213
otherProto) != info.AllInherited.end();
214-
}
214+
}

lib/AST/RequirementMachine.cpp renamed to lib/AST/RequirementMachine/RequirementMachine.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@
1515
#include "swift/AST/Decl.h"
1616
#include "swift/AST/GenericSignature.h"
1717
#include "swift/AST/PrettyStackTrace.h"
18-
#include "swift/AST/ProtocolGraph.h"
1918
#include "swift/AST/Requirement.h"
20-
#include "swift/AST/RewriteSystem.h"
2119
#include "llvm/ADT/DenseSet.h"
2220
#include "llvm/ADT/TinyPtrVector.h"
2321
#include <vector>
2422

23+
#include "ProtocolGraph.h"
24+
#include "RewriteSystem.h"
25+
2526
using namespace swift;
2627
using namespace rewriting;
2728

@@ -303,4 +304,4 @@ void RequirementMachine::markComplete() {
303304
}
304305
assert(!Impl->Complete);
305306
Impl->Complete = true;
306-
}
307+
}

lib/AST/RewriteSystem.cpp renamed to lib/AST/RequirementMachine/RewriteSystem.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#include "swift/AST/RewriteSystem.h"
1413
#include "llvm/ADT/FoldingSet.h"
1514
#include "llvm/Support/raw_ostream.h"
1615
#include <algorithm>
1716
#include <vector>
1817

18+
#include "RewriteSystem.h"
19+
1920
using namespace swift;
2021
using namespace rewriting;
2122

include/swift/AST/RewriteSystem.h renamed to lib/AST/RequirementMachine/RewriteSystem.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include "swift/AST/Decl.h"
1818
#include "swift/AST/Identifier.h"
1919
#include "swift/AST/LayoutConstraint.h"
20-
#include "swift/AST/ProtocolGraph.h"
2120
#include "swift/AST/Types.h"
2221
#include "swift/Basic/Statistic.h"
2322
#include "llvm/ADT/FoldingSet.h"
@@ -28,6 +27,8 @@
2827
#include "llvm/Support/TrailingObjects.h"
2928
#include <algorithm>
3029

30+
#include "ProtocolGraph.h"
31+
3132
namespace llvm {
3233
class raw_ostream;
3334
}

lib/AST/RewriteSystemCompletion.cpp renamed to lib/AST/RequirementMachine/RewriteSystemCompletion.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
//
2626
//===----------------------------------------------------------------------===//
2727

28-
#include "swift/AST/RewriteSystem.h"
2928
#include "swift/Basic/Defer.h"
3029
#include "llvm/ADT/FoldingSet.h"
3130
#include "llvm/Support/raw_ostream.h"
3231
#include <algorithm>
3332
#include <deque>
3433
#include <vector>
3534

35+
#include "RewriteSystem.h"
36+
3637
using namespace swift;
3738
using namespace rewriting;
3839

0 commit comments

Comments
 (0)