This is an archive of the discontinued LLVM Phabricator instance.

Change namespace llvm::swift to namespace llvm::swiftbinaryformat because of clashes with the apple/llvm-project repository
ClosedPublic

Authored by rastogishubham on Feb 1 2022, 10:33 AM.

Details

Summary

The namespace llvm::swift is causing errors to pop up in the apple//llvm-project build when cherry-picking 4ce1f3d47c33 into apple/llvm-project

/home/buildnode/jenkins/workspace/apple-llvm-project-pr-linux/swift/include/swift/Basic/FlaggedPointer.h:158:28: error: no template named 'FlaggedPointer' in namespace 'llvm::swift'; did you mean '::swift::FlaggedPointer'?
11:55:06 getAsVoidPointer(const swift::FlaggedPointer<PointerTy, BitPosition> &P) {
11:55:06 ^~~~~~~~~~~~~~~~~~~~~
11:55:06 ::swift::FlaggedPointer
11:55:06 /home/buildnode/jenkins/workspace/apple-llvm-project-pr-linux/swift/include/swift/Basic/FlaggedPointer.h:38:7: note: '::swift::FlaggedPointer' declared here
11:55:06 class FlaggedPointer {
11:55:06 ^

Diff Detail

Event Timeline

rastogishubham created this revision.Feb 1 2022, 10:33 AM
rastogishubham requested review of this revision.Feb 1 2022, 10:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2022, 10:33 AM
aprantl added inline comments.Feb 1 2022, 10:39 AM
llvm/include/llvm/BinaryFormat/Swift.h
12

Since the enum starts with Swift, calling the namespace swift... is redundant.
How about just calling the namespace "binaryformat"?

aprantl accepted this revision.Feb 1 2022, 10:40 AM

lgtm with comments addressed

This revision is now accepted and ready to land.Feb 1 2022, 10:40 AM
rastogishubham marked an inline comment as done.Feb 1 2022, 10:40 AM
rastogishubham added inline comments.
llvm/include/llvm/BinaryFormat/Swift.h
12

Sure let me change that

rastogishubham marked an inline comment as done.

Changed name to binaryformat from swiftbinaryformat