Page MenuHomePhabricator

[llvm-objcopy][NFC] Refactor output target parsing v2
ClosedPublic

Authored by seiya on Jul 3 2019, 4:38 PM.

Details

Summary

Use an enum instead of string to hold the output file format in Config.InputFormat and Config.OutputFormat. It's essential to support other output file formats other than ELF.

This patch originally has been submitted as D63239. However, there was an use-of-uninitialized-value bug and reverted in r364379 (git commit 4ee933c).

This patch includes the fix for the bug by setting Config.InputFormat/Config.OutputFormat in parseStripOptions.

Diff Detail

Repository
rL LLVM

Event Timeline

seiya created this revision.Jul 3 2019, 4:38 PM
seiya edited the summary of this revision. (Show Details)Jul 3 2019, 4:39 PM
seiya edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Jul 4 2019, 1:43 AM
seiya edited the summary of this revision. (Show Details)Jul 4 2019, 2:26 AM
This revision was automatically updated to reflect the committed changes.