add the ability to get the llvm function corresponding to a library builtin.
llvm-svn: 41633
diff --git a/clang/CodeGen/CodeGenModule.h b/clang/CodeGen/CodeGenModule.h
index 97d6a02..af2db80 100644
--- a/clang/CodeGen/CodeGenModule.h
+++ b/clang/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);