diff --git a/src/cgutils.cpp b/src/cgutils.cpp index 4fd6c2e4ca415..eafb2bd0d25b6 100644 --- a/src/cgutils.cpp +++ b/src/cgutils.cpp @@ -629,7 +629,11 @@ static jl_value_t *julia_type_of(Value *v) MDNode *mdn; assert(v != NULL); if (dyn_cast(v) == NULL || +#ifdef LLVM36 + (mdn = ((Instruction*)v)->getMDNode("julia_type")) == NULL) { +#else (mdn = ((Instruction*)v)->getMetadata("julia_type")) == NULL) { +#endif return julia_type_of_without_metadata(v, true); } MDString *md = (MDString*)mdn->getOperand(0); diff --git a/src/debuginfo.cpp b/src/debuginfo.cpp index 6c46922638383..7c8790993e32d 100644 --- a/src/debuginfo.cpp +++ b/src/debuginfo.cpp @@ -364,8 +364,9 @@ void jl_getDylibFunctionInfo(const char **name, size_t *line, const char **filen #endif #ifdef LLVM36 if (errorobj) { - obj = errorobj.get().getBinary().release(); - errorobj.get().getBuffer().release(); + auto binary = errorobj.get().takeBinary(); + obj = binary.first.release(); + binary.second.release(); #elif LLVM35 if (errorobj) { obj = errorobj.get();