Fix PR3612.  We ensure that we add builtins to the GlobalDeclMap and
we ensure that things added to the module can be found even when they
are not in GlobalDeclMap.  The later is for increased flexibility,
should someone want to do something tricky like extern "Ada" in the
same module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65657 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h
index 3a98bb7..093a9b1 100644
--- a/lib/CodeGen/CodeGenModule.h
+++ b/lib/CodeGen/CodeGenModule.h
@@ -154,7 +154,7 @@
     int GlobalUniqueCount;
   } Block;
 
-  std::vector<llvm::Function *> BuiltinFunctions;
+  std::vector<llvm::Value *> BuiltinFunctions;
 public:
   CodeGenModule(ASTContext &C, const LangOptions &Features, llvm::Module &M,
                 const llvm::TargetData &TD, Diagnostic &Diags,
@@ -243,7 +243,7 @@
 
   /// getBuiltinLibFunction - Given a builtin id for a function like
   /// "__builtin_fabsf", return a Function* for "fabsf".
-  llvm::Function *getBuiltinLibFunction(unsigned BuiltinID);
+  llvm::Value *getBuiltinLibFunction(unsigned BuiltinID);
 
   llvm::Function *getMemCpyFn();
   llvm::Function *getMemMoveFn();