[cfe-commits] r141730 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Eric Christopher echristo at apple.com
Tue Oct 11 16:00:45 PDT 2011


Author: echristo
Date: Tue Oct 11 18:00:45 2011
New Revision: 141730

URL: http://llvm.org/viewvc/llvm-project?rev=141730&view=rev
Log:
Reorder this to make it easier to add more changes for a location set.

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

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=141730&r1=141729&r2=141730&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Oct 11 18:00:45 2011
@@ -50,8 +50,10 @@
 }
 
 void CGDebugInfo::setLocation(SourceLocation Loc) {
-  if (Loc.isValid())
-    CurLoc = CGM.getContext().getSourceManager().getExpansionLoc(Loc);
+  // If the new location isn't valid return.
+  if (!Loc.isValid()) return;
+
+  CurLoc = CGM.getContext().getSourceManager().getExpansionLoc(Loc);
 }
 
 /// getContextDescriptor - Get context info for the decl.





More information about the cfe-commits mailing list