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:
Duncan P. N. Exon Smith 2015-03-30 20:01:41 +00:00
parent d7eef87e65
commit 2809cc7493
3 changed files with 3 additions and 3 deletions

View File

@ -2380,7 +2380,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
Ret = Builder.CreateRetVoid();
}
if (!RetDbgLoc.isUnknown())
if (RetDbgLoc)
Ret->setDebugLoc(std::move(RetDbgLoc));
}

View File

@ -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));
}
}

View File

@ -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();
}