File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
src/tools/run-make-support/src Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,22 @@ impl LlvmReadobj {
6161 Self { cmd }
6262 }
6363
64+ /// Specify the format of the ELF information.
65+ ///
66+ /// Valid options are `LLVM` (default), `GNU`, and `JSON`.
67+ pub fn elf_output_style ( & mut self , style : & str ) -> & mut Self {
68+ self . cmd . arg ( "--elf-output-style" ) ;
69+ self . cmd . arg ( style) ;
70+ self
71+ }
72+
73+ /// Set the formation of the ELF information as `GNU`.
74+ ///
75+ /// Convenience function for [`elf_output_style`].
76+ pub fn gnu_elf_style ( & mut self ) -> & mut Self {
77+ self . elf_output_style ( "GNU" )
78+ }
79+
6480 /// Provide an input file.
6581 pub fn input < P : AsRef < Path > > ( & mut self , path : P ) -> & mut Self {
6682 self . cmd . arg ( path. as_ref ( ) ) ;
@@ -72,6 +88,13 @@ impl LlvmReadobj {
7288 self . cmd . arg ( "--file-header" ) ;
7389 self
7490 }
91+
92+ /// Specify the section to display.
93+ pub fn section ( & mut self , section : & str ) -> & mut Self {
94+ self . cmd . arg ( "--string-dump" ) ;
95+ self . cmd . arg ( section) ;
96+ self
97+ }
7598}
7699
77100impl LlvmProfdata {
You can’t perform that action at this time.
0 commit comments