Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().

This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49748 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 2ca71c3..ace494c 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -541,11 +541,13 @@
       ValueDecl *Decl = cast<DeclRefExpr>(E)->getDecl();
       if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(Decl))
         return CGM.GetAddrOfFunctionDecl(FD, false);
-      if (const FileVarDecl* VD = dyn_cast<FileVarDecl>(Decl))
-        return CGM.GetAddrOfGlobalVar(VD, false);
-      if (const BlockVarDecl* BVD = dyn_cast<BlockVarDecl>(Decl)) {
-        assert(CGF && "Can't access static local vars without CGF");
-        return CGF->GetAddrOfStaticLocalVar(BVD);
+      if (const VarDecl* VD = dyn_cast<VarDecl>(Decl)) {
+        if (VD->isFileVarDecl())
+          return CGM.GetAddrOfGlobalVar(VD, false);
+        else if (VD->isBlockVarDecl()) {
+          assert(CGF && "Can't access static local vars without CGF");
+          return CGF->GetAddrOfStaticLocalVar(VD);
+        }
       }
       break;
     }