add the ability to get the llvm function corresponding to a library builtin.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@41633 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/CodeGen/CodeGenModule.h b/CodeGen/CodeGenModule.h
index 97d6a02..af2db80 100644
--- a/CodeGen/CodeGenModule.h
+++ b/CodeGen/CodeGenModule.h
@@ -44,6 +44,8 @@
llvm::StringMap<llvm::Constant*> CFConstantStringMap;
llvm::Constant *CFConstantStringClassRef;
+
+ std::vector<llvm::Function *> BuiltinFunctions;
public:
CodeGenModule(ASTContext &C, llvm::Module &M);
@@ -52,9 +54,15 @@
CodeGenTypes &getTypes() { return Types; }
llvm::Constant *GetAddrOfGlobalDecl(const Decl *D);
+
+ /// getBuiltinLibFunction - Given a builtin id for a function like
+ /// "__builtin_fabsf", return a Function* for "fabsf".
+ ///
+ llvm::Function *getBuiltinLibFunction(unsigned BuiltinID);
llvm::Constant *GetAddrOfConstantCFString(const std::string& str);
llvm::Function *getMemCpyFn();
+
void EmitFunction(const FunctionDecl *FD);
void EmitGlobalVar(const FileVarDecl *D);
void EmitGlobalVarDeclarator(const FileVarDecl *D);