diff --git lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGBlocks.cpp
index 1389749..062058c 100644
--- lib/CodeGen/CGBlocks.cpp
+++ lib/CodeGen/CGBlocks.cpp
@@ -1189,6 +1189,10 @@ CodeGenFunction::GenerateBlockFunction(GlobalDecl GD,
       fnLLVMType, llvm::GlobalValue::InternalLinkage, name, &CGM.getModule());
   CGM.SetInternalFunctionAttributes(blockDecl, fn, fnInfo);
 
+  // Emit annotation attributes for ObjC blocks.
+  if (blockDecl->hasAttr<AnnotateAttr>())
+    CGM.AddGlobalAnnotations(blockDecl, fn);
+
   // Begin generating the function.
   StartFunction(blockDecl, fnType->getReturnType(), fn, fnInfo, args,
                 blockDecl->getLocation(),
diff --git lib/CodeGen/CGObjC.cpp lib/CodeGen/CGObjC.cpp
index 7fb6a36..d5264f0 100644
--- lib/CodeGen/CGObjC.cpp
+++ lib/CodeGen/CGObjC.cpp
@@ -525,6 +525,10 @@ void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD,
 
   llvm::Function *Fn = CGM.getObjCRuntime().GenerateMethod(OMD, CD);
 
+  // Emit annotation attributes for ObjC methods.
+  if (OMD->hasAttr<AnnotateAttr>())
+    CGM.AddGlobalAnnotations(OMD, Fn);
+
   const CGFunctionInfo &FI = CGM.getTypes().arrangeObjCMethodDeclaration(OMD);
   CGM.SetInternalFunctionAttributes(OMD, Fn, FI);
 
diff --git lib/CodeGen/CodeGenModule.cpp lib/CodeGen/CodeGenModule.cpp
index 57a6429..7454ef8 100644
--- lib/CodeGen/CodeGenModule.cpp
+++ lib/CodeGen/CodeGenModule.cpp
@@ -1386,7 +1386,7 @@ llvm::Constant *CodeGenModule::EmitAnnotateAttr(llvm::GlobalValue *GV,
   return llvm::ConstantStruct::getAnon(Fields);
 }
 
-void CodeGenModule::AddGlobalAnnotations(const ValueDecl *D,
+void CodeGenModule::AddGlobalAnnotations(const Decl *D,
                                          llvm::GlobalValue *GV) {
   assert(D->hasAttr<AnnotateAttr>() && "no annotate attribute");
   // Get the struct elements for these annotations.
diff --git lib/CodeGen/CodeGenModule.h lib/CodeGen/CodeGenModule.h
index a75e4aa..32bdac5 100644
--- lib/CodeGen/CodeGenModule.h
+++ lib/CodeGen/CodeGenModule.h
@@ -1059,7 +1059,7 @@ public:
 
   /// Add global annotations that are set on D, for the global GV. Those
   /// annotations are emitted during finalization of the LLVM code.
-  void AddGlobalAnnotations(const ValueDecl *D, llvm::GlobalValue *GV);
+  void AddGlobalAnnotations(const Decl *D, llvm::GlobalValue *GV);
 
   bool isInSanitizerBlacklist(llvm::Function *Fn, SourceLocation Loc) const;
 
