aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2015-05-20 04:24:19 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2015-05-20 04:24:19 +0000
commitdb39021ceebbd311125785d407402b74ec668528 (patch)
tree6a1a9692eb1269740cf03e7ebf02f9d5626dd4cb /clang/lib/Frontend/CompilerInvocation.cpp
parent16dc7b68c4d90cd3abac7015c27030f3d6c710f9 (diff)
downloadllvm-db39021ceebbd311125785d407402b74ec668528.zip
llvm-db39021ceebbd311125785d407402b74ec668528.tar.gz
llvm-db39021ceebbd311125785d407402b74ec668528.tar.bz2
[OPENMP] -fopenmp enables OpenMP support (fix for http://llvm.org/PR23492)
-fopenmp turns on OpenMP support and links libiomp5 as OpenMP library. Also there is -fopenmp={libiomp5|libgomp} option that allows to override effect of -fopenmp and link libgomp library (if -fopenmp=libgomp is specified). Differential Revision: http://reviews.llvm.org/D9736 llvm-svn: 237769
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 1175022..2ac34a6 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1643,12 +1643,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
Opts.setMSPointerToMemberRepresentationMethod(InheritanceModel);
}
- // Check if -fopenmp= is specified.
- if (const Arg *A = Args.getLastArg(options::OPT_fopenmp_EQ)) {
- Opts.OpenMP = llvm::StringSwitch<bool>(A->getValue())
- .Case("libiomp5", true)
- .Default(false);
- }
+ // Check if -fopenmp is specified.
+ Opts.OpenMP = Args.hasArg(options::OPT_fopenmp);
// Record whether the __DEPRECATED define was requested.
Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro,