diff options
author | Chris Lattner <sabre@nondot.org> | 2007-08-31 04:31:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-08-31 04:31:45 +0000 |
commit | 1eec6601d9f3bcc7d571814cbb371600607baf01 (patch) | |
tree | 131abea5d8a67df9f57747a036f541bbee5b5bce /clang/CodeGen/CodeGenModule.h | |
parent | 3cf889f75ef6e4ae454ddb72fdf7bdeb89193f0a (diff) | |
download | bcm5719-llvm-1eec6601d9f3bcc7d571814cbb371600607baf01.tar.gz bcm5719-llvm-1eec6601d9f3bcc7d571814cbb371600607baf01.zip |
add the ability to get the llvm function corresponding to a library builtin.
llvm-svn: 41633
Diffstat (limited to 'clang/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/CodeGen/CodeGenModule.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/CodeGen/CodeGenModule.h b/clang/CodeGen/CodeGenModule.h index 97d6a02f47f..af2db808400 100644 --- a/clang/CodeGen/CodeGenModule.h +++ b/clang/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); |