11055 Commits

Author SHA1 Message Date
Fangrui Song
de4cabecba [yaml2obj] Rename SHOffset (e_shoff) field to SHOff. NFC
`struct Elf*_Shdr` has a field `sh_offset`, named `ShOffset` in
llvm::ELFYAML::Section. Rename SHOffset (e_shoff) to SHOff to prevent confusion.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D67254

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371185 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 09:23:17 +00:00
Fangrui Song
9af852afd5 [llvm-readobj][yaml2obj] Support SHT_LLVM_SYMPART, SHT_LLVM_PART_EHDR and SHT_LLVM_PART_PHDR
See http://lists.llvm.org/pipermail/llvm-dev/2019-February/130583.html
and D60242 for the lld partition feature.

This patch:

* Teaches yaml2obj to parse the 3 section types.
* Teaches llvm-readobj/llvm-readelf to dump the 3 section types.

There is no test for SHT_LLVM_DEPENDENT_LIBRARIES in llvm-readobj. Add
it as well.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D67228

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371157 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-06 00:53:28 +00:00
George Rimar
5cae5103d0 [llvm-readelf] - Allow dumping dynamic symbols when there is no program headers.
D62179 introduced a regression. llvm-readelf lose the ability to dump the dynamic symbols
when there is .dynamic section with a DT_SYMTAB, but there are no program headers:
https://reviews.llvm.org/D62179#1652778

Below is a program flow before the D62179 change:

1) Find SHT_DYNSYM.
2) Find there is no PT_DYNAMIC => don't try to parse it.
3) Print dynamic symbols using information about them found on step (1).

And after the change it became:

1) Find SHT_DYNSYM.
2) Find there is no PT_DYNAMIC => find SHT_DYNAMIC.
3) Parse dynamic table, but fail to handle the DT_SYMTAB because of the absence of the PT_LOAD. Report the "Virtual address is not in any segment" error.

This patch fixes the issue. For doing this it checks that the value of DT_SYMTAB was
mapped to a segment. If not - it ignores it.

Differential revision: https://reviews.llvm.org/D67078

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371071 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-05 14:02:58 +00:00
Lang Hames
72fff241b6 [llvm-rtdyld][llvm-jitlink] Rename struct member to remove ambiguity.
This ambiguity (struct member name matching struct name) was causing errors on
a few of the MSVC bots. Hopefully this should fix it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370969 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 20:26:26 +00:00
Lang Hames
7cb1eef902 [llvm-rtdyld] Add timers to match llvm-jitlink.
When using llvm-rtdyld to execute code, -show-times will now show the time
taken to load the object files, apply relocations, and execute the
rtdyld-linked code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370968 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 20:26:25 +00:00
Lang Hames
d196ef224c [JITLink] Fix the show-timers option on llvm-jitlink.
No longer constantly shows times (even when -show-times=false). When shown,
times are now correctly grouped.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370951 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 18:38:29 +00:00
Simon Pilgrim
43264f371c Fix "enumeral and non-enumeral type in conditional expression" warnings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370892 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 12:51:40 +00:00
Djordje Todorovic
6e914add2f [llvm-dwarfdump] Fix spelling in the comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370861 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 09:44:09 +00:00
Fangrui Song
8a4d16ddae [llvm-objcopy] Add objcopy:🧝:Object::allocSections to simplify loops on SHF_ALLOC sections
Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D67142

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370860 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 09:35:32 +00:00
Fangrui Song
d9c0638dc3 [llvm-objcopy] Rename variable names "Section" to "Sec". NFC
"Section" can refer to the type llvm::objcopy:🧝:Section or the
variable name. Rename it to "Sec" for clarity. "Sec" is already used a
lot, so this change improves consistency as well.

Also change `auto` to `const SectionBase` for readability.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D67143

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370852 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 08:43:27 +00:00
Fangrui Song
f579401e48 [llvm-objcopy] Fix some identifier names in comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370838 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-04 03:54:43 +00:00
Vedant Kumar
aafa6f8385 [llvm-profdata] Add mode to recover from profile read failures
Add a mode in which profile read errors are not immediately treated as
fatal. In this mode, merging makes forward progress and reports failure
only if no inputs can be read.

Differential Revision: https://reviews.llvm.org/D66985

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370827 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-03 22:23:16 +00:00
Fangrui Song
23c2080a14 [llvm-objcopy] Simplify alignToAddr with llvm::alignTo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370577 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-31 10:48:09 +00:00
Wei Mi
75b02da89f Fix some errors introduced by rL370563 which were not exposed on my local machine.
1. zlib::compress accept &size_t but the param is an uint64_t.
2. Some systems don't have zlib installed. Don't use compression by default.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370564 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-31 03:17:49 +00:00
Wei Mi
5f1543dfbd [SampleFDO] Add profile symbol list section to discriminate function being
cold versus function being newly added.

This is the second half of https://reviews.llvm.org/D66374.

Profile symbol list is the collection of function symbols showing up in
the binary which generates the current profile. It is used to discriminate
function being cold versus function being newly added. Profile symbol list
is only added for profile with ExtBinary format.

During profile use compilation, when profile-sample-accurate is enabled,
a function without profile will be regarded as cold only when it is
contained in that list.

Differential Revision: https://reviews.llvm.org/D66766


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370563 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-31 02:27:26 +00:00
David Blaikie
209c4e345a llvm-dwarfdump: Cache CU low_pc when computing statistics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370559 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-31 01:05:46 +00:00
Puyan Lotfi
593cd77e46 [IFS][NFC] llvm-ifs: Fixing build bot build break: revert r370517 and r370510.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370522 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 20:25:46 +00:00
Puyan Lotfi
82c1c92a17 [IFS][NFC] llvm-ifs: Fixing build bot error due to commit conflicts.
r370510 and r370504

Again only on gcc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370517 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 20:09:55 +00:00
Puyan Lotfi
0cc2d216cb [IFS][NFC] llvm-ifs: Fixing build errors for bots using GCC.
gcc produces the error:

error: specialization of
‘template<class T, class Enable> struct llvm::yaml::ScalarTraits’ in
different namespace

For all specializations outside of llvm::yaml. So I added llvm::yaml to these
specializations to fix the errors on the bots building with gcc (/usr/bin/c++).




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370510 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 19:54:46 +00:00
Michael Liao
338cb7373a Fix compilation warnings. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370504 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 19:23:28 +00:00
Puyan Lotfi
acdc608bee [llvm-ifs][IFS] llvm Interface Stubs merging + object file generation tool.
This tool merges interface stub files to produce a merged interface stub file
or a stub library. Currently it for stub library generation it can produce an
ELF .so stub file, or a TBD file (experimental). It will be used by the clang
-emit-interface-stubs compilation pipeline to merge and assemble the per-CU
stub files into a stub library.

The new IFS format is as follows:

--- !experimental-ifs-v1
IfsVersion:      1.0
Triple:          <llvm triple>
ObjectFileFormat: <ELF | TBD>
Symbols:
  _ZSymbolName: { Type: <type>, etc... }
...

Differential Revision: https://reviews.llvm.org/D66405


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370499 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 18:26:05 +00:00
Sid Manning
1d8753c162 [llvm-nm] Small fix to Exected<StringRef>
Differential Revision: https://reviews.llvm.org/D66976

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370474 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 14:12:04 +00:00
Chris Jackson
61fef394df [llvm-objcopy] Allow the visibility of symbols created by --binary and
--add-symbol to be specified with --new-symbol-visibility

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370458 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 10:17:16 +00:00
Martin Storsjo
0989672182 [COFF] Add a ResourceSectionRef method for getting resource contents
This allows llvm-readobj to print the contents of each resource
when printing resources from an object file or executable, like it
already does for plain .res files.

This requires providing the whole COFFObjectFile to ResourceSectionRef.

This supports both object files and executables. For executables,
the DataRVA field is used as is to look up the right section.

For object files, ideally we would need to complete linking of them
and fix up all relocations to know what the DataRVA field would end up
being. In practice, the only thing that makes sense for an RVA field
is an ADDR32NB relocation. Thus, find a relocation pointing at this
field, verify that it has the expected type, locate the symbol it
points at, look up the section the symbol points at, and read from the
right offset in that section.

This works both for GNU windres object files (which use one single
.rsrc section, with all relocations against the base of the .rsrc
section, with the original value of the DataRVA field being the
offset of the data from the beginning of the .rsrc section) and
cvtres object files (with two separate .rsrc$01 and .rsrc$02 sections,
and one symbol per data entry, with the original pre-relocated DataRVA
field being set to zero).

Differential Revision: https://reviews.llvm.org/D66820

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370433 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 06:55:49 +00:00
Dan Gohman
dd0b08abf0 [WebAssembly] Make __attribute__((used)) not imply export.
Add an WASM_SYMBOL_NO_STRIP flag, so that __attribute__((used)) doesn't
need to imply exporting. When targeting Emscripten, have
WASM_SYMBOL_NO_STRIP imply exporting.

Differential Revision: https://reviews.llvm.org/D62542


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370415 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 22:40:00 +00:00
George Rimar
ec34b0bdef [llvm-readobj/llvm-readelf] - Report a proper warning when dumping a broken dynamic relocation.
When we have a dynamic relocation with a broken symbol's st_name,
tools report a useless error: "Invalid data was encountered while parsing the file".

After this change we report a warning + "<corrupt>" as a symbol name.

Differential revision: https://reviews.llvm.org/D66734

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370330 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 10:55:57 +00:00
Martin Storsjo
e5896b56ec [COFF] Add a ResourceSectionRef method for getting the data entry, print it in llvm-readobj
Differential Revision: https://reviews.llvm.org/D66819

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370311 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 09:00:14 +00:00
Martin Storsjo
013811b395 [COFF] Add a bounds checking helper for iterating a coff_resource_dir_table
Instead of blindly incrementing pointers in llvm-readobj, use this
helper, which does bounds checking against the available section
data.

Differential Revision: https://reviews.llvm.org/D66818

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370310 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 08:59:56 +00:00
Martin Storsjo
14e37b0cf2 [llvm-readobj] Print the resource type textually for .res files
This already is done when dumping resources from coff objects.

Differential Revision: https://reviews.llvm.org/D66816

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370308 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 08:59:31 +00:00
Martin Storsjo
9520c04dce [llvm-readobj] Remove a leftover string trim operation. NFC.
This became unnecessary in SVN r359153.

Differential Revision: https://reviews.llvm.org/D66815

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370307 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 08:59:05 +00:00
Vitaly Buka
6f01631817 [ObjectYAML] Fix lifetime issue in dumpDebugLines
Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370289 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 02:36:48 +00:00
Tom Stellard
db58724403 [LLVM-C] Fix omission of INSTALL_WITH_TOOLCHAIN to llvm_add_library()
Due to a misstake with r365902 that tried to simplify the install with
toolchain logic LLVM-C.dll was no longer being installed.

Patch By: Jakob Bornecrantz

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370271 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-28 22:59:04 +00:00
Jason Liu
0575f5892a [llvm-readobj][XCOFF][NFC] Add return statement to avoid -Wimplicit-fallthrough warning
This is to fix the commit in r370097.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370260 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-28 20:59:17 +00:00
Jason Liu
8a49f34066 [XCOFF][AIX] Generate symbol table entries with llvm-readobj
Summary:

This patch implements main entry and auxiliary entries of symbol table generation for llvm-readobj on AIX.
The source code of aix_xcoff_xlc_test8.o (compile with xlc) is:

-bash-4.2$ cat test8.c
extern int i;
extern int TestforXcoff;
extern int fun(int i);
static int static_i;
char* p="abcd";
int fun1(int j) {
  static_i++;
  j++;
  j=j+*p;
  return j;
}
int main() {
  i++;
  fun(i);
  return fun1(i);
}

Patch provided by DiggerLin

Differential Revision: https://reviews.llvm.org/D65240

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370097 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-27 18:54:46 +00:00
Reid Kleckner
35a1ff0702 Revert Autogenerate the shebang lines for tools/opt-viewer
This reverts r369486 (git commit 8d18384809957cc923752e10a86adab129e3df48)

The opt-viewer tests don't pass after this change, and fixing them isn't
trivial. opt-viewer.py imports optmap, which requires adjusting
pythonpath, which is more work than I'm willing to do to fix forward.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370095 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-27 18:31:29 +00:00
Lang Hames
e00eaf45f7 [JITLink] Fix bogus TimerGroup constructor call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370088 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-27 18:05:05 +00:00
Lang Hames
3c70899939 [JITLink] Add timers and -show-times option to llvm-jitlink.
The timers track time spent loading objects, linking, and (if applicable)
running JIT-link'd code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370075 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-27 15:51:19 +00:00
George Rimar
4ea7e7764d [llvm-objdump] - Remove one overload of reportError. NFCI.
There is a problem with reportError we have.
Declaration says we have ArchiveName
that follows the FileName:

reportError(Error E, StringRef FileName, StringRef ArchiveName,...

Though implementation have them reversed. I cleaned it up and
removed an excessive reportError(Error E, StringRef File) version.

Rebased on top of D66418.

Differential revision: https://reviews.llvm.org/D66517

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370034 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-27 10:03:45 +00:00
Gabor Buella
ddcb2bb71b [NFC][cmake] Build fix in tools/llvm-config/CMakeLists.txt
To avoid the following error message (using cmake version 3.13.4) :

```
CMake Error at tools/llvm-config/CMakeLists.txt:37 (string):
Syntax error in cmake code  when parsing string-std=[^ ]\+Invalid escape sequence \+
```

Reviewed By: mgorny

Differential Revision: https://reviews.llvm.org/D58619



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369887 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-26 09:42:30 +00:00
Benjamin Kramer
1c6ba54d48 [llvm-reduce] Silence -Wdocumentation
ReduceGlobalVars.cpp:17:6: warning: '@returns' command used in a comment that is attached to a function returning void

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369848 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-24 15:04:33 +00:00
Wei Mi
6ef59a4545 [SampleFDO] Add ExtBinary format to support extension of binary profile.
This is a patch split from https://reviews.llvm.org/D66374. It tries to add
a new format of profile called ExtBinary. The format adds a section header
table to the profile and organize the profile in sections, so the future
extension like adding a new section or extending an existing section will be
easier while keeping backward compatiblity feasible.

Differential Revision: https://reviews.llvm.org/D66513



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369798 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 19:05:30 +00:00
Jordan Rupprecht
af4c09fbb7 [llvm-objcopy] Strip debug sections when running with --strip-unneeded.
Summary:
GNU --strip-unneeded strips debugging sections as well. Do that for llvm-objcopy as well.

Additionally, add a test that verifies we keep the .gnu_debuglink section. This apparently was not always the case, and I'm not sure which commit fixed it, but there doesn't appear to be any test coverage to make sure we continue to do so.

This fixes PR41043.

Reviewers: jhenderson, jakehehrlich, espindola, alexshap

Subscribers: emaste, arichardson, MaskRay, abrachet, seiya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66623

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369761 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-23 14:28:58 +00:00
Benjamin Kramer
adfeeb980b Fight a bit against global initializers. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369695 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 19:43:27 +00:00
Jordan Rupprecht
b795783d27 [llvm-objcopy][NFC] Refactor symbol/section matching
Summary:
The matchers for section/symbol related flags (e.g. `--keep-symbol=Name` or `--regex --keep-symbol=foo.*`) are currently just vectors that are matched linearlly. However, adding wildcard support would require negative matching too, e.g. a symbol should be removed if it matches a wildcard *but* doesn't match some other wildcard.

To make the next patch simpler, consolidate matching logic to a class defined in CopyConfig that takes care of matching.

Reviewers: jhenderson, seiya, MaskRay, espindola, alexshap

Reviewed By: jhenderson, MaskRay

Subscribers: emaste, arichardson, jakehehrlich, abrachet, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66432

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369689 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 19:17:50 +00:00
George Rimar
3251d121bd [llvm-readobj] - Remove reportError(std::error_code EC, StringRef Input) helper.
We do not need it, std::error_code is used mostly for COFF and
this patch rewrites the calls to use a different overload.

Having reportError(std::error_code EC, ... is excessive by itself,
because API that use error codes actually needs refactoring to
use Error/Expected<> instead.

DIfferential revision: https://reviews.llvm.org/D66521

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369630 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 08:56:24 +00:00
George Rimar
d77f59243c [llvm-objdump] - Cleanup the error reporting.
The error reporting function are not consistent.

Before this change:

* They had inconsistent naming (e.g. 'error' vs 'report_error').
* Some of them reported the object name, others - dont.
* Some of them accepted the case when there was no error. (i.e. error code or Error had a success value).

This patch tries to cleanup it a bit.

It also renames report_error -> reportError, report_warning -> reportWarning
and removes a full stop from messages.

Differential revision: https://reviews.llvm.org/D66418

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369515 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 11:07:31 +00:00
Chris Bieneman
dd9264d345 Autogenerate the shebang lines for tools/opt-viewer
Summary:
Since these files depend on the built python modules, they need to use
the right python binary to run them. So use configure_file
to set the right shebang line.

Patch By: cbiesinger (Christian Biesinger)

Reviewers: chandlerc, beanz, anemet

Reviewed By: anemet

Subscribers: compnerd, JDevlieghere, mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D65983

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369486 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 01:48:28 +00:00
Jinsong Ji
fd2d578918 [llvm-extract] Update the help message for group extraction feature
Summary:
https://reviews.llvm.org/D60973 exposed the group extraction feature of
the BlockExtractor to llvm-extract.
However, the help message was not updated, so users might not be able to
know how to use this feature without looking into history/commits.

This patch just update the help message to show how to use this group
extraction feature.

Reviewers: qcolombet, volkan

Reviewed By: qcolombet

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D66438

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369438 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 20:45:16 +00:00
Fangrui Song
de323b2a4e [llvm-objcopy] Append '\n' to warning messages
Currently the warning message of `llvm-strip %t.o %t.o` does not include
the trailing newline. Fix this by appending a '\n'.

This is the only warning llvm-objcopy and llvm-strip can issue.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D66475

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369391 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 15:00:07 +00:00
George Rimar
fd572fefc7 [llvm-objdump] - Remove one of report_error functions and improve the error reporting.
One of the report_error functions was taking object::Archive::Child as an
argument. It feels excessive, this patch removes it and introduce a helper
function instead. Also I fixed a "TODO" in this patch what improved the message printed.

Differential revision: https://reviews.llvm.org/D66468

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369382 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 13:19:16 +00:00