Change CGDebugInfo::setLocation to just ignore invalid locations. This
simplifies clients.

Also, add assert that RegionStack is empty when the CGDebugInfo is
destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57684 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index a74f057..a8d8825 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/lib/CodeGen/CodeGenModule.cpp
@@ -615,8 +615,7 @@
   // Emit global variable debug information.
   CGDebugInfo *DI = getDebugInfo();
   if(DI) {
-    if(D->getLocation().isValid())
-      DI->setLocation(D->getLocation());
+    DI->setLocation(D->getLocation());
     DI->EmitGlobalVariable(GV, D);
   }
 }