Skip to content

Commit c8d2ec2

Browse files
authoredDec 10, 2019
Merge pull request #28682 from apple/swift52-hooks
Bump runtime to load backward compatibility hacks from __swift52_hooks

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed
 

‎stdlib/public/runtime/CompatibilityOverride.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ using namespace swift;
2727
/// The definition of the contents of the override section.
2828
///
2929
/// The runtime looks in the main executable (not any libraries!) for a
30-
/// __swift51_hooks section and uses the hooks defined therein. This struct
30+
/// __swift52_hooks section and uses the hooks defined therein. This struct
3131
/// defines the layout of that section. These hooks allow extending
3232
/// runtime functionality when running apps built with a more recent
3333
/// compiler. If additional hooks are needed, they may be added at the
@@ -51,9 +51,8 @@ static OverrideSection *getOverrideSectionPtr() {
5151
static swift_once_t Predicate;
5252
swift_once(&Predicate, [](void *) {
5353
size_t Size;
54-
OverrideSectionPtr = static_cast<OverrideSection *>(lookupSection("__DATA",
55-
"__swift51_hooks",
56-
&Size));
54+
OverrideSectionPtr = static_cast<OverrideSection *>(
55+
lookupSection("__DATA", "__swift52_hooks", &Size));
5756
if (Size < sizeof(OverrideSection))
5857
OverrideSectionPtr = nullptr;
5958
}, nullptr);

‎unittests/runtime/CompatibilityOverride.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct OverrideSection {
6060
#include "../../stdlib/public/runtime/CompatibilityOverride.def"
6161
};
6262

63-
OverrideSection Overrides __attribute__((section("__DATA,__swift51_hooks"))) = {
63+
OverrideSection Overrides __attribute__((section("__DATA,__swift52_hooks"))) = {
6464
0,
6565
#define OVERRIDE(name, ret, attrs, ccAttrs, namespace, typedArgs, namedArgs) \
6666
name ## Override,

0 commit comments

Comments
 (0)
Please sign in to comment.