1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Nico Weber
47138b2f83 Suppress a few -Wunreachable-code warnings.
No behavior change. Also fix a comment to say match reality.
2020-03-25 13:55:42 -04:00
Benjamin Kramer
87d13166c7 Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.

This doesn't actually modify StringRef yet, I'll do that in a follow-up.
2020-01-28 23:25:25 +01:00
Alexander Shaposhnikov
8300cbdb12 [llvm-lipo] Add support for -extract
This diff adds support for -extract.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D70522
2019-11-21 16:11:48 -08:00
Alexander Shaposhnikov
5b55e57574 [llvm-lipo] Add missing cast
Add missing cast (to correctly sum 32-bit integers).

Test plan: make check-all

llvm-svn: 374945
2019-10-15 20:10:34 +00:00
Alexander Shaposhnikov
f44b178394 [llvm-lipo] Pass ArrayRef by value.
Pass ArrayRef by value, fix formatting. NFC.

Test plan: make check-all

llvm-svn: 374637
2019-10-12 06:14:02 +00:00
Heejin Ahn
719ca167a6 [llvm-lipo] Add TextAPI to LINK_COMPONENTS
Summary:
D68319 uses `MachO::getCPUTypeFromArchitecture` and without this builds
with `-DBUILD_SHARED_LIBS=ON` fail.

Reviewers: alexshap

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 373974
2019-10-07 22:11:30 +00:00
Alexander Shaposhnikov
aa1651acf6 [llvm-lipo] Relax the check of the specified input file architecture
cctools lipo only compares the cputypes when it verifies that
the specified (via -arch) input file and the architecture match.
This diff adjusts the behavior of llvm-lipo accordingly. 

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

Test plan: make check-all

llvm-svn: 373966
2019-10-07 21:14:22 +00:00
Alexander Shaposhnikov
5d5e87b41e [llvm-lipo] Add support for -arch
Add support for -arch.

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

Test plan: make check-all

llvm-svn: 373132
2019-09-27 22:33:18 +00:00
Alexander Shaposhnikov
18f2664e1b [llvm-lipo] Add support for archives
Add support for creating universal binaries which 
can contain an archive.

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

Test plan: make check-all

llvm-svn: 372666
2019-09-23 22:22:55 +00:00
Alexander Shaposhnikov
7afab9f42f [Object] Extend MachOUniversalBinary::getObjectForArch
Make the method MachOUniversalBinary::getObjectForArch return MachOUniversalBinary::ObjectForArch
and add helper methods MachOUniversalBinary::getMachOObjectForArch, MachOUniversalBinary::getArchiveForArch
for those who explicitly expect to get a MachOObjectFile or an Archive.

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

Test plan: make check-all

llvm-svn: 372278
2019-09-19 00:02:12 +00:00
Anusha Basana
6944ca7039 [llvm-lipo] Implement -segalign
Sets section alignments of the specified architecture slices to the
alignment values.
Alignment values are hexadecimal values that are powers of 2.

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

llvm-svn: 367908
2019-08-05 19:06:55 +00:00
Anusha Basana
cb472f88b8 [build] Add the ability to create a symlink for lipo
Add user enabled option to create lipo with symlink to llvm-lipo
Used rL326381 for reference.

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

llvm-svn: 367444
2019-07-31 16:46:57 +00:00
Anusha Basana
8df3777583 [llvm-lipo] Implement -replace
Replaces specified architecture in universal binary input file with
slice from the file_name argument passed into the replace command.

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

llvm-svn: 367248
2019-07-29 18:46:34 +00:00
Shoaib Meenai
02aa65e266 [llvm-lipo] Implement alignment function in -create
Summary:
Removes hard coded valuse for alignment in -create.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

llvm-svn: 366970
2019-07-25 00:29:19 +00:00
Shoaib Meenai
3cee48a64d [llvm-lipo] Implement -info
Prints architecture type of all input files.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

llvm-svn: 366772
2019-07-23 00:42:03 +00:00
Simon Pilgrim
d94781f714 Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
llvm-svn: 366563
2019-07-19 11:18:46 +00:00
Shoaib Meenai
1528fde232 Reapply [llvm-lipo] Implement -create (with hardcoded alignments)
This reapplies r366142 with a fix for the failing Windows test.

Original commit message:

Creates universal binary output file from input files. Currently uses
hard coded value for alignment.  Want to get the create functionality
approved before implementing the alignment function.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

llvm-svn: 366512
2019-07-18 22:48:38 +00:00
Shoaib Meenai
3f57cf86fc Revert [llvm-lipo] Implement -create (with hardcoded alignments)
This reverts r366142 (git commit 67cee1dc7ee285b03372eb818a3894d35efa7394)

The test is failing on the Windows buildbots. Reverting while I
investigate.

llvm-svn: 366144
2019-07-15 22:44:08 +00:00
Shoaib Meenai
d3358a0215 [llvm-lipo] Implement -create (with hardcoded alignments)
Creates universal binary output file from input files. Currently uses
hard coded value for alignment.  Want to get the create functionality
approved before implementing the alignment function.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

llvm-svn: 366142
2019-07-15 22:29:30 +00:00
Shoaib Meenai
8170d669b1 [MachO] Add valid architecture function
Added array of valid architectures and function returning array.
Modified llvm-lipo to include list of valid architectures in error message for invalid arch.

Patch by Anusha Basana <anusha.basana@gmail.com>

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

llvm-svn: 365099
2019-07-04 00:17:02 +00:00
Shoaib Meenai
e24eeda57d [llvm-lipo] Implement -thin
Creates thin output file of specified arch_type from the fat input file.

Patch by Anusha Basana <anushabasana@fb.com>

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

llvm-svn: 364107
2019-06-21 21:59:01 +00:00
Shoaib Meenai
720baf9a35 [llvm-lipo] Drop unneeded braces. NFC
llvm-svn: 362841
2019-06-07 20:52:17 +00:00
Shoaib Meenai
2365b4ea23 [llvm-lipo] Implement -archs
Displays the architecture names of an input file.
Unknown architectures are represented by unknown(cputype,cpusubtype).

Patch by Anusha Basana <anusha.basana@gmail.com>

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

llvm-svn: 362840
2019-06-07 20:47:58 +00:00
Alexander Shaposhnikov
2a4af1a0c6 [tools] Introduce llvm-lipo
This diff starts the implementation of llvm-lipo 
which is supposed to be a drop-in replacement for the well-known tool lipo.

Test plan: make check-all

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

llvm-svn: 361896
2019-05-28 23:22:12 +00:00