diff --git a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def --- a/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def +++ b/llvm/include/llvm/Frontend/OpenMP/OMPKinds.def @@ -535,11 +535,6 @@ EnumAttr(WillReturn), EnumAttr(NoFree)) : AttributeSet(EnumAttr(NoUnwind))) -__OMP_ATTRS_SET(NoCaptureAttrs, - OptimisticAttributes - ? AttributeSet(EnumAttr(NoCapture)) - : AttributeSet(EnumAttr(NoCapture))) - __OMP_ATTRS_SET(AlwaysInlineAttrs, OptimisticAttributes ? AttributeSet(EnumAttr(AlwaysInline)) @@ -925,7 +920,7 @@ EnumAttr(NoSync), AllocSizeAttr(0, None)), ReturnPtrAttrs, ParamAttrs()) __OMP_RTL_ATTRS(__kmpc_free_shared, DeviceAllocAttrs, AttributeSet(), - ParamAttrs(NoCaptureAttrs)) + ParamAttrs(AttributeSet(EnumAttr(NoCapture), EnumAttr(AllocatedPointer)))) __OMP_RTL_ATTRS(__kmpc_alloc, DefaultAttrs, ReturnPtrAttrs, ParamAttrs()) __OMP_RTL_ATTRS(__kmpc_aligned_alloc, DefaultAttrs, ReturnPtrAttrs, diff --git a/llvm/test/Transforms/OpenMP/remove_globalization.ll b/llvm/test/Transforms/OpenMP/remove_globalization.ll --- a/llvm/test/Transforms/OpenMP/remove_globalization.ll +++ b/llvm/test/Transforms/OpenMP/remove_globalization.ll @@ -155,7 +155,7 @@ ; CHECK: declare i8* @__kmpc_alloc_shared(i64) declare i8* @__kmpc_alloc_shared(i64) -; CHECK: declare void @__kmpc_free_shared(i8* nocapture, i64) +; CHECK: declare void @__kmpc_free_shared(i8* allocptr nocapture, i64) declare void @__kmpc_free_shared(i8*, i64) declare void @unknown_no_openmp() "llvm.assume"="omp_no_openmp"