diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-16 05:23:44 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-16 05:23:44 +0000 |
commit | a6375560645177168099f1a1d96be8fa4718aa8e (patch) | |
tree | d9aa46214b5b6225d73237f05c0572b50b3b433b /lib/CodeGen/CGObjCMac.cpp | |
parent | bc9e5ffb0d0757238c071764e4bc1fc8a1521097 (diff) |
Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjCMac.cpp')
-rw-r--r-- | lib/CodeGen/CGObjCMac.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index c89171db55..4a165ce46e 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -63,13 +63,11 @@ private: // Add the non-lazy-bind attribute, since objc_msgSend is likely to // be called a lot. llvm::Type *params[] = { ObjectPtrTy, SelectorPtrTy }; - llvm::AttrBuilder B; - B.addAttribute(llvm::Attributes::NonLazyBind); return CGM.CreateRuntimeFunction(llvm::FunctionType::get(ObjectPtrTy, params, true), "objc_msgSend", llvm::Attributes::get(CGM.getLLVMContext(), - B)); + llvm::Attributes::NonLazyBind)); } /// void objc_msgSend_stret (id, SEL, ...) @@ -583,13 +581,11 @@ public: llvm::Constant *getSetJmpFn() { // This is specifically the prototype for x86. llvm::Type *params[] = { CGM.Int32Ty->getPointerTo() }; - llvm::AttrBuilder B; - B.addAttribute(llvm::Attributes::NonLazyBind); return CGM.CreateRuntimeFunction(llvm::FunctionType::get(CGM.Int32Ty, params, false), "_setjmp", llvm::Attributes::get(CGM.getLLVMContext(), - B)); + llvm::Attributes::NonLazyBind)); } public: |