[LLVM-3.9] Use old way of getting next child
This was changed back in
aacf2fbf
This commit is contained in:
parent
d0e5aa4820
commit
f439aeef07
1 changed files with 7 additions and 2 deletions
|
@ -79,7 +79,12 @@ extern "C" RustArchiveIterator*
|
|||
LLVMRustArchiveIteratorNew(RustArchive *ra) {
|
||||
Archive *ar = ra->getBinary();
|
||||
RustArchiveIterator *rai = new RustArchiveIterator();
|
||||
#if LLVM_VERSION_MINOR >= 9
|
||||
Error err;
|
||||
rai->cur = ar->child_begin(err);
|
||||
#else
|
||||
rai->cur = ar->child_begin();
|
||||
#endif
|
||||
rai->end = ar->child_end();
|
||||
return rai;
|
||||
}
|
||||
|
@ -88,8 +93,8 @@ extern "C" const Archive::Child*
|
|||
LLVMRustArchiveIteratorNext(RustArchiveIterator *rai) {
|
||||
if (rai->cur == rai->end)
|
||||
return NULL;
|
||||
#if LLVM_VERSION_MINOR >= 8
|
||||
const ErrorOr<Archive::Child>* cur = rai->cur.operator->();
|
||||
#if LLVM_VERSION_MINOR == 8
|
||||
Archive::Child* cur = rai->cur.operator->();
|
||||
if (!*cur) {
|
||||
LLVMRustSetLastError(cur->getError().message().c_str());
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue