Skip to content

Commit a9297ee

Browse files
committed
Rename llvm::markup namespace to swift::markup
This was naming was cargoed from long ago and this functionality isn't directly related to LLVM, it's specific to Swift.
1 parent 5eb479a commit a9297ee

17 files changed

+148
-149
lines changed

Diff for: include/swift/AST/Comment.h

+15-15
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ struct RawComment;
2424
class DocComment {
2525
public:
2626
struct CommentParts {
27-
Optional<const llvm::markup::Paragraph *>Brief;
28-
ArrayRef<const llvm::markup::MarkupASTNode *> BodyNodes;
29-
ArrayRef<const llvm::markup::ParamField *> ParamFields;
30-
Optional<const llvm::markup::ReturnsField *> ReturnsField;
31-
Optional<const llvm::markup::ThrowsField *> ThrowsField;
27+
Optional<const swift::markup::Paragraph *>Brief;
28+
ArrayRef<const swift::markup::MarkupASTNode *> BodyNodes;
29+
ArrayRef<const swift::markup::ParamField *> ParamFields;
30+
Optional<const swift::markup::ReturnsField *> ReturnsField;
31+
Optional<const swift::markup::ThrowsField *> ThrowsField;
3232

3333
bool isEmpty() const {
3434
return !Brief.hasValue() && !ReturnsField.hasValue() && !ThrowsField.hasValue() && BodyNodes.empty() && ParamFields.empty();
@@ -37,39 +37,39 @@ class DocComment {
3737

3838
private:
3939
const Decl *D;
40-
const llvm::markup::Document *Doc = nullptr;
40+
const swift::markup::Document *Doc = nullptr;
4141
const CommentParts Parts;
4242

4343
public:
44-
DocComment(const Decl *D, llvm::markup::Document *Doc,
44+
DocComment(const Decl *D, swift::markup::Document *Doc,
4545
CommentParts Parts)
4646
: D(D), Doc(Doc), Parts(Parts) {}
4747

4848
const Decl *getDecl() const { return D; }
4949

50-
const llvm::markup::Document *getDocument() const { return Doc; }
50+
const swift::markup::Document *getDocument() const { return Doc; }
5151

5252
CommentParts getParts() const {
5353
return Parts;
5454
}
5555

56-
Optional<const llvm::markup::Paragraph *> getBrief() const {
56+
Optional<const swift::markup::Paragraph *> getBrief() const {
5757
return Parts.Brief;
5858
}
5959

60-
Optional<const llvm::markup::ReturnsField * >getReturnsField() const {
60+
Optional<const swift::markup::ReturnsField * >getReturnsField() const {
6161
return Parts.ReturnsField;
6262
}
6363

64-
Optional<const llvm::markup::ThrowsField*> getThrowsField() const {
64+
Optional<const swift::markup::ThrowsField*> getThrowsField() const {
6565
return Parts.ThrowsField;
6666
}
6767

68-
ArrayRef<const llvm::markup::ParamField *> getParamFields() const {
68+
ArrayRef<const swift::markup::ParamField *> getParamFields() const {
6969
return Parts.ParamFields;
7070
}
7171

72-
ArrayRef<const llvm::markup::MarkupASTNode *> getBodyNodes() const {
72+
ArrayRef<const swift::markup::MarkupASTNode *> getBodyNodes() const {
7373
return Parts.BodyNodes;
7474
}
7575

@@ -79,7 +79,7 @@ class DocComment {
7979

8080
// Only allow allocation using the allocator in MarkupContext or by
8181
// placement new.
82-
void *operator new(size_t Bytes, llvm::markup::MarkupContext &MC,
82+
void *operator new(size_t Bytes, swift::markup::MarkupContext &MC,
8383
unsigned Alignment = alignof(DocComment));
8484
void *operator new(size_t Bytes, void *Mem) {
8585
assert(Mem);
@@ -91,7 +91,7 @@ class DocComment {
9191
void operator delete(void *Data) = delete;
9292
};
9393

94-
Optional<DocComment *>getDocComment(llvm::markup::MarkupContext &Context,
94+
Optional<DocComment *>getDocComment(swift::markup::MarkupContext &Context,
9595
const Decl *D);
9696

9797
} // namespace swift

Diff for: include/swift/Markup/AST.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
//
13-
#ifndef LLVM_MARKUP_AST_H
14-
#define LLVM_MARKUP_AST_H
13+
#ifndef SWIFT_MARKUP_AST_H
14+
#define SWIFT_MARKUP_AST_H
1515

1616
#include "swift/Markup/LineList.h"
1717
#include "llvm/ADT/Optional.h"
1818
#include "llvm/Support/ErrorHandling.h"
1919
#include "llvm/Support/TrailingObjects.h"
2020

21-
namespace llvm {
21+
namespace swift {
2222
namespace markup {
2323

2424
class MarkupContext;
@@ -682,6 +682,6 @@ void dump(const MarkupASTNode *Node, llvm::raw_ostream &OS, unsigned indent = 0)
682682
void printInlinesUnder(const MarkupASTNode *Node, llvm::raw_ostream &OS,
683683
bool PrintDecorators = false);
684684
} // namespace markup
685-
} // namespace llvm
685+
} // namespace swift
686686

687-
#endif // LLVM_MARKUP_AST_H
687+
#endif // SWIFT_MARKUP_AST_H

Diff for: include/swift/Markup/LineList.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef LLVM_MARKUP_LINELIST_H
14-
#define LLVM_MARKUP_LINELIST_H
13+
#ifndef SWIFT_MARKUP_LINELIST_H
14+
#define SWIFT_MARKUP_LINELIST_H
1515

1616
#include "llvm/ADT/ArrayRef.h"
1717
#include "llvm/ADT/StringRef.h"
1818
#include "swift/Basic/SourceLoc.h"
1919

20-
namespace llvm {
20+
namespace swift {
2121
namespace markup {
2222

2323
class MarkupContext;
@@ -76,6 +76,6 @@ class LineListBuilder {
7676
};
7777

7878
} // namespace markup
79-
} // namespace llvm
79+
} // namespace swift
8080

81-
#endif // LLVM_MARKUP_LINELIST_H
81+
#endif // SWIFT_MARKUP_LINELIST_H

Diff for: include/swift/Markup/Markup.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef LLVM_MARKUP_MARKUP_H
14-
#define LLVM_MARKUP_MARKUP_H
13+
#ifndef SWIFT_MARKUP_MARKUP_H
14+
#define SWIFT_MARKUP_MARKUP_H
1515

1616
#include "llvm/ADT/ArrayRef.h"
1717
#include "llvm/Support/Allocator.h"
@@ -20,12 +20,10 @@
2020
#include "swift/Markup/AST.h"
2121
#include "swift/Markup/LineList.h"
2222

23-
2423
namespace swift {
25-
struct RawComment;
26-
}
2724

28-
namespace llvm {
25+
struct RawComment;
26+
2927
namespace markup {
3028

3129
class LineList;
@@ -65,6 +63,6 @@ class MarkupContext final {
6563
Document *parseDocument(MarkupContext &MC, LineList &LL);
6664

6765
} // namespace markup
68-
} // namespace llvm
66+
} // namespace swift
6967

70-
#endif // LLVM_MARKUP_MARKUP_H
68+
#endif // SWIFT_MARKUP_MARKUP_H

Diff for: include/swift/Markup/SourceLoc.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
//===----------------------------------------------------------------------===//
1212

1313

14-
#ifndef LLVM_REST_SOURCELOC_H
15-
#define LLVM_REST_SOURCELOC_H
14+
#ifndef SWIFT_MARKUP_SOURCELOC_H
15+
#define SWIFT_MARKUP_SOURCELOC_H
1616

1717
#include "llvm/ADT/StringRef.h"
1818
#include <algorithm>
1919
#include <cassert>
2020
#include <utility>
2121
#include <vector>
2222

23-
namespace llvm {
23+
namespace swift {
2424
namespace markup {
2525

2626
class SourceLoc {
@@ -147,7 +147,7 @@ SourceManager<ExternalSourceLocTy>::toExternalSourceLoc(SourceLoc Loc) const {
147147
}
148148

149149
} // namespace markup
150-
} // namespace llvm
150+
} // namespace swift
151151

152-
#endif // LLVM_REST_SOURCELOC_H
152+
#endif // SWIFT_MARKUP_SOURCELOC_H
153153

Diff for: include/swift/Markup/XMLUtils.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212

13-
#ifndef LLVM_MARKUP_XML_UTILS_H
14-
#define LLVM_MARKUP_XML_UTILS_H
13+
#ifndef SWIFT_MARKUP_XML_UTILS_H
14+
#define SWIFT_MARKUP_XML_UTILS_H
1515

1616
#include "llvm/ADT/StringRef.h"
1717
#include "llvm/Support/raw_ostream.h"
1818

19-
namespace llvm {
19+
namespace swift {
2020
namespace markup {
2121

2222
// FIXME: copied from Clang's
@@ -71,7 +71,7 @@ static inline void appendWithCDATAEscaping(raw_ostream &OS, StringRef S) {
7171
}
7272

7373
} // namespace markup
74-
} // namespace llvm
74+
} // namespace swift
7575

76-
#endif // LLVM_MARKUP_XML_UTILS_H
76+
#endif // SWIFT_MARKUP_XML_UTILS_H
7777

0 commit comments

Comments
 (0)