Skip to content

[DNM] [rebranch] Correct nullability of free() redeclaration #35391

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
11 changes: 0 additions & 11 deletions lib/IRGen/GenCall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,14 +490,6 @@ static void addIndirectResultAttributes(IRGenModule &IGM,
b);
}

void IRGenModule::addSwiftAsyncContextAttributes(llvm::AttributeList &attrs,
unsigned argIndex) {
llvm::AttrBuilder b;
b.addAttribute(llvm::Attribute::SwiftAsync);
attrs = attrs.addAttributes(this->getLLVMContext(),
argIndex + llvm::AttributeList::FirstArgIndex, b);
}

void IRGenModule::addSwiftSelfAttributes(llvm::AttributeList &attrs,
unsigned argIndex) {
llvm::AttrBuilder b;
Expand Down Expand Up @@ -1535,9 +1527,6 @@ void SignatureExpansion::expandExternalSignatureTypes() {
switch (FI.getExtParameterInfo(i).getABI()) {
case clang::ParameterABI::Ordinary:
break;
case clang::ParameterABI::SwiftAsyncContext:
IGM.addSwiftAsyncContextAttributes(Attrs, getCurParamIndex());
break;
case clang::ParameterABI::SwiftContext:
IGM.addSwiftSelfAttributes(Attrs, getCurParamIndex());
break;
Expand Down
3 changes: 0 additions & 3 deletions lib/IRGen/IRGenModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -1620,9 +1620,6 @@ private: \
/// Add the swiftself attribute.
void addSwiftSelfAttributes(llvm::AttributeList &attrs, unsigned argIndex);

void addSwiftAsyncContextAttributes(llvm::AttributeList &attrs,
unsigned argIndex);

/// Add the swifterror attribute.
void addSwiftErrorAttributes(llvm::AttributeList &attrs, unsigned argIndex);

Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/SwiftShims/LibcShims.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ __swift_size_t _swift_stdlib_fwrite_stdout(const void *ptr, __swift_size_t size,
// General utilities <stdlib.h>
// Memory management functions
static inline void _swift_stdlib_free(void *_Nullable ptr) {
extern void free(void *);
extern void free(void *_Nullable);
free(ptr);
}

Expand Down