Request for relicensing: InlineBitfield.h

Hello,

Within Swift there exists a file named InlineBitfield.h. It's a small but useful macro setup that I wrote to shrink the size of data structures that use LLVM-style class design. I've wanted to move it to LLVM proper due to the similarities in data structure design, but I've never gotten around to proposing it until now. What do I need to do, if anything, to get it relicensed to the LLVM license?

I'm also asking because someone in the broader programming community wants to use the file for their project. If it were up to me, the file would be in the public domain, but unfortunately, I contributed it to Swift first. Would it be at all possible to put it into the public domain? Or is moving the file to LLVM proper as close as we can get to making it public domain?

Thanks!
Dave

1 Like

IANAL, but the file has

// Licensed under Apache License v2.0 with Runtime Library Exception

And Swift is generally OSS, so my understanding is you can basically do whatever you want with it (outside the minimal constraints of the license).

Hello,

I'd like to use InlineBitfields in my project, but I don't know what's the best way to achieve this and still respect the license.

Say that I change the file, and that it now looks like this, what's the best way to incorporate it in my project? Can I keep this changed version, put it in the same folder as my project's source code (more precisely in my /include/Sora/Common folder), and just say that it's based on Swift's InlineBitfields in the header? Should I just keep the original InlineBitfields file and treat it as a third-party dependency?

Kind regards,
Pierre van Houtryve

You might want to take a look at this overview. Given it's a legal matter I doubt you will get any official "ok" from anyone from the Swift team or Apple.

My, again, not-a-lawyer understanding is what you're doing is likely fine. Some licenses require attribution to the original author. I don't believe Apache 2.0 does, but my preference is to do it anyway when using someone else's code, as a professional courtesy if nothing else.

Okay, thank you very much for your help

Dave, I'm not a lawyer, but I'm pretty sure that if you wrote that code on your own behalf (i.e. not when employed by someone else) then it remains your intellectual property. You've licensed the Swift project to use it under the terms of our license, but you're free to also license other projects to use it under other terms if you like. You can't necessarily just copy what's in our repository, though, because it might have been modified by other people and therefore it isn't solely your intellectual property anymore.

I think it would be highly desirable for code to be freely movable between the Swift and LLVM projects, but I suspect that legally it can't be done without the permission of everyone who has IP in that code.

3 Likes

Thanks John.

I'll just grab what I committed before the it was modified by somebody else and put it into public domain (and hopefully LLVM someday too).

Also, I couldn't remember if there was some kind of click-through copyright assignment for Swift, but I can't find any evidence that Apple has required copyright assignment for Swift. Am I wrong?

Many thanks,
Dave

Yeah, the section on licensing is pretty explicit:

Copyright is held by the authors of the contributions, or the company or organization to which the individual belongs.

1 Like
Terms of Service

Privacy Policy

Cookie Policy