From 67fafb973cfbd0ac08f3177a344e5cdd4fee4ae6 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Thu, 6 Mar 2014 05:43:53 +0000 Subject: [OPENMP] Added option -fopenmp=libiomp5|libgomp git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203081 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CompilerInvocation.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib/Frontend/CompilerInvocation.cpp') 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(A->getValue()) + .Case("libiomp5", true) + .Default(false); + } // Record whether the __DEPRECATED define was requested. Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro, -- cgit v1.2.3