diff options
author | Georgii Rymar <grimar@accesssoftek.com> | 2019-12-05 17:59:34 +0300 |
---|---|---|
committer | Georgii Rymar <grimar@accesssoftek.com> | 2019-12-10 13:08:18 +0300 |
commit | dac5ddb482361cde11ac43e94c43acc94a3b78aa (patch) | |
tree | 6d686f62af013b4ffb8fa76918845242c93abb17 /llvm/test/Object/invalid.test | |
parent | bfb53c55b8a825f6ec6bb4170eb80afeaef0fab8 (diff) | |
download | bcm5719-llvm-dac5ddb482361cde11ac43e94c43acc94a3b78aa.tar.gz bcm5719-llvm-dac5ddb482361cde11ac43e94c43acc94a3b78aa.zip |
[llvm-readelf/llvm-readobj] - Improved the error reporting in a few method related to versioning.
I was investigating a change previously discussed that eliminates an excessive
empty lines from the output when we report warnings and errors
(https://reviews.llvm.org/D70826#inline-639055) and found
that we need this refactoring or alike to achieve that.
The problem is that some of our functions that finds symbol versions just
fail instead of returning errors or printing warnings. Another problem
is that they might print a warning on the same line with the regular output.
In this patch I've splitted getting of the version information and dumping of it
for GNU printVersionSymbolSection(). I had to change a few methods to return
Error or Expected<> to do that properly.
Differential revision: https://reviews.llvm.org/D71118
Diffstat (limited to 'llvm/test/Object/invalid.test')
-rw-r--r-- | llvm/test/Object/invalid.test | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test index 91a93b06b96..b47ba6f9fac 100644 --- a/llvm/test/Object/invalid.test +++ b/llvm/test/Object/invalid.test @@ -413,9 +413,9 @@ Symbols: ## Check llvm-readobj reports it. # RUN: yaml2obj %s --docnum=20 -o %t20 -# RUN: not llvm-readobj -dt %t20 2>&1 | FileCheck -DFILE=%t20 --check-prefix=INVALID-VERSION %s +# RUN: llvm-readobj -dt %t20 2>&1 | FileCheck -DFILE=%t20 --check-prefix=INVALID-VERSION %s -# INVALID-VERSION: error: '[[FILE]]': Invalid version entry +# INVALID-VERSION: warning: '[[FILE]]': SHT_GNU_versym section refers to a version index 255 which is missing --- !ELF FileHeader: |