Fix PR2236
Add test
Implement feedback from Chris re: PR1998


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50001 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index aa676d6..e048d59 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -34,9 +34,8 @@
   class Decl;
   class Expr;
   class Stmt;
-  class ValueDecl;
+  class NamedDecl;
   class VarDecl;
-  class TypeDecl;
   struct LangOptions;
   class Diagnostic;
   class AnnotateAttr;
@@ -59,7 +58,7 @@
   llvm::Function *MemCpyFn;
   llvm::Function *MemSetFn;
   llvm::DenseMap<const Decl*, llvm::Constant*> GlobalDeclMap;
-  std::vector<const Decl*> StaticDecls;
+  std::vector<const NamedDecl*> StaticDecls;
   
   std::vector<llvm::Constant*> GlobalCtors;
   std::vector<llvm::Constant*> Annotations;