summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objcopy] Append '\n' to warning messagesFangrui Song2019-08-201-1/+1
| | | | | | | | | | | | | 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 llvm-svn: 369391
* [llvm-objdump] - Remove one of `report_error` functions and improve the ↵George Rimar2019-08-203-31/+53
| | | | | | | | | | | | 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 llvm-svn: 369382
* [llvm-readobj] Prepend argv[0] to error/warning messagesFangrui Song2019-08-201-6/+9
| | | | | | | | | | | | | | | | | | | | Summary: Currently, we report: error: ... Prepend argv[0] (tool name): llvm-readobj: error: ... This is consistent with most GNU binutils/clang/lld, and gives a bit more context in a long build log. Reviewed By: grimar, jhenderson, rupprecht Differential Revision: https://reviews.llvm.org/D66425 llvm-svn: 369377
* Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.Simon Pilgrim2019-08-201-1/+2
| | | | llvm-svn: 369366
* [yaml2obj/obj2yaml][MachO] Allow setting custom section dataSeiya Nuta2019-08-201-15/+25
| | | | | | | | | | | | | | Reviewers: alexshap, jhenderson, rupprecht Reviewed By: alexshap, jhenderson Subscribers: abrachet, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65799 llvm-svn: 369348
* [llvm-objcopy][MachO] Fix method names. NFC.Seiya Nuta2019-08-201-2/+2
| | | | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65540 llvm-svn: 369346
* [cmake] Link in LLVMPasses due to dependency by LLVMOrcJIT; NFCHubert Tong2019-08-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: rL367756 (f5c40cb) increases the dependency of LLVMOrcJIT on LLVMPasses. In particular, symbols defined in LLVMPasses that are referenced by the destructor of `PassBuilder` are now referenced by LLVMOrcJIT through `Speculation.cpp.o`. We believe that referencing symbols defined in LLVMPasses in the destructor of `PassBuilder` is valid, and that adding to the set of such symbols is legitimate. To support such cases, this patch adds LLVMPasses to the set of libraries being linked when linking in LLVMOrcJIT causes such symbols from LLVMPasses to be referenced. Reviewers: Whitney, anhtuyen, pree-jackie Reviewed By: pree-jackie Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66441 llvm-svn: 369310
* Recommit "[llvm-objcopy][MachO] Implement a layout algorithm for executables"Seiya Nuta2019-08-191-20/+46
| | | | | | | | | | | | | | | | Summary: The layout algorithm for relocatable objects and for executable are somewhat different. This patch implements the latter one based on the algorithm in LLD (MachOFileLayout). Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65539 llvm-svn: 369301
* Recommit "[llvm-objcopy][MachO] Support load commands used in ↵Seiya Nuta2019-08-199-210/+560
| | | | | | | | | | | | | | | | | | | | | executables/shared libraries" Summary: This patch implements copying some load commands that appear in executables/shared libraries such as the indirect symbol table. I don't add tests intentionally because this patch is incomplete: we need a layout algorithm for executables/shared libraries. I'll submit it as a separate patch with tests. Reviewers: alexshap, rupprecht, jhenderson, compnerd Reviewed By: alexshap Subscribers: abrachet, mgorny, mgrang, MaskRay, mtrent, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63395 llvm-svn: 369298
* [llvm-objdump] - Restore lost comment.George Rimar2019-08-191-0/+1
| | | | | | It was removed by mistake in r369263 (D66417). llvm-svn: 369265
* [Object/COFF.h] - Stop returning std::error_code in a few methods. NFCI.George Rimar2019-08-195-46/+16
| | | | | | | | | | There are 4 methods that return std::error_code now, though they do not have to because they are always succeed. I refactored them. This allows to simplify the code in tools a bit. llvm-svn: 369263
* [llvm-readobj] unwrapOrError: remove unnecessary llvm_unreachable after r369194Fangrui Song2019-08-191-1/+0
| | | | llvm-svn: 369254
* Revert r369230 and r369231Seiya Nuta2019-08-199-586/+210
| | | | | | | | | | Looks these commits break CI builds: - http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-gn/builds/4159 This commit reverts r369230 and r369231 (git coommit: 4a198a7 and dee9546). llvm-svn: 369234
* [llvm-objcopy][MachO] Implement a layout algorithm for executablesSeiya Nuta2019-08-191-20/+46
| | | | | | | | | | | | | | | | Summary: The layout algorithm for relocatable objects and for executable are somewhat different. This patch implements the latter one based on the algorithm in LLD (MachOFileLayout). Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap Subscribers: jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65539 llvm-svn: 369231
* [llvm-objcopy][MachO] Support load commands used in executables/shared librariesSeiya Nuta2019-08-199-210/+560
| | | | | | | | | | | | | | | | | | | Summary: This patch implements copying some load commands that appear in executables/shared libraries such as the indirect symbol table. I don't add tests intentionally because this patch is incomplete: we need a layout algorithm for executables/shared libraries. I'll submit it as a separate patch with tests. Reviewers: alexshap, rupprecht, jhenderson, compnerd Reviewed By: alexshap Subscribers: abrachet, mgorny, mgrang, MaskRay, mtrent, jakehehrlich, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D63395 llvm-svn: 369230
* Recommit r369190 "[llvm-readobj/llvm-readelf] - Improve/cleanup the error ↵George Rimar2019-08-177-164/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | reporting API." Fix: Add a `consumeError` call removed by mistake to 'printStackSize', this should fix the "Expected<T> must be checked before access or destruction." reported by following bot: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/9743/steps/stage%201%20check/logs/stdio Original commit message: Currently we have the following functions for error reporting: LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg); void reportError(Error Err, StringRef Input); void reportWarning(Twine Msg); void reportWarning(StringRef Input, Error Err); void warn(llvm::Error Err); void error(std::error_code EC); Problems are: naming is inconsistent, arguments order is inconsistent, some of the functions looks excessive. After applying this patch we have: void reportError(Error Err, StringRef Input); void reportError(std::error_code EC, StringRef Input); void reportWarning(Error Err, StringRef Input); I'd be happy to remove reportError(std::error_code EC, StringRef Input) too, but it is used by COFF heavily. Test cases were updated, they show an improvement introduced. Differential revision: https://reviews.llvm.org/D66286 llvm-svn: 369194
* Revert r369190, r369192 ([llvm-readobj/llvm-readelf] - Improve/cleanup the ↵George Rimar2019-08-177-233/+164
| | | | | | | | | | | error reporting API.) It caused multiple BB failtures: http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/9743/steps/stage%201%20check/logs/stdio http://lab.llvm.org:8011/builders/clang-cmake-x86_64-sde-avx512-linux/builds/26042/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Astack-sizes.test llvm-svn: 369193
* [llvm-readobj] - An attemp to fix BB after r369191.George Rimar2019-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | Few BB failed with the following error: Command Output (stderr): -- /home/buildbots/ppc64be-clang-lnt-test/clang-ppc64be-lnt/llvm/test/tools/llvm-readobj/stack-sizes.test:263:19: error: BADSECTION-OUT: expected string not found in input # BADSECTION-OUT: 8 ? ^ <stdin>:4:1: note: scanning from here ^ It doesn't reproduce on ubuntu/windows I have. Also, seems many of the bots are happy too. This slightly reorders the code to make fouts().flush() call earlier, like it was before the r369191. llvm-svn: 369192
* [llvm-readobj/llvm-readelf] - Improve/cleanup the error reporting API.George Rimar2019-08-177-165/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | urrently we have the following functions for error reporting: -- LLVM_ATTRIBUTE_NORETURN void reportError(Twine Msg); void reportError(Error Err, StringRef Input); void reportWarning(Twine Msg); void reportWarning(StringRef Input, Error Err); void warn(llvm::Error Err); void error(std::error_code EC); --- Problems are: naming is inconsistent, arguments order is inconsistent, some of the functions looks excessive. After applying this patch we have: --- LLVM_ATTRIBUTE_NORETURN void reportError(Error Err, StringRef Input); LLVM_ATTRIBUTE_NORETURN void reportError(std::error_code EC, StringRef Input); void reportWarning(Error Err, StringRef Input); --- I'd be happy to remove reportError(std::error_code EC, StringRef Input) too, but it is used by COFF heavily. Test cases were updated, they show an improvement introduced. Differential revision: https://reviews.llvm.org/D66286 llvm-svn: 369190
* [llvm-readobj] Unwrap the value first to avoid the errorPetr Hosek2019-08-171-21/+22
| | | | | | | | | This addresses the issue introduced in r369169, we need to unwrap the value first before we can check whether it's empty. This also swaps the two branches to put the common path first which should be NFC. llvm-svn: 369177
* [llvm-readobj] Fallback to PT_NOTE if file doesn't have sectionsPetr Hosek2019-08-161-2/+2
| | | | | | | | | This is useful when trying to read notes from stripped files and matches the behavior of GNU readelf and eu-readelf. Differential Revision: https://reviews.llvm.org/D66358 llvm-svn: 369169
* Fix llvm-config support for CMake build-mode-style buildsJordan Rose2019-08-161-5/+8
| | | | | | | | | | | | At some point we and/or CMake changed our build-mode-style builds from $LLVM_OBJ_ROOT/bin/$CMAKE_CFG_INTDIR/ to $LLVM_OBJ_ROOT/$CMAKE_CFG_INTDIR/bin/ which is way easier to use. But no one updated llvm-config. https://reviews.llvm.org/D66326 llvm-svn: 369129
* [Bugpoint redesign] Added Pass to Remove Global VariablesDiego Trevino Ferrer2019-08-154-0/+98
| | | | | | | | | | | | | | | | | Summary: This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively. I'm still uncertain if this pass should remove derived uses, I'm open to suggestions. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64176 > llvm-svn: 368918 llvm-svn: 369061
* [Bugpoint redesign] Output option can now print to STDOUTDiego Trevino Ferrer2019-08-155-49/+44
| | | | | | | | | | | | | | | | | | Summary: This also changes all the outs() statements to errs() so the output and progress streams don't get mixed. This has been added because D64176 had flaky tests, which I believe were because the reduced file was being catted into `FileCheck`, instead of being pass from STDOUT directly. Reviewers: chandlerc, dblaikie, xbolva00 Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66314 llvm-svn: 369060
* Fix nm on GCC 5.1 after the C++14 moveJF Bastien2019-08-151-6/+10
| | | | | | | | | | | | | | | | | Summary: As in D66306, fix the invocation of std::sort with std::function by not using std::function, since it's easier to read and is broken in libstdc++ from GCC 5.1 (see https://gcc.gnu.org/PR65942). Reviewers: thakis Subscribers: jkorous, mgrang, dexonsmith, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66310 llvm-svn: 369045
* Revert [Bugpoint redesign] Added Pass to Remove Global VariablesDiego Trevino Ferrer2019-08-154-97/+0
| | | | | | | | | | | | | | This reverts r368918 because it was unstable! It broke these builds: * http://lab.llvm.org:8011/builders/lld-x86_64-ubuntu-fast/builds/4649 * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29966 * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29964 But surprisingly this passed: * http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/29965 llvm-svn: 369039
* [llvm] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-1552-200/+200
| | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. llvm-svn: 369013
* Bump llvm-go to C++14Benjamin Kramer2019-08-151-1/+1
| | | | llvm-svn: 368989
* [llvm-objcopy] Allow 'protected' visibility to be set when usingChris Jackson2019-08-152-1/+2
| | | | | | | | | | add-symbol Reviewers: Maskray, rupprecht Differential Revision: https://reviews.llvm.org/D65891 llvm-svn: 368982
* [llvm-readobj][MachO] Fix section type printingSeiya Nuta2019-08-151-1/+26
| | | | | | | | | | | | | | | | | | | Summary: Currently, llvm-readobj mistakenly decodes section type as section attribute. This patch fixes the bug and affected tests. Reviewers: JDevlieghere, jhenderson, rupprecht, alexshap, echristo Reviewed By: jhenderson, rupprecht, alexshap, echristo Subscribers: javed.absar, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66075 llvm-svn: 368974
* [llvm-objdump] Add warning messages if disassembly + source for problematic ↵Michael Pozulp2019-08-154-28/+54
| | | | | | | | | | | | | | | | | | inputs Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=41905 Reviewers: jhenderson, rupprecht, grimar Reviewed By: jhenderson, grimar Subscribers: RKSimon, MaskRay, hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D62462 llvm-svn: 368963
* [llvm-objcopy] Move duplicate tablegen from objcopy and strip into one fileMichael Pozulp2019-08-153-191/+155
| | | | | | | | | | | | | | | | Summary: This avoids maintaining the same options in two different places. Reviewers: jhenderson, alexshap, rupprecht, MaskRay Reviewed By: jhenderson, rupprecht, MaskRay Subscribers: MaskRay, wolfgangp, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65991 llvm-svn: 368961
* [NFC] Remove documentation comment to fix warning.Jonas Devlieghere2019-08-151-1/+0
| | | | | | | Remove the @return to fix the warning: '@returns' command used in a comment that is attached to a function returning void [-Wdocumentation] llvm-svn: 368957
* Revert "Expose TailCallKind via the LLVM C API"Jonas Devlieghere2019-08-151-1/+1
| | | | | | | This is failing on several build bots. Reverting as discussed in https://reviews.llvm.org/D66061. llvm-svn: 368953
* Expose TailCallKind via the LLVM C APIRobert Widmann2019-08-141-1/+1
| | | | | | | | | | | | | | | | Summary: This exposes `CallInst`'s tail call kind via new `LLVMGetTailCallKind` and `LLVMSetTailCallKind` functions. The motivation for this is to be able to see `musttail` for languages that require mandatory tail calls for correctness. Today only the weaker `LLVMSetTail` is exposed and there is no way to set `GuaranteedTailCallOpt` via the C API. Reviewers: CodaFi, jyknight, deadalnix, rnk Reviewed By: CodaFi Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66061 llvm-svn: 368945
* [Bugpoint redesign] Modified Functions pass to consider declarationsDiego Trevino Ferrer2019-08-141-22/+15
| | | | | | | | | | | | | | Summary: This modification was put in place so the `ReduceMetadata` pass doesn't have to consider debug functions Reviewers: dblaikie Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66257 llvm-svn: 368934
* [Bugpoint redesign] Added Pass to Remove Global VariablesDiego Trevino Ferrer2019-08-144-0/+98
| | | | | | | | | | | | | | | Summary: This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively. I'm still uncertain if this pass should remove derived uses, I'm open to suggestions. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64176 llvm-svn: 368918
* [Bugpoint redesign] Reduced scope of variables in Delta implementationDiego Trevino Ferrer2019-08-141-5/+4
| | | | | | | | | | | | Summary: This diff also changed the check in `Delta.cpp` to verify interesting-ness, so it exits when the input isn't interesting Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66251 llvm-svn: 368915
* Recommit r368812 "[llvm/Object] - Convert SectionRef::getName() to return ↵George Rimar2019-08-1420-160/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expected<>" Changes: no changes. A fix for the clang code will be landed right on top. Original commit message: SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits. For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.) This patch makes a change for all users to switch to Expected<> version. Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them). Differential revision: https://reviews.llvm.org/D66089 llvm-svn: 368826
* Revert r368812 "[llvm/Object] - Convert SectionRef::getName() to return ↵George Rimar2019-08-1420-289/+160
| | | | | | | | Expected<>" It broke clang BB: http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/16455 llvm-svn: 368813
* [llvm/Object] - Convert SectionRef::getName() to return Expected<>George Rimar2019-08-1420-160/+289
| | | | | | | | | | | | | | | | | | | | | | | SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits. For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.) This patch makes a change for all users to switch to Expected<> version. Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them). Differential revision: https://reviews.llvm.org/D66089 llvm-svn: 368812
* [NFCI] Explicitly provide user-defined constructor for SectionRefAlex Langford2019-08-131-1/+1
| | | | | | | | | I am changing this to work around an issue that is being hit when building with clang 3.8. Specifically, clang 3.8 requires that we have a user defined default constructor for SectionRef for the default initialization of a const SectionRef. llvm-svn: 368758
* [ORC] Refactor definition-generation, add a generator for static libraries.Lang Hames2019-08-132-2/+12
| | | | | | | | | | | | | | | | | This patch replaces the JITDylib::DefinitionGenerator typedef with a class of the same name, and adds support for attaching a sequence of DefinitionGeneration objects to a JITDylib. This patch also adds a new definition generator, StaticLibraryDefinitionGenerator, that can be used to add symbols fom a static library to a JITDylib. An object from the static library will be added (via a supplied ObjectLayer reference) whenever a symbol from that object is referenced. To enable testing, lli is updated to add support for the --extra-archive option when running in -jit-kind=orc-lazy mode. llvm-svn: 368707
* [llvm-readelf] Implement note parsing for NT_FILE and unknown descriptorsJordan Rupprecht2019-08-131-18/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch implements two note parsers; one for NT_FILE coredumps, e.g.: ``` CORE 0x00000080 NT_FILE (mapped files) Page size: 4096 Start End Page Offset 0x0000000000001000 0x0000000000002000 0x0000000000003000 /path/to/a.out 0x0000000000004000 0x0000000000005000 0x0000000000006000 /path/to/libc.so 0x0000000000007000 0x0000000000008000 0x0000000000009000 [stack] ``` (A more realistic example can be tested locally by creating a crashing program and running `llvm-readelf -n core`) And also implements a raw hex dump for unknown descriptor data for unhandled descriptor types. Reviewers: MaskRay, jhenderson, grimar, alexshap Reviewed By: MaskRay, grimar Subscribers: emaste, llvm-commits, labath Tags: #llvm Differential Revision: https://reviews.llvm.org/D65832 llvm-svn: 368698
* Fix -Wdocumentation warning (@returns used in void function). NFCI.Simon Pilgrim2019-08-131-2/+1
| | | | llvm-svn: 368693
* [llvm-readobj] - Remove 'error(Error EC)' helper.George Rimar2019-08-136-70/+91
| | | | | | | | | We do not need it. I replaced it with reportError(StringRef Input, Error Err). Differential revision: https://reviews.llvm.org/D66011 llvm-svn: 368677
* [llvm-ar][NFC] Fix buildbotJordan Rupprecht2019-08-121-1/+1
| | | | llvm-svn: 368578
* [llvm-readobj] Downgrade 'PT_DYNAMIC segment offset + size exceeds the size ↵Jordan Rupprecht2019-08-121-2/+4
| | | | | | | | | | | | | | | | | | of the file' from an error to a warning Summary: This allows llvm-readobj to print other useful information for truncated files instead of giving up. Reviewers: jhenderson, grimar, MaskRay Reviewed By: jhenderson, grimar, MaskRay Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66036 llvm-svn: 368576
* [llvm-ar] Accept file paths with windows format slashesOwen Reynolds2019-08-121-8/+8
| | | | | | | | | | | | | | | The internal representation of llvm-ar archives uses linux style slashes for paths, no matter the OS. In the case of windows this meant file paths input intending to match existing members would only match if linux style slashes where used. This change allows either slash direction to be input by the user. This change includes removing an unnecessary call to normalisePath and moving the call of another. Differential Revision: https://reviews.llvm.org/D65743 llvm-svn: 368573
* [llvm-readelf]Print filename for multiple inputs and fix formatting regressionJames Henderson2019-08-091-4/+4
| | | | | | | | | | | | | | | | | | | This patch addresses two closely related bugs: https://bugs.llvm.org/show_bug.cgi?id=42930 and https://bugs.llvm.org/show_bug.cgi?id=42931. GNU readelf prints the file name for every input unless there is only one input and that input is not an archive. This patch adds the printing for multiple inputs. A previous change did it for archives, but introduced a regression with GNU compatibility for single-output formatting, resulting in a spurious initial blank line. This is fixed in this patch too. Reviewed by: grimar, MaskRay Differential Revision: https://reviews.llvm.org/D65953 llvm-svn: 368435
OpenPOWER on IntegriCloud