Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td	(revision 166176)
+++ include/clang/Driver/Options.td	(working copy)
@@ -591,7 +591,7 @@
 def fobjc_sender_dependent_dispatch : Flag<"-fobjc-sender-dependent-dispatch">, Group<f_Group>;
 def fobjc : Flag<"-fobjc">, Group<f_Group>;
 def fomit_frame_pointer : Flag<"-fomit-frame-pointer">, Group<f_Group>;
-def fopenmp : Flag<"-fopenmp">, Group<f_Group>;
+def fopenmp : Flag<"-fopenmp">, Group<f_Group>, Flags<[CC1Option]>;
 def fno_optimize_sibling_calls : Flag<"-fno-optimize-sibling-calls">, Group<f_Group>;
 def foptimize_sibling_calls : Flag<"-foptimize-sibling-calls">, Group<f_Group>;
 def force__cpusubtype__ALL : Flag<"-force_cpusubtype_ALL">;
Index: include/clang/Basic/LangOptions.def
===================================================================
--- include/clang/Basic/LangOptions.def	(revision 166176)
+++ include/clang/Basic/LangOptions.def	(working copy)
@@ -167,6 +167,8 @@
 BENIGN_LANGOPT(EmitMicrosoftInlineAsm , 1, 0, 
                "Enable emission of MS-style inline assembly.")
 
+LANGOPT(OpenMP, 1, 0, "Enables OpenMP support.")
+
 BENIGN_LANGOPT(RetainCommentsFromSystemHeaders, 1, 0, "retain documentation comments from system headers in the AST")
 
 #undef LANGOPT
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp	(revision 166176)
+++ lib/Driver/Tools.cpp	(working copy)
@@ -2395,6 +2395,8 @@
 
   Args.AddLastArg(CmdArgs, options::OPT_pthread);
 
+  Args.AddLastArg(CmdArgs, options::OPT_fopenmp);
+
   // -stack-protector=0 is default.
   unsigned StackProtectorLevel = 0;
   if (Arg *A = Args.getLastArg(options::OPT_fno_stack_protector,
Index: lib/Frontend/CompilerInvocation.cpp
===================================================================
--- lib/Frontend/CompilerInvocation.cpp	(revision 166176)
+++ lib/Frontend/CompilerInvocation.cpp	(working copy)
@@ -862,6 +862,8 @@
     Res.push_back("-fapple-pragma-pack");
   if (!Opts.CurrentModule.empty())
     Res.push_back("-fmodule-name=" + Opts.CurrentModule);
+  if (Opts.OpenMP)
+    Res.push_back("-fopenmp");
 }
 
 static void PreprocessorOptsToArgs(const PreprocessorOptions &Opts,
@@ -2131,6 +2133,7 @@
   Opts.ThreadSanitizer = Args.hasArg(OPT_fthread_sanitizer);
   Opts.ApplePragmaPack = Args.hasArg(OPT_fapple_pragma_pack);
   Opts.CurrentModule = Args.getLastArgValue(OPT_fmodule_name);
+  Opts.OpenMP = Args.hasArg(OPT_fopenmp);
 
   // Record whether the __DEPRECATED define was requested.
   Opts.Deprecated = Args.hasFlag(OPT_fdeprecated_macro,
Index: test/Driver/clang_fopenmp_opt.c
===================================================================
--- test/Driver/clang_fopenmp_opt.c	(revision 0)
+++ test/Driver/clang_fopenmp_opt.c	(revision 0)
@@ -0,0 +1,2 @@
+// RUN: %clang -S -v -o %t %s              2>&1 | not grep -w -- -fopenmp
+// RUN: %clang -S -v -o %t %s -fopenmp     2>&1 | grep -w -- -fopenmp
