diff options
author | Fabian Groffen <grobian@gentoo.org> | 2017-02-26 18:36:14 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2017-02-26 20:06:16 +0100 |
commit | 796921c93f72e27bcfbdbea701238c1e9458b29c (patch) | |
tree | 2b24b08cfcb347c03930a1a1d63111c28a89f3ee /sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch | |
parent | profiles: Mask dev-vcs/veracity for removal (diff) | |
download | gentoo-796921c93f72e27bcfbdbea701238c1e9458b29c.tar.gz gentoo-796921c93f72e27bcfbdbea701238c1e9458b29c.tar.bz2 gentoo-796921c93f72e27bcfbdbea701238c1e9458b29c.zip |
sys-libs/tapi: initial ebuild by Michael Weiser, bug #609436
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch')
-rw-r--r-- | sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch b/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch new file mode 100644 index 000000000000..814ca30879a0 --- /dev/null +++ b/sys-libs/tapi/files/tapi-1.30-llvm-new-error-api.patch @@ -0,0 +1,65 @@ +--- libtapi-1.30/lib/Core/MachODylibReader.cpp.orig 2017-02-11 21:36:40.000000000 +0100 ++++ libtapi-1.30/lib/Core/MachODylibReader.cpp 2017-02-11 21:48:25.000000000 +0100 +@@ -37,7 +37,11 @@ + } + + auto binaryOrErr = createBinary(bufferRef); ++#if LLVM_NEW_ERROR_API ++ if (binaryOrErr.takeError()) ++#else + if (binaryOrErr.getError()) ++#endif + return FileType::Invalid; + + Binary &bin = *binaryOrErr.get(); +@@ -49,7 +53,11 @@ + for (auto OI = UB->begin_objects(), OE = UB->end_objects(); OI != OE; ++OI) { + auto objOrErr = OI->getAsObjectFile(); + // Ignore archives. ++#if LLVM_NEW_ERROR_API ++ if (objOrErr.takeError()) ++#else + if (objOrErr.getError()) ++#endif + continue; + + auto &obj = *objOrErr.get(); +@@ -228,7 +236,11 @@ + ? SymbolFlags::WeakReferenced + : SymbolFlags::None; + auto symbolName = symbol.getName(); ++#if LLVM_NEW_ERROR_API ++ if (symbolName.takeError()) ++#else + if (symbolName.getError()) ++#endif + continue; + + StringRef name; +@@ -244,8 +256,14 @@ + file->setPath(memBuffer.getBufferIdentifier()); + + auto binaryOrErr = createBinary(memBuffer); ++// no way to figure this out from the headers :-( ++#if LLVM_NEW_ERROR_API ++ if (auto ec = binaryOrErr.takeError()) { ++ file->setErrorCode(llvm::errorToErrorCode(std::move(ec))); ++#else + if (auto ec = binaryOrErr.getError()) { + file->setErrorCode(ec); ++#endif + return std::move(file); + } + +@@ -263,7 +281,11 @@ + auto objOrErr = OI->getAsObjectFile(); + + // Ignore archives. ++#if LLVM_NEW_ERROR_API ++ if (objOrErr.takeError()) ++#else + if (objOrErr.getError()) ++#endif + continue; + + auto &object = *objOrErr.get(); |