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

14 Commits

Author SHA1 Message Date
Puyan Lotfi
a3e3cecf73 [llvm][clang][IFS] Enhancing the llvm-ifs yaml format for symbol lists.
Prior to this change the clang interface stubs format resembled
something ending with a symbol list like this:

 Symbols:
   a: { Type: Func }

This was problematic because we didn't actually want a map format and
also because we didn't like that an empty symbol list required
"Symbols: {}". That is to say without the empty {} llvm-ifs would crash
on an empty list.

With this new format it is much more clear which field is the symbol
name, and instead the [] that is used to express an empty symbol vector
is optional, ie:

Symbols:
 - { Name: a, Type: Func }

or

Symbols: []

or

Symbols:

This further diverges the format from existing llvm-elftapi. This is a
good thing because although the format originally came from the same
place, they are not the same in any way.

Differential Revision: https://reviews.llvm.org/D76979
2020-04-01 10:49:06 -04:00
Bill Wendling
0816222e8f Revert "Remove redundant "std::move"s in return statements"
The build failed with

  error: call to deleted constructor of 'llvm::Error'

errors.

This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
2020-02-10 07:07:40 -08:00
Bill Wendling
e45b5f33f3 Remove redundant "std::move"s in return statements 2020-02-10 06:39:44 -08: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
Puyan Lotfi
02e3cd41a5 [llvm] llvm-ifs: Support for handling empty IFS and merging weak+strong symbols.
The following changes enable llvm-ifs to handle the following merge conflicts:

* Weak + Strong symbol merging for the same symbol
* empty vs non-empty triple field
* empty vs non-empty object file format

Differential Revision: https://reviews.llvm.org/D70834
2019-12-05 12:56:37 -05:00
Puyan Lotfi
8d727de8f9 [llvm-ifs][NFC] Adds TODO comment for dropping ObjectFileFormat on yaml format. 2019-10-24 10:14:34 -07:00
Cyndy Ishida
5392f0f014 [TextAPI] Arch&Platform to Target
Summary:
This is a patch for updating TextAPI/Macho to read in targets as opposed to arch/platform.
This is because in previous versions tbd files only supported a single platform but that is no longer the case,
so, now its tracked by unique triples.
This precedes a seperate patch that will add  the TBD-v4 format

Reviewers: ributzka, steven_wu, plotfi, compnerd, smeenai

Reviewed By: ributzka

Subscribers: mgorny, hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

llvm-svn: 372396
2019-09-20 14:32:34 +00:00
George Rimar
676775660f [yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers.
This is a continuation of the YAML library error reporting
refactoring/improvement and the idea by itself was mentioned
in the following thread:
https://reviews.llvm.org/D67182?id=218714#inline-603404

This performs a cleanup of all object emitters in the library.
It allows using the custom one provided by the caller.

One of the nice things is that each tool can now print its tool name,
e.g: "yaml2obj: error: <text>"

Also, the code became a bit simpler.

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

llvm-svn: 371865
2019-09-13 16:00:16 +00:00
Puyan Lotfi
4deeb56a0f [llvm-ifs] Improving detection of PlatformKind from triple for TBD generation.
It was pointed out that I had hard-coded PlatformKind. This is rectifying that.

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

llvm-svn: 371248
2019-09-06 19:59:59 +00:00
Puyan Lotfi
31a7e50db7 [IFS][NFC] llvm-ifs: Fixing build bot build break: revert r370517 and r370510.
llvm-svn: 370522
2019-08-30 20:25:46 +00:00
Puyan Lotfi
d63fc8cc9e [IFS][NFC] llvm-ifs: Fixing build bot error due to commit conflicts.
r370510 and r370504

Again only on gcc.

llvm-svn: 370517
2019-08-30 20:09:55 +00:00
Puyan Lotfi
0d053c126a [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++).

llvm-svn: 370510
2019-08-30 19:54:46 +00:00
Michael Liao
ab94c7a42e Fix compilation warnings. NFC.
llvm-svn: 370504
2019-08-30 19:23:28 +00:00
Puyan Lotfi
e0c741cd7e [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

llvm-svn: 370499
2019-08-30 18:26:05 +00:00