Skip to content

Commit 2a33ab5

Browse files
authored
---
yaml --- r: 340923 b: refs/heads/rxwei-patch-1 c: ef96e89 h: refs/heads/master i: 340921: d21729d 340919: dd26165
1 parent 14729ce commit 2a33ab5

File tree

168 files changed

+2455
-1224
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+2455
-1224
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: ebe0e42461659f73e942431cbc76a5483933709d
1018+
refs/heads/rxwei-patch-1: ef96e8904f94f087ea37f2f5de2ce8d5769e9d0a
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,9 +621,9 @@ endif()
621621
if(SWIFT_HOST_VARIANT_ARCH)
622622
set(SWIFT_HOST_VARIANT_ARCH_default "${SWIFT_HOST_VARIANT_ARCH}")
623623
else()
624-
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64")
624+
if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64")
625625
set(SWIFT_HOST_VARIANT_ARCH_default "x86_64")
626-
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
626+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|ARM64")
627627
set(SWIFT_HOST_VARIANT_ARCH_default "aarch64")
628628
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64")
629629
set(SWIFT_HOST_VARIANT_ARCH_default "powerpc64")
@@ -636,8 +636,6 @@ else()
636636
set(SWIFT_HOST_VARIANT_ARCH_default "armv6")
637637
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "armv7l|armv7-a")
638638
set(SWIFT_HOST_VARIANT_ARCH_default "armv7")
639-
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
640-
set(SWIFT_HOST_VARIANT_ARCH_default "x86_64")
641639
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "IA64")
642640
set(SWIFT_HOST_VARIANT_ARCH_default "itanium")
643641
elseif("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "(x86|i686)")
@@ -1084,6 +1082,7 @@ else()
10841082
# ensure we build that when building tools.
10851083
if(SWIFT_INCLUDE_TOOLS)
10861084
add_subdirectory(stdlib/public/Reflection)
1085+
add_subdirectory(stdlib/public/SwiftShims)
10871086
endif()
10881087
endif()
10891088

branches/rxwei-patch-1/cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -63,32 +63,36 @@ macro(swift_common_standalone_build_config_llvm product)
6363
endif()
6464

6565
if(SWIFT_INCLUDE_TOOLS)
66-
if(CMAKE_CROSSCOMPILING)
67-
set(LLVM_NATIVE_BUILD_DIR "${LLVM_BINARY_DIR}/NATIVE")
68-
if(NOT EXISTS "${LLVM_NATIVE_BUILD_DIR}")
69-
message(FATAL_ERROR
70-
"Attempting to cross-compile swift standalone but no native LLVM build
71-
found. Please cross-compile LLVM as well.")
72-
endif()
73-
74-
if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
75-
set(HOST_EXECUTABLE_SUFFIX ".exe")
76-
endif()
77-
78-
if(NOT CMAKE_CONFIGURATION_TYPES)
79-
set(LLVM_TABLEGEN_EXE
80-
"${LLVM_NATIVE_BUILD_DIR}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
81-
else()
82-
# NOTE: LLVM NATIVE build is always built Release, as is specified in
83-
# CrossCompile.cmake
84-
set(LLVM_TABLEGEN_EXE
85-
"${LLVM_NATIVE_BUILD_DIR}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
86-
endif()
66+
if(LLVM_TABLEGEN)
67+
set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN})
8768
else()
88-
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" HINTS ${LLVM_TOOLS_BINARY_DIR}
89-
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
90-
if(LLVM_TABLEGEN_EXE STREQUAL "LLVM_TABLEGEN_EXE-NOTFOUND")
91-
message(FATAL_ERROR "Failed to find tablegen in ${LLVM_TOOLS_BINARY_DIR}")
69+
if(CMAKE_CROSSCOMPILING)
70+
set(LLVM_NATIVE_BUILD_DIR "${LLVM_BINARY_DIR}/NATIVE")
71+
if(NOT EXISTS "${LLVM_NATIVE_BUILD_DIR}")
72+
message(FATAL_ERROR
73+
"Attempting to cross-compile swift standalone but no native LLVM build
74+
found. Please cross-compile LLVM as well.")
75+
endif()
76+
77+
if(CMAKE_HOST_SYSTEM_NAME MATCHES Windows)
78+
set(HOST_EXECUTABLE_SUFFIX ".exe")
79+
endif()
80+
81+
if(NOT CMAKE_CONFIGURATION_TYPES)
82+
set(LLVM_TABLEGEN_EXE
83+
"${LLVM_NATIVE_BUILD_DIR}/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
84+
else()
85+
# NOTE: LLVM NATIVE build is always built Release, as is specified in
86+
# CrossCompile.cmake
87+
set(LLVM_TABLEGEN_EXE
88+
"${LLVM_NATIVE_BUILD_DIR}/Release/bin/llvm-tblgen${HOST_EXECUTABLE_SUFFIX}")
89+
endif()
90+
else()
91+
find_program(LLVM_TABLEGEN_EXE "llvm-tblgen" HINTS ${LLVM_TOOLS_BINARY_DIR}
92+
NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
93+
if(LLVM_TABLEGEN_EXE STREQUAL "LLVM_TABLEGEN_EXE-NOTFOUND")
94+
message(FATAL_ERROR "Failed to find tablegen in ${LLVM_TOOLS_BINARY_DIR}")
95+
endif()
9296
endif()
9397
endif()
9498
endif()

branches/rxwei-patch-1/include/swift/ABI/Class.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ inline ObjCClassFlags operator|(ObjCClassFlags lhs, ObjCClassFlags rhs) {
6565

6666
}
6767

68-
#endif /* SWIFT_ABI_CLASS_H */
68+
#endif // SWIFT_ABI_CLASS_H

branches/rxwei-patch-1/include/swift/ABI/HeapObject.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#ifndef __SWIFT_ABI_HEAPOBJECT_H__
18-
#define __SWIFT_ABI_HEAPOBJECT_H__
17+
#ifndef SWIFT_ABI_HEAPOBJECT_H
18+
#define SWIFT_ABI_HEAPOBJECT_H
1919

2020
#include "../../../stdlib/public/SwiftShims/HeapObject.h"
2121

22-
#endif // __SWIFT_ABI_HEAPOBJECT_H__
22+
#endif // SWIFT_ABI_HEAPOBJECT_H

branches/rxwei-patch-1/include/swift/ABI/KeyPath.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#ifndef __SWIFT_ABI_KEYPATH_H__
18-
#define __SWIFT_ABI_KEYPATH_H__
17+
#ifndef SWIFT_ABI_KEYPATH_H
18+
#define SWIFT_ABI_KEYPATH_H
1919

2020
// We include the basic constants in a shim header so that it can be shared with
2121
// the Swift implementation in the standard library.
@@ -235,4 +235,4 @@ class KeyPathComponentHeader {
235235

236236
}
237237

238-
#endif
238+
#endif // SWIFT_ABI_KEYPATH_H

branches/rxwei-patch-1/include/swift/ABI/Metadata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4442,4 +4442,4 @@ class DynamicReplacementScope
44424442

44434443
#pragma clang diagnostic pop
44444444

4445-
#endif /* SWIFT_ABI_METADATA_H */
4445+
#endif // SWIFT_ABI_METADATA_H

branches/rxwei-patch-1/include/swift/ABI/MetadataValues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1752,4 +1752,4 @@ class IntegerLiteralFlags {
17521752

17531753
} // end namespace swift
17541754

1755-
#endif /* SWIFT_ABI_METADATAVALUES_H */
1755+
#endif // SWIFT_ABI_METADATAVALUES_H

branches/rxwei-patch-1/include/swift/ABI/System.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
//
1515
//===----------------------------------------------------------------------===//
1616

17-
#ifndef __SWIFT_ABI_SYSTEM_H__
18-
#define __SWIFT_ABI_SYSTEM_H__
17+
#ifndef SWIFT_ABI_SYSTEM_H
18+
#define SWIFT_ABI_SYSTEM_H
1919

2020
#include "../../../stdlib/public/SwiftShims/System.h"
2121

22-
#endif // __SWIFT_ABI_SYSTEM_H__
22+
#endif // SWIFT_ABI_SYSTEM_H

branches/rxwei-patch-1/include/swift/ABI/TypeIdentity.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,4 +215,4 @@ class ParsedTypeIdentity {
215215

216216
} // end namespace swift
217217

218-
#endif /* SWIFT_ABI_TYPEIDENTITY_H */
218+
#endif // SWIFT_ABI_TYPEIDENTITY_H

branches/rxwei-patch-1/include/swift/AST/ASTDemangler.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
//
2020
//===----------------------------------------------------------------------===//
2121

22-
#ifndef __SWIFT_AST_ASTDEMANGLER_H__
23-
#define __SWIFT_AST_ASTDEMANGLER_H__
22+
#ifndef SWIFT_AST_ASTDEMANGLER_H
23+
#define SWIFT_AST_ASTDEMANGLER_H
2424

2525
#include "llvm/ADT/ArrayRef.h"
2626
#include "llvm/ADT/StringRef.h"
@@ -185,4 +185,4 @@ class ASTBuilder {
185185

186186
} // namespace swift
187187

188-
#endif // __SWIFT_AST_ASTDEMANGLER_H__
188+
#endif // SWIFT_AST_ASTDEMANGLER_H

branches/rxwei-patch-1/include/swift/AST/ASTMangler.h

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

13-
#ifndef __SWIFT_AST_ASTMANGLER_H__
14-
#define __SWIFT_AST_ASTMANGLER_H__
13+
#ifndef SWIFT_AST_ASTMANGLER_H
14+
#define SWIFT_AST_ASTMANGLER_H
1515

1616
#include "swift/Basic/Mangler.h"
1717
#include "swift/AST/Types.h"
@@ -350,4 +350,4 @@ class ASTMangler : public Mangler {
350350
} // end namespace Mangle
351351
} // end namespace swift
352352

353-
#endif // __SWIFT_AST_ASTMANGLER_H__
353+
#endif // SWIFT_AST_ASTMANGLER_H

branches/rxwei-patch-1/include/swift/AST/ASTPrinter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,6 @@ class ASTPrinter {
286286

287287
/// To sanitize a malformed utf8 string to a well-formed one.
288288
static std::string sanitizeUtf8(StringRef Text);
289-
static ValueDecl* findConformancesWithDocComment(ValueDecl *VD);
290289

291290
private:
292291
virtual void anchor();

branches/rxwei-patch-1/include/swift/AST/ASTTypeIDs.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ class Type;
3838

3939
} // end namespace swift
4040

41-
#endif /* SWIFT_AST_ASTTYPEIDS_H */
41+
#endif // SWIFT_AST_ASTTYPEIDS_H

branches/rxwei-patch-1/include/swift/AST/Comment.h

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,26 @@
1818

1919
namespace swift {
2020
class Decl;
21-
class DocComment;
21+
class TypeDecl;
2222
struct RawComment;
2323

2424
class DocComment {
2525
const Decl *D;
26-
const swift::markup::Document *Doc = nullptr;
27-
const swift::markup::CommentParts Parts;
26+
swift::markup::Document *Doc = nullptr;
27+
swift::markup::CommentParts Parts;
2828

29-
public:
3029
DocComment(const Decl *D, swift::markup::Document *Doc,
3130
swift::markup::CommentParts Parts)
3231
: D(D), Doc(Doc), Parts(Parts) {}
3332

33+
public:
34+
static DocComment *create(const Decl *D, swift::markup::MarkupContext &MC,
35+
RawComment RC);
36+
37+
void addInheritanceNote(swift::markup::MarkupContext &MC, TypeDecl *base);
38+
3439
const Decl *getDecl() const { return D; }
40+
void setDecl(const Decl *D) { this->D = D; }
3541

3642
const swift::markup::Document *getDocument() const { return Doc; }
3743

@@ -87,19 +93,23 @@ class DocComment {
8793
};
8894

8995
/// Get a parsed documentation comment for the declaration, if there is one.
90-
Optional<DocComment *>getSingleDocComment(swift::markup::MarkupContext &Context,
91-
const Decl *D);
96+
DocComment *getSingleDocComment(swift::markup::MarkupContext &Context,
97+
const Decl *D);
98+
99+
const Decl *getDocCommentProvidingDecl(const Decl *D);
92100

93101
/// Attempt to get a doc comment from the declaration, or other inherited
94102
/// sources, like from base classes or protocols.
95-
Optional<DocComment *> getCascadingDocComment(swift::markup::MarkupContext &MC,
96-
const Decl *D);
103+
DocComment *getCascadingDocComment(swift::markup::MarkupContext &MC,
104+
const Decl *D);
97105

98106
/// Extract comments parts from the given Markup node.
99107
swift::markup::CommentParts
100108
extractCommentParts(swift::markup::MarkupContext &MC,
101109
swift::markup::MarkupASTNode *Node);
110+
111+
/// Extract brief comment from \p RC, and print it to \p OS .
112+
void printBriefComment(RawComment RC, llvm::raw_ostream &OS);
102113
} // namespace swift
103114

104115
#endif // LLVM_SWIFT_AST_COMMENT_H
105-

0 commit comments

Comments
 (0)