Skip to content

Commit b7efa97

Browse files
committed
[LLVM10] use M->global_object().{begin|end}()
1 parent b81321d commit b7efa97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/jitlayers.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ void JuliaOJIT::addModule(std::unique_ptr<Module> M)
460460
{
461461
#ifndef JL_NDEBUG
462462
// validate the relocations for M
463-
for (Module::global_object_iterator I = M->global_object_begin(), E = M->global_object_end(); I != E; ) {
463+
for (Module::global_object_iterator I = M->global_objects().begin(), E = M->global_objects().end(); I != E; ) {
464464
GlobalObject *F = &*I;
465465
++I;
466466
if (F->isDeclaration()) {
@@ -771,7 +771,7 @@ static void jl_merge_recursive(Module *m, Module *collector)
771771
// since the declarations may get destroyed by the jl_merge_module call.
772772
// this is also why we copy the Name string, rather than save a StringRef
773773
SmallVector<std::string, 8> to_finalize;
774-
for (Module::global_object_iterator I = m->global_object_begin(), E = m->global_object_end(); I != E; ++I) {
774+
for (Module::global_object_iterator I = m->global_objects().begin(), E = m->global_objects().end(); I != E; ++I) {
775775
GlobalObject *F = &*I;
776776
if (!F->isDeclaration()) {
777777
module_for_fname.erase(F->getName());
@@ -846,7 +846,7 @@ void jl_finalize_module(Module *m, bool shadow)
846846
{
847847
// record the function names that are part of this Module
848848
// so it can be added to the JIT when needed
849-
for (Module::global_object_iterator I = m->global_object_begin(), E = m->global_object_end(); I != E; ++I) {
849+
for (Module::global_object_iterator I = m->global_objects().begin(), E = m->global_objects().end(); I != E; ++I) {
850850
GlobalObject *F = &*I;
851851
if (!F->isDeclaration()) {
852852
if (isa<Function>(F)) {

0 commit comments

Comments
 (0)