diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-10-28 02:30:47 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-10-28 02:30:47 +0000 |
commit | 44a59f89764472e301c97faa480d461bf7c2e29b (patch) | |
tree | 29b1b6e736aedd16b07a3e9e43386db180da1e7a /clang/lib/CodeGen/CGObjC.cpp | |
parent | c3ceb2769005f8f027daf82db00a084bc80c0229 (diff) | |
download | bcm5719-llvm-44a59f89764472e301c97faa480d461bf7c2e29b.tar.gz bcm5719-llvm-44a59f89764472e301c97faa480d461bf7c2e29b.zip |
[CodeGen] Attach function attributes to Objective-C and OpenMP
functions.
This commit fixes a bug in CGOpenMPRuntime.cpp and CGObjC.cpp where
some of the function attributes are not attached to newly created
functions.
rdar://problem/20828324
Differential Revision: http://reviews.llvm.org/D13928
llvm-svn: 251476
Diffstat (limited to 'clang/lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index fce74095148..766102e723e 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/lib/CodeGen/CGObjC.cpp @@ -2944,7 +2944,9 @@ CodeGenFunction::GenerateObjCAtomicSetterCopyHelperFunction( llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage, "__assign_helper_atomic_property_", &CGM.getModule()); - + + CGM.SetInternalFunctionAttributes(nullptr, Fn, FI); + StartFunction(FD, C.VoidTy, Fn, FI, args); DeclRefExpr DstExpr(&dstDecl, false, DestTy, @@ -3023,6 +3025,8 @@ CodeGenFunction::GenerateObjCAtomicGetterCopyHelperFunction( llvm::Function::Create(LTy, llvm::GlobalValue::InternalLinkage, "__copy_helper_atomic_property_", &CGM.getModule()); + CGM.SetInternalFunctionAttributes(nullptr, Fn, FI); + StartFunction(FD, C.VoidTy, Fn, FI, args); DeclRefExpr SrcExpr(&srcDecl, false, SrcTy, |