This is an archive of the discontinued LLVM Phabricator instance.

[LTO] Use StringRef instead of C-style strings in setCodeGenDebugOptions
ClosedPublic

Authored by chill on Jun 17 2020, 11:03 AM.

Details

Summary

Fixes an issue with missing nul-terminators and saves us some
string copying, compared to a version which would insert nul-terminators.

Diff Detail

Event Timeline

chill created this revision.Jun 17 2020, 11:03 AM

Would it be cleaner to make setCodeGenDebugOptions take an ArrayRef<StringRef>?

Yeah, I'd prefer that, but then I'm hesitant to change APIs.

chill updated this revision to Diff 271992.Jun 19 2020, 3:37 AM
chill retitled this revision from [LTO] Nul-terminate options passed to LLVM to [LTO] Use StringRef instead of C-style strings in setCodeGenDebugOptions.
chill edited the summary of this revision. (Show Details)
thegameg accepted this revision.Jun 19 2020, 9:00 AM

LGTM, thanks.

This revision is now accepted and ready to land.Jun 19 2020, 9:00 AM
This revision was automatically updated to reflect the committed changes.