415 Commits

Author SHA1 Message Date
Fangrui Song
8d84ad6695 [llvm-objdump] Don't print trailing space in dumpBytes
In disassembly output, dumpBytes prints a space, followed by a tab
printed by printInstr. Remove the extra space.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358045 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-10 05:31:21 +00:00
Fangrui Song
90bb2f79b2 [llvm-objdump] Accept and ignore --wide/-w
This is similar to what we do for llvm-readobj (--wide/-W is for GNU
readelf compatibility).

The test will be added in D60376.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358043 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-10 04:46:01 +00:00
Fangrui Song
029dd82a55 [llvm-objdump] Migrate some functions from std::error_code to Error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357965 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-09 05:41:24 +00:00
Fangrui Song
7ac74fb0ca [llvm-objdump] Migrate relocation handling functions from error_code to Error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357920 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-08 16:24:08 +00:00
Fangrui Song
c0af88a98c [llvm-objdump] Fix MC/ARM/arm-macho-calls.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357880 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-08 01:22:38 +00:00
Fangrui Song
ddfe71d047 [llvm-objdump] Split disassembleObject and simplify --{start,stop}-address handling
The main disassembly loop is hard to read due to special handling of ARM
ELF data & ELF data. Split off the logic into two functions
dumpARMELFData and dumpELFData. Hoist some checks outside of the loop.

--start-address --stop-address have redundant checks and minor off-by-1
issues. Fix them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357869 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-07 16:33:24 +00:00
Fangrui Song
bcaec23c25 [llvm-objdump] Fix split of source lines; don't ltrim source lines
If the file does not end with a newline, it may be dropped. Fix the
splitting algorithm.

Also delete an unnecessary SourceCache lookup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357858 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-07 10:16:46 +00:00
Fangrui Song
582aba066d [llvm-objdump] Simplify Expected<T> handling with unwrapOrError
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357855 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-07 08:19:55 +00:00
Fangrui Song
7a5b0c460c [llvm-objdump] Simplify disassembleObject
* Use std::binary_search to replace some std::lower_bound
* Use llvm::upper_bound to replace some std::upper_bound
* Use format_hex and support::endian::read{16,32}

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357853 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-07 05:32:16 +00:00
Fangrui Song
9cc714957f Change some StringRef::data() reinterpret_cast to bytes_begin() or arrayRefFromStringRef()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357852 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-07 03:58:42 +00:00
Eric Christopher
6d179d64d1 Fix typoed variable name.
NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357138 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-28 01:12:13 +00:00
Jordan Rupprecht
8cdeab01bc [llvm-objdump] Support arg grouping for -j and -M (e.g. llvm-objdump -sj.foo -dMreg-names-raw)
Summary:
r354375 added support for most objdump groupings, but didn't add support for -j|--sections, because that wasn't possible.
r354870 added --disassembler options, but grouping still wasn't available.
r355185 supported values for grouped options.

This just puts the three of them together. This supports -j in modes like `-s -j .foo`, `-sj .foo`, `-sj=.foo`, or `-sj.foo`, and similar for `-M`.

Reviewers: ormris, jhenderson, ikudrin

Reviewed By: jhenderson, ikudrin

Subscribers: javed.absar, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@356697 91177308-0d34-0410-b5e6-96231b3b80d8
2019-03-21 18:45:44 +00:00
Alexey Lapshin
a15cff122c [DebugInfo] add SectionedAddress to DebugInfo interfaces.
That patch is the fix for https://bugs.llvm.org/show_bug.cgi?id=40703
   "wrong line number info for obj file compiled with -ffunction-sections"
   bug. The problem happened with only .o files. If object file contains
   several .text sections then line number information showed incorrectly.
   The reason for this is that DwarfLineTable could not detect section which
   corresponds to specified address(because address is the local to the
   section). And as the result it could not select proper sequence in the
   line table. The fix is to pass SectionIndex with the address. So that it
   would be possible to differentiate addresses from various sections. With
   this fix llvm-objdump shows correct line numbers for disassembled code.

   Differential review: https://reviews.llvm.org/D58194

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354972 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-27 13:17:36 +00:00
Igor Kudrin
b7fb794e26 [llvm-objdump] Implement -Mreg-names-raw/-std options.
The --disassembler-options, or -M, are used to customize
the disassembler and affect its output.

The two implemented options allow selecting register names on ARM:
* With -Mreg-names-raw, the disassembler uses rNN for all registers.
* With -Mreg-names-std it prints sp, lr and pc for r13, r14 and r15,
  which is the default behavior of llvm-objdump.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354870 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-26 12:15:14 +00:00
Xing GUO
472d362ffc [llvm-objdump] Add Version References dumper
Summary: Add symbol version dumper for [#30241](https://bugs.llvm.org/show_bug.cgi?id=30241)

Reviewers: jhenderson, MaskRay, kristina, emaste, grimar

Reviewed By: jhenderson, grimar

Subscribers: grimar, rupprecht, jakehehrlich, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354782 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-25 13:13:19 +00:00
Matthew Voss
26dfbddae1 Revert "Revert "[llvm-objdump] Allow short options without arguments to be grouped""
- Tests that use multiple short switches now test them grouped and ungrouped.

  - Ensure the output of ungrouped and grouped variants is identical

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354375 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-19 19:46:08 +00:00
George Rimar
1cb4de41ab [yaml2obj] - Do not skip zeroes blocks if there are relocations against them.
This is for -D -reloc combination.

With this patch, we do not skip the zero bytes that have a relocation against
them when -reloc is used. If -reloc is not used, then the behavior will be the same.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354319 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-19 12:38:36 +00:00
Matthew Voss
1854768f0f Revert "[llvm-objdump] Allow short options without arguments to be grouped"
Reverted due to failures on the llvm-hexagon-elf.

This reverts commit 77e1f27476c89f65eeb496d131065177e6417f23.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354002 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-14 01:39:43 +00:00
Matthew Voss
dce0292ccb [llvm-objdump] Allow short options without arguments to be grouped
Summary:

https://bugs.llvm.org/show_bug.cgi?id=31679

Reviewers: kristina, jhenderson, grimar, jakehehrlich, rupprecht

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353998 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-14 00:39:40 +00:00
Sid Manning
45db4e8ea9 [llvm-objdump] - llvm-objdump can skip bytes at the end of a section.
Differential Revision: https://reviews.llvm.org/D57549

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352900 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-01 19:11:47 +00:00
Matt Davis
7fac036c20 [ELF] Return the section name when calling getSymbolName on a section symbol.
Summary:
Previously, llvm-nm would report symbols for .debug and .note sections as: '?' with an empty  section name:

```
00000000 ?
00000000 ?
...
```

With this patch the output more closely resembles GNU nm:
```
00000000 N .debug_abbrev
00000000 n .note.GNU-stack
...
```

This patch calls `getSectionName` for sections that belong to symbols of type `ELF::STT_SECTION`, which returns the name of the section from the section string table.

Reviewers: Bigcheese, davide, jhenderson

Reviewed By: davide, jhenderson

Subscribers: rupprecht, jhenderson, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352785 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-31 19:42:21 +00:00
George Rimar
24fe26b1a5 [llvm-objdump] - Restore a piece of code removed by mistake in r352366.
Seems when committed the r352366
("[llvm-objdump] - Print LMAs when dumping section headers.")
I resolved merge conflict incorrectly and removed this piece by mistake.

Bots did not catch this yet, seems they are slow today,
but the `X86/adjust-vma.test` test case fails locally for me without that.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352383 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-28 16:36:12 +00:00
George Rimar
4771873908 [llvm-objdump] - Print LMAs when dumping section headers.
When --section-headers is used, GNU objdump prints both LMA and VMA for sections.
llvm-objdump does not do that what makes it's output be slightly inconsistent.

Patch teaches llvm-objdump to print LMA/VMA for ELF file formats.
The behavior for other formats remains unchanged.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352366 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-28 14:11:35 +00:00
George Rimar
aa66d2b539 [llvm-objdump] - Fix comment. NFC.
This was mentioned by James Henderson
in review for https://reviews.llvm.org/D57051.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352348 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-28 10:48:54 +00:00
George Rimar
747cd64953 [llvm-objdump] - Implement the --adjust-vma option.
GNU objdump's help says: "--adjust-vma: Add OFFSET to all displayed section addresses"
In real life what it does is a bit more complicated
(and IMO not always reasonable. For example, GNU objdump prints not only VMA, but also LMA
for sections. And with --adjust-vma it adjusts LMA, but only when a section has relocations.
llvm-objsump does not seem to support printing LMAs yet, but GNU's logic anyways does not
make sense for me here).

This patch tries to adjust VMA. I tried to implement a reasonable approach.
I am not adjusting sections that are not allocatable. As, for example, adjusting debug sections
VA's and rel[a] sections VA's should not make sense. This behavior seems to be GNU compatible.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352347 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-28 10:44:01 +00:00
George Rimar
c01927928c [llvm-objdump] - Move common code to a new printRelocation() helper. NFC.
This extracts the common code for printing relocations into a new helper function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351951 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-23 13:39:12 +00:00
George Rimar
482634dcda [llvm-objdump] - Move variable. NFC.
It was too far from the place where it is used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351942 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-23 10:52:38 +00:00
George Rimar
7ace113659 [llvm-objdump] - Split disassembleObject() into two methods. NFCI.
Currently, disassembleObject() is a ~550 lines length function.

This patch splits it into two, where first do all helper objects initializations
and calls the second which does all the rest job.
This is a straightforward split.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351940 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-23 10:33:26 +00:00
George Rimar
5d73c0daaf [llvm-objdump] - Introduce getRelocsMap() helper. NFCI.
Currently disassembleObject() is a ~550 lines length function.
This patch extracts the code that creates a section->their relocation
mapping into a new helper function to simplify/reduce it a bit.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351824 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-22 14:09:37 +00:00
Chandler Carruth
6b547686c5 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-19 08:50:56 +00:00
Clement Courbet
1498f1dfed Revert r351529 "[llvm-objdump][NFC] Improve readability."
msan errors in ELF/strip-all.s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351556 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 15:26:14 +00:00
Clement Courbet
e69eed4580 Reland r351529 "[llvm-objdump][NFC] Improve readability."
`SectionSymbol*` is cast from `void*` to
`std::tuple<uint64_t, StringRef, uint8_t>` in AMDGPUSymbolizer, so it has to
*be* one, not *act like* one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351553 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 14:20:13 +00:00
George Rimar
a99a3c6de1 [llvm-objdump] - Dump the archive headers when -all-headers is specified.
When -all-headers is given it is supposed to dump all headers,
but now it skips the archive headers for no reason.

The patch fixes that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351547 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 12:01:59 +00:00
George Rimar
605942eacd [llvm-objdump] - Move getRelocationValueString and dependenices out of the llvm-objdump.cpp
getRelocationValueString is a dispatcher function that calls the
corresponding ELF/COFF/Wasm/MachO implementations
that currently live in the llvm-objdump.cpp file.

These implementations better be moved to ELFDump.cpp,
COFFDump.cpp and other corresponding files, to move platform specific
implementation out from the common logic.

The patch does that. Also, I had to move ToolSectionFilter helper
and SectionFilterIterator, SectionFilter to a header to make them
available across the objdump code.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351545 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 11:33:26 +00:00
George Rimar
4d0c775881 [llvm-objdump] - Show aliases in -help.
Currently llvm-objdump is inconsistent.

When -help is specified it shows no aliases except two.
Aliases are shown with -help-hidden though.
GNU objdump also prints them by default.

This patch does a change to always show all aliases
when -help is given.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351542 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 10:41:26 +00:00
Clement Courbet
70872139d5 Revert r351529 "[llvm-objdump][NFC] Improve readability."
Breaks labels-branch.s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351534 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 09:40:19 +00:00
Clement Courbet
123f62d954 [llvm-objdump][NFC] Improve readability.
Summary:
Introduce a `struct SectionSymbol` instead of
`tuple<uint64_t, StringRef, uint8>`.

Reviewers: jhenderson, davide

Subscribers: rupprecht, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351529 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-18 08:59:39 +00:00
Wouter van Oortmerssen
51123841ae [WebAssembly] Fixed objdump not parsing function headers.
Summary:
objdump was interpreting the function header containing the locals
declaration as instructions. To parse these without injecting target
specific code in objdump, MCDisassembler::onSymbolStart was added to
be implemented by the WebAssembly implemention.

WasmObjectFile now returns a code offset for the "address" of a symbol,
rather than the index. This is also more in-line with what other
targets do.

Also ensured that the AsmParser correctly puts each function
in its own segment to enable this test case.

Reviewers: sbc100, dschuff

Subscribers: jgravelle-google, aheejin, sunfish, rupprecht, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351460 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-17 18:14:09 +00:00
James Henderson
bc34da10fa Move demangling function from llvm-objdump to Demangle library
This allows it to be used in an upcoming llvm-readobj change.

A small change in internal behaviour of the function is to always call
the microsoftDemangle function if the string does not have an itanium
encoding prefix, rather than only if it starts with '?'. This is
harmless because the microsoftDemangle function does the same check
already.

Reviewed by: grimar, erik.pilkington

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351448 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-17 15:18:44 +00:00
George Rimar
258d6f7e3e [llvm-objdump] - Fix comment. NFC.
Forgot to address this one.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351418 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-17 09:14:33 +00:00
George Rimar
60016bd970 [llvm-objdump] - Simplify the getRelocationValueString. NFCI.
This refactors the getRelocationValueString method.
It is a bit overcomplicated and it is possible to reduce it without
losing the functionality it seems.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351417 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-17 09:13:17 +00:00
George Rimar
daf8332471 [llvm-obdump] - Fix the help lines for -stop-address and -z.
It was broken by me by mistake in r350823 during addressing the
review comment before committing (changed not the right text line).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351192 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-15 14:03:50 +00:00
George Rimar
45d116d45e [llvm-objdump] - Cleanup the code. NFCI.
This is a cosmetic cleanup for the llvm-objdump code.

This patch:
* Renames things to match the official LLVM code style (lower case -> upper case).
* Removes few obviously excessive variables.
* Moves a few lines closer to the place of use, reorders the code a bit to simplify it,
to avoid doing excessive returns and to avoid using 'else` after returns.

I focused only on a llvm-objdump.h/llvm-objdump.cpp files. Few changes in the
MachODump.cpp and COFFDump.cpp are a result of llvm-objdump.h modification.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351171 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-15 09:19:18 +00:00
George Rimar
04fde6bab3 [llvm-objdump] - Change the output for --all-headers.
This is for https://bugs.llvm.org/show_bug.cgi?id=40008,

it starts printing the file headers when --all-headers is given and
do a minor cosmetic change.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@351006 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-12 12:17:24 +00:00
George Rimar
03e297e48e [llvm-objdump] - Do not include reserved undefined symbol in -t output.
This is https://bugs.llvm.org/show_bug.cgi?id=26892,

GNU objdump hides the special symbol entry:

SYMBOL TABLE:
000000000000a7e0 l     F .text	00000000000003f9 bi_copymodules
while llvm-objdump does not:

SYMBOL TABLE:
0000000000000000         *UND*		 00000000 
000000000000a7e0 l     F .text		 000003f9 bi_copymodules

Patch makes the behavior of the llvm-objdump to be consistent with the GNU objdump.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350840 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10 16:24:10 +00:00
George Rimar
5482030e57 [llvm-objdump] - Implement -z/--disassemble-zeroes.
This is https://bugs.llvm.org/show_bug.cgi?id=37151,

GNU objdump spec says that "Normally the disassembly output will skip blocks of zeroes.",
but currently, llvm-objdump prints them.

The patch implements the -z/--disassemble-zeroes option and switches the default to always
skip blocks of zeroes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350823 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-10 14:55:26 +00:00
George Rimar
56b18a6bdf [llvm-objdump] - Print symbol addressed when dumping disassembly output (-d)
When GNU objdump dumps the input with -d it prints the symbol addresses,
for example:

0000000000000031 <foo>:
  31:	00 00                	add    %al,(%rax)
	...

llvm-objdump currently does not do that.
Patch changes the behavior to match the GNU objdump.

That is useful for implementing -z/--disassemble-zeroes (D56083),
it allows omitting first zero bytes and keep the information
about the symbol address in the output.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350726 91177308-0d34-0410-b5e6-96231b3b80d8
2019-01-09 14:43:33 +00:00
Jordan Rupprecht
f6ea1298bb [binutils] NFC: fix clang-tidy warning: use empty() instead of size() == 0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349710 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-20 00:57:06 +00:00
George Rimar
96c60eab74 [llvm-objdump] - Fix one more BB.
Should fix the http://lab.llvm.org:8011/builders/polly-amd64-linux/builds/25876/steps/build/logs/stdio:

/home/grosser/buildslave/polly-amd64-linux/llvm.src/tools/llvm-objdump/llvm-objdump.cpp:539:25: error: conditional expression is ambiguous; 'std::string' (aka 'basic_string<char>') can be converted to 'typename std::remove_reference<StringRef>::type' (aka 'llvm::StringRef') and vice versa
      Target = Demangle ? demangle(*SymName) : *SymName;

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349617 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-19 10:44:49 +00:00
George Rimar
927407d000 [llvm-objdump] - Fix BB.
Move the helper method before the first incocation in the file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@349614 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-19 10:29:35 +00:00