r233589 - DebugInfo: Use new LLVM API for DebugLoc

Duncan P. N. Exon Smith dexonsmith at apple.com
Mon Mar 30 13:01:41 PDT 2015


Author: dexonsmith
Date: Mon Mar 30 15:01:41 2015
New Revision: 233589

URL: http://llvm.org/viewvc/llvm-project?rev=233589&view=rev
Log:
DebugInfo: Use new LLVM API for DebugLoc

Use the new API for `DebugLoc` added in r233573 before the old one
disappears.

Modified:
    cfe/trunk/lib/CodeGen/CGCall.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
    cfe/trunk/lib/CodeGen/CodeGenModule.cpp

Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=233589&r1=233588&r2=233589&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Mon Mar 30 15:01:41 2015
@@ -2380,7 +2380,7 @@ void CodeGenFunction::EmitFunctionEpilog
     Ret = Builder.CreateRetVoid();
   }
 
-  if (!RetDbgLoc.isUnknown())
+  if (RetDbgLoc)
     Ret->setDebugLoc(std::move(RetDbgLoc));
 }
 

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=233589&r1=233588&r2=233589&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Mar 30 15:01:41 2015
@@ -92,7 +92,7 @@ ApplyDebugLocation::ApplyDebugLocation(C
     : CGF(CGF) {
   if (CGF.getDebugInfo()) {
     OriginalLocation = CGF.Builder.getCurrentDebugLocation();
-    if (!Loc.isUnknown())
+    if (Loc)
       CGF.Builder.SetCurrentDebugLocation(std::move(Loc));
   }
 }

Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=233589&r1=233588&r2=233589&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Mar 30 15:01:41 2015
@@ -2350,7 +2350,7 @@ static void replaceUsesOfNonProtoConstan
       callSite->replaceAllUsesWith(newCall.getInstruction());
 
     // Copy debug location attached to CI.
-    if (!callSite->getDebugLoc().isUnknown())
+    if (callSite->getDebugLoc())
       newCall->setDebugLoc(callSite->getDebugLoc());
     callSite->eraseFromParent();
   }





More information about the cfe-commits mailing list