diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2017-12-15 16:28:31 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-12-15 16:28:31 +0000 |
commit | a29eb97db38c5cc56c1f8d5bc168f1b51c4824fa (patch) | |
tree | 67da161e5e7c43aa5edd0521ca3c67e13afcfab5 /lib/CodeGen/CodeGenModule.cpp | |
parent | 05461699ec4181ed767f312b61807eb883446be9 (diff) |
[OPENMP] Codegen `declare simd` for function declarations.
Previously the attributes were emitted only for function definitions.
Patch adds emission of the attributes for function declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@320826 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 421a1ad3d0..c59dc71da5 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -1238,6 +1238,9 @@ void CodeGenModule::SetFunctionAttributes(GlobalDecl GD, llvm::Function *F, // is handled with better precision by the receiving DSO. if (!CodeGenOpts.SanitizeCfiCrossDso) CreateFunctionTypeMetadata(FD, F); + + if (getLangOpts().OpenMP && FD->hasAttr<OMPDeclareSimdDeclAttr>()) + getOpenMPRuntime().emitDeclareSimdFunction(FD, F); } void CodeGenModule::addUsedGlobal(llvm::GlobalValue *GV) { |