Skip to content

Commit 365efc2

Browse files
Merge pull request #3699 from swiftwasm/katei/merge-main-2021-10-13
2 parents bd09616 + c64e749 commit 365efc2

File tree

298 files changed

+2064
-1515
lines changed

Some content is hidden

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

298 files changed

+2064
-1515
lines changed

benchmark/scripts/compare_perf_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

44
# ===--- compare_perf_tests.py -------------------------------------------===//

benchmark/scripts/test_Benchmark_Driver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

44
# ===--- test_Benchmark_Driver.py ----------------------------------------===//

benchmark/scripts/test_compare_perf_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

44
# ===--- test_compare_perf_tests.py --------------------------------------===//

benchmark/scripts/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/python
1+
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

44
# ===--- test_utils.py ---------------------------------------------------===//

include/swift/AST/ASTWalker.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#ifndef SWIFT_AST_ASTWALKER_H
1414
#define SWIFT_AST_ASTWALKER_H
1515

16+
#include "llvm/ADT/Optional.h"
1617
#include "llvm/ADT/PointerUnion.h"
1718
#include <utility>
1819

include/swift/AST/DiagnosticsFrontend.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ ERROR(error_mode_cannot_emit_symbol_graph,none,
131131
"this mode does not support emitting symbol graph files", ())
132132
ERROR(error_mode_cannot_emit_abi_descriptor,none,
133133
"this mode does not support emitting ABI descriptor", ())
134+
ERROR(error_mode_cannot_emit_module_semantic_info,none,
135+
"this mode does not support emitting module semantic info", ())
134136
ERROR(cannot_emit_ir_skipping_function_bodies,none,
135137
"the -experimental-skip-*-function-bodies* flags do not support "
136138
"emitting IR", ())

include/swift/AST/DiagnosticsParse.def

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ ERROR(sil_invalid_column_in_sil_location,none,
528528
"column number must be a positive integer", ())
529529
ERROR(sil_invalid_scope_slot,none,
530530
"scope number must be a positive integer ", ())
531+
ERROR(sil_invalid_constant,none,
532+
"constant operand must be an integer literal ", ())
531533
ERROR(sil_scope_undeclared,none,
532534
"scope number %0 needs to be declared before first use", (unsigned))
533535
ERROR(sil_scope_redefined,none,

include/swift/AST/Expr.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@
1919

2020
#include "swift/AST/ArgumentList.h"
2121
#include "swift/AST/Attr.h"
22+
#include "swift/AST/Availability.h"
2223
#include "swift/AST/CaptureInfo.h"
2324
#include "swift/AST/ConcreteDeclRef.h"
25+
#include "swift/AST/Decl.h"
2426
#include "swift/AST/DeclContext.h"
2527
#include "swift/AST/DeclNameLoc.h"
2628
#include "swift/AST/FunctionRefKind.h"
2729
#include "swift/AST/ProtocolConformanceRef.h"
2830
#include "swift/AST/TypeAlignments.h"
29-
#include "swift/AST/Availability.h"
3031
#include "swift/Basic/Debug.h"
3132
#include "swift/Basic/InlineBitfield.h"
3233
#include "llvm/Support/TrailingObjects.h"
@@ -1453,6 +1454,8 @@ class OverloadedDeclRefExpr final : public OverloadSetRefExpr {
14531454
SourceLoc getLoc() const { return Loc.getBaseNameLoc(); }
14541455
SourceRange getSourceRange() const { return Loc.getSourceRange(); }
14551456

1457+
bool isForOperator() const { return getDecls().front()->isOperator(); }
1458+
14561459
static bool classof(const Expr *E) {
14571460
return E->getKind() == ExprKind::OverloadedDeclRef;
14581461
}

include/swift/AST/Identifier.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "swift/Basic/EditorPlaceholder.h"
2121
#include "swift/Basic/Debug.h"
2222
#include "swift/Basic/LLVM.h"
23+
#include "llvm/ADT/ArrayRef.h"
2324
#include "llvm/ADT/FoldingSet.h"
2425
#include "llvm/ADT/PointerUnion.h"
2526
#include "llvm/Support/TrailingObjects.h"

include/swift/AST/Module.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ class ModuleDecl
257257

258258
AccessNotesFile accessNotes;
259259

260+
/// Used by the debugger to bypass resilient access to fields.
261+
bool BypassResilience = false;
262+
260263
ModuleDecl(Identifier name, ASTContext &ctx, ImplicitImportInfo importInfo);
261264

262265
public:
@@ -290,6 +293,12 @@ class ModuleDecl
290293
AccessNotesFile &getAccessNotes() { return accessNotes; }
291294
const AccessNotesFile &getAccessNotes() const { return accessNotes; }
292295

296+
/// Return whether the module was imported with resilience disabled. The
297+
/// debugger does this to access private fields.
298+
bool getBypassResilience() const { return BypassResilience; }
299+
/// Only to be called by MemoryBufferSerializedModuleLoader.
300+
void setBypassResilience() { BypassResilience = true; }
301+
293302
ArrayRef<FileUnit *> getFiles() {
294303
assert(!Files.empty() || failedToLoad());
295304
return Files;

0 commit comments

Comments
 (0)