File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,12 @@ extern "C" RustArchiveIterator*
79
79
LLVMRustArchiveIteratorNew (RustArchive *ra) {
80
80
Archive *ar = ra->getBinary ();
81
81
RustArchiveIterator *rai = new RustArchiveIterator ();
82
+ #if LLVM_VERSION_MINOR >= 9
83
+ Error err;
84
+ rai->cur = ar->child_begin (err);
85
+ #else
82
86
rai->cur = ar->child_begin ();
87
+ #endif
83
88
rai->end = ar->child_end ();
84
89
return rai;
85
90
}
@@ -88,8 +93,8 @@ extern "C" const Archive::Child*
88
93
LLVMRustArchiveIteratorNext (RustArchiveIterator *rai) {
89
94
if (rai->cur == rai->end )
90
95
return NULL ;
91
- #if LLVM_VERSION_MINOR > = 8
92
- const ErrorOr< Archive::Child> * cur = rai->cur .operator ->();
96
+ #if LLVM_VERSION_MINOR = = 8
97
+ Archive::Child* cur = rai->cur .operator ->();
93
98
if (!*cur) {
94
99
LLVMRustSetLastError (cur->getError ().message ().c_str ());
95
100
return NULL ;
You can’t perform that action at this time.
0 commit comments