From 931cb65df27d07f83c06f5a001a5368edf1655f9 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Fri, 24 Jun 2016 18:24:42 +0000 Subject: =?UTF-8?q?Thread=20Expected<...>=20up=20from=20libObject=E2=80=99?= =?UTF-8?q?s=20getSymbolAddress()=20for=20symbols=20to=20allow=20a=20good?= =?UTF-8?q?=20error=20message=20to=20be=20produced.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is nearly the last libObject interface that used ErrorOr and the last one that appears in llvm/include/llvm/Object/MachO.h . For Mach-O objects this is just a clean up because it’s version of getSymbolAddress() can’t return an error. I will leave it to the experts on COFF and ELF to actually add meaning full error messages in their tests if they wish. And also leave it to these experts to change the last two ErrorOr interfaces in llvm/include/llvm/Object/ObjectFile.h for createCOFFObjectFile() and createELFObjectFile() if they wish. Since there are no test cases for COFF and ELF error cases with respect to getSymbolAddress() in the test suite this is no functional change (NFC). llvm-svn: 273701 --- llvm/lib/Object/MachOObjectFile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Object/MachOObjectFile.cpp') diff --git a/llvm/lib/Object/MachOObjectFile.cpp b/llvm/lib/Object/MachOObjectFile.cpp index d7ec3e5..3c88f9f 100644 --- a/llvm/lib/Object/MachOObjectFile.cpp +++ b/llvm/lib/Object/MachOObjectFile.cpp @@ -473,7 +473,7 @@ uint64_t MachOObjectFile::getSymbolValueImpl(DataRefImpl Sym) const { return getNValue(Sym); } -ErrorOr MachOObjectFile::getSymbolAddress(DataRefImpl Sym) const { +Expected MachOObjectFile::getSymbolAddress(DataRefImpl Sym) const { return getSymbolValue(Sym); } -- cgit v1.1