Skip to content

[rebranch][Runtime] Remove attribute ordering hack #62497

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions include/swift/Runtime/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,6 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
// Bring in visibility attribute macros
#include "swift/shims/Visibility.h"

// Temporary definitions to allow compilation on clang-15.
#if defined(__cplusplus)
#define SWIFT_EXTERN_C extern "C"
#else
#define SWIFT_EXTERN_C
#endif
#define SWIFT_RUNTIME_EXPORT_ATTRIBUTE SWIFT_EXPORT_FROM_ATTRIBUTE(swiftCore)

// Define mappings for calling conventions.

// Annotation for specifying a calling convention of
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Runtime/Heap.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace swift {
// Never returns nil. The returned memory is uninitialized.
//
// An "alignment mask" is just the alignment (a power of 2) minus 1.
SWIFT_EXTERN_C SWIFT_RETURNS_NONNULL SWIFT_NODISCARD SWIFT_RUNTIME_EXPORT_ATTRIBUTE
SWIFT_RUNTIME_EXPORT SWIFT_RETURNS_NONNULL SWIFT_NODISCARD
void *swift_slowAlloc(size_t bytes, size_t alignMask);

// If the caller cannot promise to zero the object during destruction,
Expand Down
4 changes: 2 additions & 2 deletions include/swift/Runtime/HeapObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ struct OpaqueValue;
///
/// POSSIBILITIES: The argument order is fair game. It may be useful
/// to have a variant which guarantees zero-initialized memory.
SWIFT_EXTERN_C SWIFT_RETURNS_NONNULL SWIFT_NODISCARD SWIFT_RUNTIME_EXPORT_ATTRIBUTE
SWIFT_RUNTIME_EXPORT SWIFT_RETURNS_NONNULL SWIFT_NODISCARD
HeapObject *swift_allocObject(HeapMetadata const *metadata,
size_t requiredSize,
size_t requiredAlignmentMask);
Expand Down Expand Up @@ -117,7 +117,7 @@ BoxPair swift_makeBoxUnique(OpaqueValue *buffer, Metadata const *type,
size_t alignMask);

/// Returns the address of a heap object representing all empty box types.
SWIFT_EXTERN_C SWIFT_RETURNS_NONNULL SWIFT_NODISCARD SWIFT_RUNTIME_EXPORT_ATTRIBUTE
SWIFT_RUNTIME_EXPORT SWIFT_RETURNS_NONNULL SWIFT_NODISCARD
HeapObject* swift_allocEmptyBox();

/// Atomically increments the retain count of an object.
Expand Down
4 changes: 2 additions & 2 deletions include/swift/Runtime/Metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ swift_getGenericMetadata(MetadataRequest request,
/// - installing new v-table entries and overrides; and
/// - registering the class with the runtime under ObjC interop.
/// Most of this work can be achieved by calling swift_initClassMetadata.
SWIFT_EXTERN_C SWIFT_RETURNS_NONNULL SWIFT_NODISCARD SWIFT_RUNTIME_EXPORT_ATTRIBUTE
SWIFT_RUNTIME_EXPORT SWIFT_RETURNS_NONNULL SWIFT_NODISCARD
ClassMetadata *
swift_allocateGenericClassMetadata(const ClassDescriptor *description,
const void *arguments,
Expand All @@ -322,7 +322,7 @@ swift_allocateGenericClassMetadata(const ClassDescriptor *description,
/// Allocate a generic value metadata object. This is intended to be
/// called by the metadata instantiation function of a generic struct or
/// enum.
SWIFT_EXTERN_C SWIFT_RETURNS_NONNULL SWIFT_NODISCARD SWIFT_RUNTIME_EXPORT_ATTRIBUTE
SWIFT_RUNTIME_EXPORT SWIFT_RETURNS_NONNULL SWIFT_NODISCARD
ValueMetadata *
swift_allocateGenericValueMetadata(const ValueTypeDescriptor *description,
const void *arguments,
Expand Down
1 change: 0 additions & 1 deletion lib/IRGen/GenDecl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "swift/ClangImporter/ClangModule.h"
#include "swift/Demangling/ManglingMacros.h"
#include "swift/IRGen/Linking.h"
#include "swift/Runtime/HeapObject.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this meant to be rebranch only? Seems like this can go on main as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can put it on main if you want, I was just going to leave it until the rebranch is merged.

#include "swift/SIL/FormalLinkage.h"
#include "swift/SIL/SILDebugScope.h"
#include "swift/SIL/SILModule.h"
Expand Down
4 changes: 4 additions & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,10 @@ mixin-preset=
mixin_lightweight_assertions,no-stdlib-asserts
buildbot_linux_base

verbose
extra-cmake-options=
--trace-expand

[preset: buildbot_linux,no_assertions]
mixin-preset=buildbot_linux_base

Expand Down