DebugInfo: Use new LLVM API for DebugLoc
Use the new API for `DebugLoc` added in r233573 before the old one disappears. llvm-svn: 233589
This commit is contained in:
parent
d7eef87e65
commit
2809cc7493
|
@ -2380,7 +2380,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
|
|||
Ret = Builder.CreateRetVoid();
|
||||
}
|
||||
|
||||
if (!RetDbgLoc.isUnknown())
|
||||
if (RetDbgLoc)
|
||||
Ret->setDebugLoc(std::move(RetDbgLoc));
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ ApplyDebugLocation::ApplyDebugLocation(CodeGenFunction &CGF, llvm::DebugLoc Loc)
|
|||
: CGF(CGF) {
|
||||
if (CGF.getDebugInfo()) {
|
||||
OriginalLocation = CGF.Builder.getCurrentDebugLocation();
|
||||
if (!Loc.isUnknown())
|
||||
if (Loc)
|
||||
CGF.Builder.SetCurrentDebugLocation(std::move(Loc));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2350,7 +2350,7 @@ static void replaceUsesOfNonProtoConstant(llvm::Constant *old,
|
|||
callSite->replaceAllUsesWith(newCall.getInstruction());
|
||||
|
||||
// Copy debug location attached to CI.
|
||||
if (!callSite->getDebugLoc().isUnknown())
|
||||
if (callSite->getDebugLoc())
|
||||
newCall->setDebugLoc(callSite->getDebugLoc());
|
||||
callSite->eraseFromParent();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue