Bug 198977 - [sparse-llvm] Add option to save output to a named file
Summary: [sparse-llvm] Add option to save output to a named file
Status: CLOSED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: Sparse (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: Tools-Sparse Virtual Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-03 01:36 UTC by Dibyendu Majumdar
Modified: 2018-12-25 12:14 UTC (History)
2 users (show)

See Also:
Kernel Version: N/A
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Dibyendu Majumdar 2018-03-03 01:36:02 UTC
Currently Sparse-LLVM outputs the generated LLVM bitcode file to stdout. While this works, it means that a) users cannot just run sparse-llvm and get any meaningful help on stdout - instead you get lot of gibberish, and b) it is somewhat unusual behaviour for a 'compiler'. 

I suggest adding a -o option to output to a named file. Additionally keeping with most compiler behaviour, if no option is specified, create 'out.bc' file instead of writing to stdout.

I can submit patches for this if there is agreement on the approach. Please give feedback or let me know if you approve / disapprove.
Comment 1 Randy Dunlap 2018-03-07 17:44:32 UTC
Sounds like a good improvement to me.

Note You need to log in before you can comment on or make changes to this bug.