aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorSaiyedul Islam <Saiyedul.Islam@amd.com>2020-06-25 07:01:15 +0000
committerSaiyedul Islam <Saiyedul.Islam@amd.com>2020-06-25 07:13:05 +0000
commit2bfce22a924aba3fdc3d83394b72810f52907253 (patch)
tree7468d46b9dd759cf4c524b649f9bbce09dd6939c /clang/lib/Frontend/CompilerInvocation.cpp
parentee26a31e7b02e124d71091d47f2ae624774e5e0a (diff)
downloadllvm-2bfce22a924aba3fdc3d83394b72810f52907253.zip
llvm-2bfce22a924aba3fdc3d83394b72810f52907253.tar.gz
llvm-2bfce22a924aba3fdc3d83394b72810f52907253.tar.bz2
[OpenMP] Upgrade default version of OpenMP to 5.0
Summary: When -fopenmp option is specified then version 5.0 will be set as default. Reviewers: gregrodgers, jdoerfert, ABataev Reviewed By: ABataev Subscribers: pdhaliwal, yaxunl, guansong, sstefan1, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D81098
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 6838d4a..d5528e3 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -3099,8 +3099,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
}
}
- // Check if -fopenmp is specified and set default version to 4.5.
- Opts.OpenMP = Args.hasArg(options::OPT_fopenmp) ? 45 : 0;
+ // Check if -fopenmp is specified and set default version to 5.0.
+ Opts.OpenMP = Args.hasArg(options::OPT_fopenmp) ? 50 : 0;
// Check if -fopenmp-simd is specified.
bool IsSimdSpecified =
Args.hasFlag(options::OPT_fopenmp_simd, options::OPT_fno_openmp_simd,
@@ -3118,10 +3118,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
if (Opts.OpenMP || Opts.OpenMPSimd) {
if (int Version = getLastArgIntValue(
Args, OPT_fopenmp_version_EQ,
- (IsSimdSpecified || IsTargetSpecified) ? 45 : Opts.OpenMP, Diags))
+ (IsSimdSpecified || IsTargetSpecified) ? 50 : Opts.OpenMP, Diags))
Opts.OpenMP = Version;
- else if (IsSimdSpecified || IsTargetSpecified)
- Opts.OpenMP = 45;
// Provide diagnostic when a given target is not expected to be an OpenMP
// device or host.
if (!Opts.OpenMPIsDevice) {