summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 20:01:41 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 20:01:41 +0000
commit2809cc74931e03f52fe2739b246677b71742b67f (patch)
treee3e625eb2ede7df252d5edec6edc10aab518bee4 /clang/lib/CodeGen
parentd7eef87e6580219b241d6b434b4dced8cd1ebdc8 (diff)
downloadbcm5719-llvm-2809cc74931e03f52fe2739b246677b71742b67f.tar.gz
bcm5719-llvm-2809cc74931e03f52fe2739b246677b71742b67f.zip
DebugInfo: Use new LLVM API for DebugLoc
Use the new API for `DebugLoc` added in r233573 before the old one disappears. llvm-svn: 233589
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp2
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp2
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index d39776191f3..b3adfe4845f 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -2380,7 +2380,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
Ret = Builder.CreateRetVoid();
}
- if (!RetDbgLoc.isUnknown())
+ if (RetDbgLoc)
Ret->setDebugLoc(std::move(RetDbgLoc));
}
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 1e30cb69bbb..811486cf3ab 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -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));
}
}
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index ae511ae4fe4..9abc885d930 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -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();
}
OpenPOWER on IntegriCloud