mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-26 05:36:36 +00:00

The aim of this patch is to refactor how we handle and report error. I suggest to use the same approach we use in LLD: delayed error reporting. For that I introduced 'HasError' flag which triggers when we report an error. Now we do not exit instantly on any error. The benefits are: 1) There are no more 'exit(1)' calls in the library code. 2) Code was simplified significantly in a few places. 3) It is now possible to print multiple errors instead of only one. Also, I changed the messages to be lower case and removed a full stop. Differential revision: https://reviews.llvm.org/D67182 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371380 91177308-0d34-0410-b5e6-96231b3b80d8
23 lines
576 B
YAML
23 lines
576 B
YAML
## Check we report an error when SHT_GROUP references an unknown section in its member list.
|
|
|
|
# RUN: not yaml2obj %s 2>&1 | FileCheck %s
|
|
|
|
# CHECK: error: unknown section referenced: '.foo' by YAML section '.group'
|
|
# CHECK: error: unknown section referenced: '.bar' by YAML section '.group'
|
|
|
|
--- !ELF
|
|
FileHeader:
|
|
Class: ELFCLASS64
|
|
Data: ELFDATA2LSB
|
|
Type: ET_REL
|
|
Machine: EM_X86_64
|
|
Sections:
|
|
- Name: .group
|
|
Type: SHT_GROUP
|
|
Link: .symtab
|
|
Info: 0
|
|
Members:
|
|
- SectionOrType: GRP_COMDAT
|
|
- SectionOrType: .foo
|
|
- SectionOrType: .bar
|