summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-07-16 00:00:19 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-07-16 00:00:19 +0000
commit3348e2d17528d8f5aab3fed0a53c1cddcf07adf8 (patch)
tree4083f92eae907eed1a4c46cbc9f0ee31cfaa4db2 /clang/lib/CodeGen/CodeGenModule.h
parent900546d2e306ee1864a3ca1ba1331e62ba22d0fe (diff)
downloadbcm5719-llvm-3348e2d17528d8f5aab3fed0a53c1cddcf07adf8.tar.gz
bcm5719-llvm-3348e2d17528d8f5aab3fed0a53c1cddcf07adf8.zip
IRgen: Support user defined attributes on block runtime functions.
- This issue here is that /usr/include/Blocks.h wants to define some of the block runtime globals as weak, depending on the target. This doesn't work in Clang because we aren't using the AST decl for these globals. - The fix is a pretty gross hack which just watches all the decls for the specific blocks globals we need to know about; if we see one we use it, otherwise we use the hand coded type. In time, I would like to clean this up by changing IRgen to ask Sema/AST for the decl, which would then be lazily loaded from the builtin table if necessary. This could be used in a whole host of places in IRgen and would get rid of a lot of grotty hand coding of LLVM IR; however, we need some extra Sema support for this as well as support for builtin global variables. llvm-svn: 108482
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h
index f3bd3071298..420900acdfe 100644
--- a/clang/lib/CodeGen/CodeGenModule.h
+++ b/clang/lib/CodeGen/CodeGenModule.h
@@ -197,8 +197,13 @@ class CodeGenModule : public BlockModule {
/// @name Cache for Blocks Runtime Globals
/// @{
+ const VarDecl *NSConcreteGlobalBlockDecl;
+ const VarDecl *NSConcreteStackBlockDecl;
llvm::Constant *NSConcreteGlobalBlock;
llvm::Constant *NSConcreteStackBlock;
+
+ const FunctionDecl *BlockObjectAssignDecl;
+ const FunctionDecl *BlockObjectDisposeDecl;
llvm::Constant *BlockObjectAssign;
llvm::Constant *BlockObjectDispose;
OpenPOWER on IntegriCloud