diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-07-01 12:56:27 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-07-01 12:56:27 +0000 |
commit | 6def304209dd2152457c1ffda7330a6ac4e076f1 (patch) | |
tree | f0b47d1c1dcc683f50552e6850ac19aa6987ed58 /llvm/test/Object | |
parent | 6ae400d12256de0547c1b06919d126f664c78d7e (diff) | |
download | bcm5719-llvm-6def304209dd2152457c1ffda7330a6ac4e076f1.tar.gz bcm5719-llvm-6def304209dd2152457c1ffda7330a6ac4e076f1.zip |
Return ErrorOr from getSection.
This also improves the logic of what is an error:
* getSection(uint_32): only return an error if the index is out of bounds. The
index 0 corresponds to a perfectly valid entry.
* getSection(Elf_Sym): Returns null for symbols that normally don't have
sections and error for out of bound indexes.
In many places this just moves the report_fatal_error up the stack, but those
can then be fixed in smaller patches.
llvm-svn: 241156
Diffstat (limited to 'llvm/test/Object')
-rw-r--r-- | llvm/test/Object/invalid.test | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Object/invalid.test b/llvm/test/Object/invalid.test index 75402631c9f..2f42bde6dc6 100644 --- a/llvm/test/Object/invalid.test +++ b/llvm/test/Object/invalid.test @@ -40,7 +40,7 @@ INVALID-SYM-SIZE: Invalid symbol size RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-INDEX %s -INVALID-SECTION-INDEX: Invalid section index! +INVALID-SECTION-INDEX: Invalid section index RUN: not llvm-readobj -s %p/Inputs/invalid-section-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-SIZE %s INVALID-SECTION-SIZE: Invalid section header size |