Skip to content
  • Daniel Dunbar's avatar
    IRgen: Support user defined attributes on block runtime functions. · 3348e2d1
    Daniel Dunbar authored
     - 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
    3348e2d1
Loading