summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-03-06 05:43:53 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-03-06 05:43:53 +0000
commit67fafb973cfbd0ac08f3177a344e5cdd4fee4ae6 (patch)
treef30bc5f8d2527f0fbcee879592d3c47149576dd7 /lib/Frontend/CompilerInvocation.cpp
parenta95abca11b63dc3fc1c0aa7efe7f87ea8bc73bc1 (diff)
downloadclang-67fafb973cfbd0ac08f3177a344e5cdd4fee4ae6.tar.gz
clang-67fafb973cfbd0ac08f3177a344e5cdd4fee4ae6.tar.bz2
clang-67fafb973cfbd0ac08f3177a344e5cdd4fee4ae6.tar.xz
[OPENMP] Added option -fopenmp=libiomp5|libgomp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index f8cb938866..d28af7c469 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -1431,8 +1431,12 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK,
Opts.setMSPointerToMemberRepresentationMethod(InheritanceModel);
}
- // Check if -fopenmp is specified.
- Opts.OpenMP = Args.hasArg(OPT_fopenmp);
+ // 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);
+ }
// Record whether the __DEPRECATED define was requested.
Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro,