]> granicus.if.org Git - clang/commitdiff
DebugInfo: Use new LLVM API for DebugLoc
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 30 Mar 2015 20:01:41 +0000 (20:01 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 30 Mar 2015 20:01:41 +0000 (20:01 +0000)
Use the new API for `DebugLoc` added in r233573 before the old one
disappears.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233589 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CodeGenModule.cpp

index d39776191f34f1f41f235839a7e6d54ffad23a73..b3adfe4845f8f999d602f24fc749c6de8dff3f3f 100644 (file)
@@ -2380,7 +2380,7 @@ void CodeGenFunction::EmitFunctionEpilog(const CGFunctionInfo &FI,
     Ret = Builder.CreateRetVoid();
   }
 
-  if (!RetDbgLoc.isUnknown())
+  if (RetDbgLoc)
     Ret->setDebugLoc(std::move(RetDbgLoc));
 }
 
index 1e30cb69bbb432e53901bacac3dbfddb8564a0d1..811486cf3ab9e7d1fc0d5a14310c36f19208662a 100644 (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));
   }
 }
index ae511ae4fe405f0d6144aa80e39cbe2e68276b26..9abc885d930257d5b5e6ef2257ebcec8e1f00ae2 100644 (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();
   }