summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2017-12-15 16:28:31 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2017-12-15 16:28:31 +0000
commita29eb97db38c5cc56c1f8d5bc168f1b51c4824fa (patch)
tree67da161e5e7c43aa5edd0521ca3c67e13afcfab5 /lib/CodeGen/CodeGenModule.cpp
parent05461699ec4181ed767f312b61807eb883446be9 (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.cpp3
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) {