1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
Commit Graph

11 Commits

Author SHA1 Message Date
Simon Pilgrim
a7159bc3c5 BitstreamRemarkParser.h - remove unnecessary includes. NFCI.
Remove unused includes, moving to the lib header or cpp file as necessary.
2020-08-06 13:17:53 +01: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
Francis Visoiu Mistrih
600ec0d5c6 [Remarks] Allow empty temporary remark files
When parsing bitstream remarks, allow external remark files to be
empty, which means there are no remarks to be parsed.

In the same way, dsymutil should not produce a remark file.
2019-11-22 15:58:12 -08:00
Simon Pilgrim
9ab18a0df9 Remarks - fix static analyzer warnings. NFCI.
- Fix uninitialized variable warnings.
 - Reuse BitstreamEntry iterator to avoid Wshadow warning.
 - Match declaration + definition arg names in BitstreamRemarkParser::processCommonMeta
 - Make BitstreamRemarkParser(StringRef) constructor explicit
2019-11-09 13:01:05 +00:00
Simon Pilgrim
e9931c5ad6 Remarks - fix shadow variable warnings. NFCI.
Avoid conflict with llvm::remarks::Magic global variable.
2019-11-09 13:01:03 +00:00
Francis Visoiu Mistrih
c7ec133d42 [Remarks] Add support for prepending a path to external files
This helps with testing and debugging for paths that are assumed
absolute.

It also uses a FileError to provide the file path it's trying to open.

llvm-svn: 375008
2019-10-16 15:40:59 +00:00
Simon Pilgrim
d76e3d6750 Fix MSVC "not all control paths return a value" warning. NFCI.
llvm-svn: 371454
2019-09-09 21:30:11 +00:00
Francis Visoiu Mistrih
07b0f15f9a [Remarks] Fix warning for uint8_t < 0 comparison
http://lab.llvm.org:8011/builders/clang-with-thin-lto-ubuntu/builds/19109/steps/build-stage1-compiler/logs/stdio

llvm-svn: 371443
2019-09-09 19:47:25 +00:00
Francis Visoiu Mistrih
c0b919738c [Remarks] Add parser for bitstream remarks
The bitstream remark serializer landed in r367372.

This adds a bitstream remark parser that parser bitstream remark files
to llvm::remarks::Remark objects through the RemarkParser interface.

A few interesting things to point out:

* There are parsing helpers to parse the different types of blocks
* The main parsing helper allows us to parse remark metadata and open an
external file containing the encoded remarks
* This adds a dependency from the Remarks library to the BitstreamReader
library
* The testing strategy is to create a remark entry through YAML, parse
it, serialize it to bitstream, parse that back and compare the objects.
* There are close to no tests for malformed bitstream remarks, due to
the lack of textual format for the bitstream format.
* This adds a new C API for parsing bitstream remarks:
LLVMRemarkParserCreateBitstream.
* This bumps the REMARKS_API_VERSION to 1.

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

llvm-svn: 371429
2019-09-09 17:43:50 +00:00