Set function attributes (sext, zext, etc.) on Objective-C methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55812 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp
index f7b8efb..8660d96 100644
--- a/lib/CodeGen/CGObjC.cpp
+++ b/lib/CodeGen/CGObjC.cpp
@@ -106,6 +106,9 @@
 // FIXME: This should really be merged with GenerateCode.
 void CodeGenFunction::StartObjCMethod(const ObjCMethodDecl *OMD) {
   CurFn = CGM.getObjCRuntime().GenerateMethod(OMD);
+
+  CGM.SetMethodAttributes(OMD, CurFn);
+  
   llvm::BasicBlock *EntryBB = llvm::BasicBlock::Create("entry", CurFn);
   
   // Create a marker to make it easy to insert allocas into the entryblock