diff --git a/src/jitlayers.cpp b/src/jitlayers.cpp index 6f696b327fd96..3394dc9d53347 100644 --- a/src/jitlayers.cpp +++ b/src/jitlayers.cpp @@ -216,7 +216,11 @@ class DebugObjectRegistrar { auto oit = Objects.begin(); auto lit = LOS.begin(); while (oit != Objects.end()) { +#ifdef LLVM39 + const auto &Object = (*oit)->getBinary(); +#else auto &Object = *oit; +#endif auto &LO = *lit; OwningBinary SavedObject = LO->getObjectForDebug(*Object);