Skip to content

Move interleave(...) to the llvm namespace #31091

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

Merged
merged 1 commit into from
Apr 17, 2020
Merged

Move interleave(...) to the llvm namespace #31091

merged 1 commit into from
Apr 17, 2020

Conversation

MForster
Copy link
Contributor

This is for fixing the master-next build. Making this change on the master branch keeps the diff on master-next small. See also pull requests #31089 and #31090.

Unfortunately this leads to quite a bit of reformatting. I've used clang-format in the places where horizontal alignment broke. There are no syntactic changes at the call sites other than adding llvm::.

This simplifies fixing the master-next build. Upstream LLVM already
has a copy of this function, so on master-next we only need to delete
the Swift copy, reducing the potential for merge conflicts.
@gribozavr
Copy link
Contributor

@swift-ci Please test

@MForster
Copy link
Contributor Author

MForster commented Apr 17, 2020

Here is a diff that contains the additional change that will be needed: for master-next: master-next...MForster:llvm-interleave-master-next. I'm not submitting this as a pull request yet, because I'm unsure how well GitHub works with dependent pull requests.

@MForster
Copy link
Contributor Author

The test failure on the Windows build bot is not related to this pull request. The machine is running out of disk space.

@gribozavr gribozavr merged commit 843a584 into swiftlang:master Apr 17, 2020
@MForster MForster deleted the llvm-interleave branch April 17, 2020 14:51
@eeckstein
Copy link
Contributor

@MForster When I tried to build master-next locally I found that this change is causing build failures, because now two interleave functions are in the llvm namespace:

/Users/erik/proj/main-swift/swift/lib/Demangling/NodePrinter.cpp:710:5: error: call to 'interleave' is ambiguous
    llvm::interleave(
    ^~~~~~~~~~~~~~~~
/Users/erik/proj/main-swift/llvm-project/llvm/include/llvm/ADT/STLExtras.h:1700:13: note: candidate function [with ForwardIterator = swift::Demangle::Node *const *, UnaryFunctor = (lambda at /Users/erik/proj/main-swift/swift/lib/Demangling/NodePrinter.cpp:712:9), NullaryFunctor = (lambda at /Users/erik/proj/main-swift/swift/lib/Demangling/NodePrinter.cpp:732:9), $3 = void]
inline void interleave(ForwardIterator begin, ForwardIterator end,
            ^
/Users/erik/proj/main-swift/swift/include/swift/Basic/STLExtras.h:90:13: note: candidate function [with ForwardIterator = swift::Demangle::Node *const *, UnaryFunctor = (lambda at /Users/erik/proj/main-swift/swift/lib/Demangling/NodePrinter.cpp:712:9), NullaryFunctor = (lambda at /Users/erik/proj/main-swift/swift/lib/Demangling/NodePrinter.cpp:732:9)]
inline void interleave(ForwardIterator begin, ForwardIterator end,
            ^
1 error generated.

@MForster
Copy link
Contributor Author

There is a corresponding change on master-next that removes the copy: #31090 7b34593.

@eeckstein
Copy link
Contributor

I see. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants