aboutsummaryrefslogtreecommitdiff
path: root/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-08-31 04:31:45 +0000
committerChris Lattner <sabre@nondot.org>2007-08-31 04:31:45 +0000
commitbef20ac367a09555b30d6eb3847a81ec164caf88 (patch)
treea8ba296714599bddc30ccdad39080fd7fcc037c7 /CodeGen/CodeGenModule.h
parentd74c15fc0a492fe3ca32cd1865d84911dd0d6e99 (diff)
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
Diffstat (limited to 'CodeGen/CodeGenModule.h')
-rw-r--r--CodeGen/CodeGenModule.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/CodeGen/CodeGenModule.h b/CodeGen/CodeGenModule.h
index 97d6a02f47..af2db80840 100644
--- a/CodeGen/CodeGenModule.h
+++ b/CodeGen/CodeGenModule.h
@@ -44,6 +44,8 @@ class CodeGenModule {
llvm::StringMap<llvm::Constant*> CFConstantStringMap;
llvm::Constant *CFConstantStringClassRef;
+
+ std::vector<llvm::Function *> BuiltinFunctions;
public:
CodeGenModule(ASTContext &C, llvm::Module &M);
@@ -52,9 +54,15 @@ public:
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);