This is an archive of the discontinued LLVM Phabricator instance.

const char* for LLVMTargetMachineEmitToFile's argument
ClosedPublic

Authored by Tachyon on Apr 26 2022, 7:04 AM.

Details

Summary

The LLVMTargetMachineEmitToFile takes a char* Filename right now, but it doesn't modify it.
This is annoying to use in the case where you want to pass a const string, because you either have to remove the const, or copy it somewhere else and pass that. Either way, it's not very nice.

I added a const and clang formatted it. This shouldn't break any ABI in my opinion.
I'm sorry but I didn't know whom to put as reviewer for this, so I chose someone with a lot of commits from the .cpp file.

Diff Detail

Event Timeline

Tachyon created this revision.Apr 26 2022, 7:04 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: hiraditya. · View Herald Transcript
Tachyon requested review of this revision.Apr 26 2022, 7:04 AM

I don't know what I can do about the timeouts. If anyone could tell me, that'd be great.

deadalnix accepted this revision.Apr 30 2022, 2:57 PM
This revision is now accepted and ready to land.Apr 30 2022, 2:57 PM

Thanks for the accept. I don't have commit rights so if you could land it for me with "Andrei Damian <andreidaamian@gmail.com>" that would be great.

I will land this for you, no problem.

This revision was landed with ongoing or failed builds.May 7 2022, 7:41 AM
This revision was automatically updated to reflect the committed changes.