If given location is invalid then use current location.
This fixes recent regressions reported by gdb testsuite. 
Tighter verification of debug info generated by FE found these regressions.

Refactor code to extract line number and column number from SourceLocation.

llvm-svn: 103678
diff --git a/clang/lib/CodeGen/CGDebugInfo.h b/clang/lib/CodeGen/CGDebugInfo.h
index c16379a..c484d4f 100644
--- a/clang/lib/CodeGen/CGDebugInfo.h
+++ b/clang/lib/CodeGen/CGDebugInfo.h
@@ -208,6 +208,13 @@
   /// getVTableName - Get vtable name for the given Class.
   llvm::StringRef getVTableName(const CXXRecordDecl *Decl);
 
+  /// getLineNumber - Get line number for the location. If location is invalid
+  /// then use current location.
+  unsigned getLineNumber(SourceLocation Loc);
+
+  /// getColumnNumber - Get column number for the location. If location is 
+  /// invalid then use current location.
+  unsigned getColumnNumber(SourceLocation Loc);
 };
 } // namespace CodeGen
 } // namespace clang