diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp index 7b3e0729f5a74..0e0c012a9d676 100644 --- a/llvm/lib/Transforms/Utils/CloneFunction.cpp +++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp @@ -44,7 +44,7 @@ using namespace llvm; STATISTIC(RemappedAtomMax, "Highest global NextAtomGroup (after mapping)"); void llvm::mapAtomInstance(const DebugLoc &DL, ValueToValueMapTy &VMap) { - auto CurGroup = DL.get()->getAtomGroup(); + auto CurGroup = DL->getAtomGroup(); if (!CurGroup) return; diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 24121465530cd..b4aae88819e5b 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1835,7 +1835,7 @@ static void fixupLineNumbers(Function *Fn, Function::iterator FI, // not-nodebug instructions. FIXME: Possibly worth transferring/generating // an atom for the returned value, otherwise we miss stepping on inlined // nodebug functions (which is different to existing behaviour). - DebugLoc TheCallDL = TheCall->getDebugLoc().get()->getWithoutAtom(); + DebugLoc TheCallDL = TheCall->getDebugLoc()->getWithoutAtom(); auto &Ctx = Fn->getContext(); DILocation *InlinedAtNode = TheCallDL;